Skip to content

Latest commit

 

History

History
215 lines (154 loc) · 7.87 KB

ResponseObjectApi.md

File metadata and controls

215 lines (154 loc) · 7.87 KB

Fastly\Api\ResponseObjectApi

$apiInstance = new Fastly\Api\ResponseObjectApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
createResponseObject() POST /service/{service_id}/version/{version_id}/response_object Create a Response object
deleteResponseObject() DELETE /service/{service_id}/version/{version_id}/response_object/{response_object_name} Delete a Response Object
getResponseObject() GET /service/{service_id}/version/{version_id}/response_object/{response_object_name} Get a Response object
listResponseObjects() GET /service/{service_id}/version/{version_id}/response_object List Response objects
updateResponseObject() PUT /service/{service_id}/version/{version_id}/response_object/{response_object_name} Update a Response object

createResponseObject()

createResponseObject($options): \Fastly\Model\ResponseObjectResponse // Create a Response object

Creates a new Response Object.

Example

    $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['create_response_object_request'] = new \Fastly\Model\CreateResponseObjectRequest(); // \Fastly\Model\CreateResponseObjectRequest

try {
    $result = $apiInstance->createResponseObject($options);
} catch (Exception $e) {
    echo 'Exception when calling ResponseObjectApi->createResponseObject: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
create_response_object_request \Fastly\Model\CreateResponseObjectRequest [optional]

Return type

\Fastly\Model\ResponseObjectResponse

[Back to top] [Back to API list] [Back to README]

deleteResponseObject()

deleteResponseObject($options): \Fastly\Model\InlineResponse200 // Delete a Response Object

Deletes the specified Response Object.

Example

    $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['response_object_name'] = 'response_object_name_example'; // string | Name for the request settings.

try {
    $result = $apiInstance->deleteResponseObject($options);
} catch (Exception $e) {
    echo 'Exception when calling ResponseObjectApi->deleteResponseObject: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
response_object_name string Name for the request settings.

Return type

\Fastly\Model\InlineResponse200

[Back to top] [Back to API list] [Back to README]

getResponseObject()

getResponseObject($options): \Fastly\Model\ResponseObjectResponse // Get a Response object

Gets the specified Response Object.

Example

    $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['response_object_name'] = 'response_object_name_example'; // string | Name for the request settings.

try {
    $result = $apiInstance->getResponseObject($options);
} catch (Exception $e) {
    echo 'Exception when calling ResponseObjectApi->getResponseObject: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
response_object_name string Name for the request settings.

Return type

\Fastly\Model\ResponseObjectResponse

[Back to top] [Back to API list] [Back to README]

listResponseObjects()

listResponseObjects($options): \Fastly\Model\ResponseObjectResponse[] // List Response objects

Returns all Response Objects for the specified service and version.

Example

    $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.

try {
    $result = $apiInstance->listResponseObjects($options);
} catch (Exception $e) {
    echo 'Exception when calling ResponseObjectApi->listResponseObjects: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.

Return type

\Fastly\Model\ResponseObjectResponse[]

[Back to top] [Back to API list] [Back to README]

updateResponseObject()

updateResponseObject($options): \Fastly\Model\ResponseObjectResponse // Update a Response object

Updates the specified Response Object.

Example

    $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['response_object_name'] = 'response_object_name_example'; // string | Name for the request settings.
$options['create_response_object_request'] = new \Fastly\Model\CreateResponseObjectRequest(); // \Fastly\Model\CreateResponseObjectRequest

try {
    $result = $apiInstance->updateResponseObject($options);
} catch (Exception $e) {
    echo 'Exception when calling ResponseObjectApi->updateResponseObject: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
response_object_name string Name for the request settings.
create_response_object_request \Fastly\Model\CreateResponseObjectRequest [optional]

Return type

\Fastly\Model\ResponseObjectResponse

[Back to top] [Back to API list] [Back to README]