$apiInstance = new Fastly\Api\ResourceApi(
// 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
);
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
createResource() | POST /service/{service_id}/version/{version_id}/resource | Create a resource link |
deleteResource() | DELETE /service/{service_id}/version/{version_id}/resource/{id} | Delete a resource link |
getResource() | GET /service/{service_id}/version/{version_id}/resource/{id} | Display a resource link |
listResources() | GET /service/{service_id}/version/{version_id}/resource | List resource links |
updateResource() | PUT /service/{service_id}/version/{version_id}/resource/{id} | Update a resource link |
createResource($options): \Fastly\Model\ResourceResponse // Create a resource link
Create a link between a resource and a service version.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['resource_id'] = 'resource_id_example'; // string | The ID of the underlying linked resource.
$options['name'] = 'name_example'; // string | The name of the resource link.
try {
$result = $apiInstance->createResource($options);
} catch (Exception $e) {
echo 'Exception when calling ResourceApi->createResource: ', $e->getMessage(), PHP_EOL;
}
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. | |
resource_id | string | The ID of the underlying linked resource. | [optional] |
name | string | The name of the resource link. | [optional] |
\Fastly\Model\ResourceResponse
[Back to top] [Back to API list] [Back to README]
deleteResource($options): \Fastly\Model\InlineResponse200 // Delete a resource link
Delete a link between a resource and a service version.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['id'] = 'id_example'; // string | An alphanumeric string identifying the resource link.
try {
$result = $apiInstance->deleteResource($options);
} catch (Exception $e) {
echo 'Exception when calling ResourceApi->deleteResource: ', $e->getMessage(), PHP_EOL;
}
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. | |
id | string | An alphanumeric string identifying the resource link. |
\Fastly\Model\InlineResponse200
[Back to top] [Back to API list] [Back to README]
getResource($options): \Fastly\Model\ResourceResponse // Display a resource link
Display a resource link by its identifier.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['id'] = 'id_example'; // string | An alphanumeric string identifying the resource link.
try {
$result = $apiInstance->getResource($options);
} catch (Exception $e) {
echo 'Exception when calling ResourceApi->getResource: ', $e->getMessage(), PHP_EOL;
}
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. | |
id | string | An alphanumeric string identifying the resource link. |
\Fastly\Model\ResourceResponse
[Back to top] [Back to API list] [Back to README]
listResources($options): \Fastly\Model\ResourceResponse[] // List resource links
List links between resources and services
$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->listResources($options);
} catch (Exception $e) {
echo 'Exception when calling ResourceApi->listResources: ', $e->getMessage(), PHP_EOL;
}
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. |
\Fastly\Model\ResourceResponse[]
[Back to top] [Back to API list] [Back to README]
updateResource($options): \Fastly\Model\ResourceResponse // Update a resource link
Update a link between a resource and a service version.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['id'] = 'id_example'; // string | An alphanumeric string identifying the resource link.
$options['resource_id'] = 'resource_id_example'; // string | The ID of the underlying linked resource.
$options['name'] = 'name_example'; // string | The name of the resource link.
try {
$result = $apiInstance->updateResource($options);
} catch (Exception $e) {
echo 'Exception when calling ResourceApi->updateResource: ', $e->getMessage(), PHP_EOL;
}
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. | |
id | string | An alphanumeric string identifying the resource link. | |
resource_id | string | The ID of the underlying linked resource. | [optional] |
name | string | The name of the resource link. | [optional] |