$apiInstance = new Fastly\Api\ServiceAuthorizationsApi(
// 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 |
---|---|---|
createServiceAuthorization() | POST /service-authorizations | Create service authorization |
deleteServiceAuthorization() | DELETE /service-authorizations/{service_authorization_id} | Delete service authorization |
deleteServiceAuthorization2() | DELETE /service-authorizations | Delete service authorizations |
listServiceAuthorization() | GET /service-authorizations | List service authorizations |
showServiceAuthorization() | GET /service-authorizations/{service_authorization_id} | Show service authorization |
updateServiceAuthorization() | PATCH /service-authorizations/{service_authorization_id} | Update service authorization |
updateServiceAuthorization2() | PATCH /service-authorizations | Update service authorizations |
createServiceAuthorization($options): \Fastly\Model\ServiceAuthorizationResponse // Create service authorization
Create service authorization.
$options['service_authorization'] = {"data":{"type":"service_authorization","attributes":{"permission":"read_only"},"relationships":{"user":{"data":{"type":"user","id":"6c7kAlo4vACNchGOdQxP37"}},"service":{"data":{"type":"service","id":"SU1Z0isxPaozGVKXdv0eY"}}}}}; // \Fastly\Model\ServiceAuthorization
try {
$result = $apiInstance->createServiceAuthorization($options);
} catch (Exception $e) {
echo 'Exception when calling ServiceAuthorizationsApi->createServiceAuthorization: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_authorization | \Fastly\Model\ServiceAuthorization | [optional] |
\Fastly\Model\ServiceAuthorizationResponse
[Back to top] [Back to API list] [Back to README]
deleteServiceAuthorization($options) // Delete service authorization
Delete service authorization.
$options['service_authorization_id'] = 'service_authorization_id_example'; // string | Alphanumeric string identifying a service authorization.
try {
$apiInstance->deleteServiceAuthorization($options);
} catch (Exception $e) {
echo 'Exception when calling ServiceAuthorizationsApi->deleteServiceAuthorization: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_authorization_id | string | Alphanumeric string identifying a service authorization. |
void (empty response body)
[Back to top] [Back to API list] [Back to README]
deleteServiceAuthorization2($options): \Fastly\Model\InlineResponse2007 // Delete service authorizations
Delete service authorizations.
$options['request_body'] = {"data":[{"id":"3krg2uUGZzb2W9Euo4moOY","type":"service_authorization"},{"id":"71ZA6hv2FO6tGEQIE203Xj","type":"service_authorization"}]}; // array<string,object>
try {
$result = $apiInstance->deleteServiceAuthorization2($options);
} catch (Exception $e) {
echo 'Exception when calling ServiceAuthorizationsApi->deleteServiceAuthorization2: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
request_body | array<string,object> | [optional] |
\Fastly\Model\InlineResponse2007
[Back to top] [Back to API list] [Back to README]
listServiceAuthorization($options): \Fastly\Model\ServiceAuthorizationsResponse // List service authorizations
List service authorizations.
$options['page_number'] = 1; // int | Current page.
$options['page_size'] = 20; // int | Number of records per page.
try {
$result = $apiInstance->listServiceAuthorization($options);
} catch (Exception $e) {
echo 'Exception when calling ServiceAuthorizationsApi->listServiceAuthorization: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
page_number | int | Current page. | [optional] |
page_size | int | Number of records per page. | [optional] [defaults to 20] |
\Fastly\Model\ServiceAuthorizationsResponse
[Back to top] [Back to API list] [Back to README]
showServiceAuthorization($options): \Fastly\Model\ServiceAuthorizationResponse // Show service authorization
Show service authorization.
$options['service_authorization_id'] = 'service_authorization_id_example'; // string | Alphanumeric string identifying a service authorization.
try {
$result = $apiInstance->showServiceAuthorization($options);
} catch (Exception $e) {
echo 'Exception when calling ServiceAuthorizationsApi->showServiceAuthorization: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_authorization_id | string | Alphanumeric string identifying a service authorization. |
\Fastly\Model\ServiceAuthorizationResponse
[Back to top] [Back to API list] [Back to README]
updateServiceAuthorization($options): \Fastly\Model\ServiceAuthorizationResponse // Update service authorization
Update service authorization.
$options['service_authorization_id'] = 'service_authorization_id_example'; // string | Alphanumeric string identifying a service authorization.
$options['service_authorization'] = {"data":{"id":"3krg2uUGZzb2W9Euo4moOY","type":"service_authorization","attributes":{"permission":"read_only"}}}; // \Fastly\Model\ServiceAuthorization
try {
$result = $apiInstance->updateServiceAuthorization($options);
} catch (Exception $e) {
echo 'Exception when calling ServiceAuthorizationsApi->updateServiceAuthorization: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_authorization_id | string | Alphanumeric string identifying a service authorization. | |
service_authorization | \Fastly\Model\ServiceAuthorization | [optional] |
\Fastly\Model\ServiceAuthorizationResponse
[Back to top] [Back to API list] [Back to README]
updateServiceAuthorization2($options): \Fastly\Model\ServiceAuthorizationsResponse // Update service authorizations
Update service authorizations.
$options['request_body'] = {"data":[{"id":"3krg2uUGZzb2W9Euo4moOY","type":"service_authorization","attributes":{"permission":"read_only"}},{"id":"71ZA6hv2FO6tGEQIE203Xj","type":"service_authorization","attributes":{"permission":"purge_all"}}]}; // array<string,object>
try {
$result = $apiInstance->updateServiceAuthorization2($options);
} catch (Exception $e) {
echo 'Exception when calling ServiceAuthorizationsApi->updateServiceAuthorization2: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
request_body | array<string,object> | [optional] |