$apiInstance = new Fastly\Api\IamServiceGroupsApi(
// 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 |
---|---|---|
addServiceGroupServices() | POST /service-groups/{service_group_id}/services | Add services in a service group |
createAServiceGroup() | POST /service-groups | Create a service group |
deleteAServiceGroup() | DELETE /service-groups/{service_group_id} | Delete a service group |
getAServiceGroup() | GET /service-groups/{service_group_id} | Get a service group |
listServiceGroupServices() | GET /service-groups/{service_group_id}/services | List services to a service group |
listServiceGroups() | GET /service-groups | List service groups |
removeServiceGroupServices() | DELETE /service-groups/{service_group_id}/services | Remove services from a service group |
updateAServiceGroup() | PATCH /service-groups/{service_group_id} | Update a service group |
addServiceGroupServices($options): object // Add services in a service group
Add services in a service group.
$options['service_group_id'] = 'service_group_id_example'; // string | Alphanumeric string identifying the service group.
$options['request_body'] = {"services":[{"id":"0QbayrOodFILsM58jum2nt"},{"id":"5QoWSdPgkxvL9eoDMXRDr4"}]}; // array<string,object>
try {
$result = $apiInstance->addServiceGroupServices($options);
} catch (Exception $e) {
echo 'Exception when calling IamServiceGroupsApi->addServiceGroupServices: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_group_id | string | Alphanumeric string identifying the service group. | |
request_body | array<string,object> | [optional] |
object
[Back to top] [Back to API list] [Back to README]
createAServiceGroup($options): object // Create a service group
Create a service group.
$options['request_body'] = {"name":"Prod Services"}; // array<string,object>
try {
$result = $apiInstance->createAServiceGroup($options);
} catch (Exception $e) {
echo 'Exception when calling IamServiceGroupsApi->createAServiceGroup: ', $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] |
object
[Back to top] [Back to API list] [Back to README]
deleteAServiceGroup($options) // Delete a service group
Delete a service group.
$options['service_group_id'] = 'service_group_id_example'; // string | Alphanumeric string identifying the service group.
try {
$apiInstance->deleteAServiceGroup($options);
} catch (Exception $e) {
echo 'Exception when calling IamServiceGroupsApi->deleteAServiceGroup: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_group_id | string | Alphanumeric string identifying the service group. |
void (empty response body)
[Back to top] [Back to API list] [Back to README]
getAServiceGroup($options): object // Get a service group
Get a service group.
$options['service_group_id'] = 'service_group_id_example'; // string | Alphanumeric string identifying the service group.
try {
$result = $apiInstance->getAServiceGroup($options);
} catch (Exception $e) {
echo 'Exception when calling IamServiceGroupsApi->getAServiceGroup: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_group_id | string | Alphanumeric string identifying the service group. |
object
[Back to top] [Back to API list] [Back to README]
listServiceGroupServices($options): object // List services to a service group
List services to a service group.
$options['service_group_id'] = 'service_group_id_example'; // string | Alphanumeric string identifying the service group.
$options['per_page'] = 20; // int | Number of records per page.
$options['page'] = 1; // int | Current page.
try {
$result = $apiInstance->listServiceGroupServices($options);
} catch (Exception $e) {
echo 'Exception when calling IamServiceGroupsApi->listServiceGroupServices: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_group_id | string | Alphanumeric string identifying the service group. | |
per_page | int | Number of records per page. | [optional] [defaults to 20] |
page | int | Current page. | [optional] |
object
[Back to top] [Back to API list] [Back to README]
listServiceGroups($options): object // List service groups
List all service groups.
$options['per_page'] = 20; // int | Number of records per page.
$options['page'] = 1; // int | Current page.
try {
$result = $apiInstance->listServiceGroups($options);
} catch (Exception $e) {
echo 'Exception when calling IamServiceGroupsApi->listServiceGroups: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
per_page | int | Number of records per page. | [optional] [defaults to 20] |
page | int | Current page. | [optional] |
object
[Back to top] [Back to API list] [Back to README]
removeServiceGroupServices($options) // Remove services from a service group
Remove services from a service group.
$options['service_group_id'] = 'service_group_id_example'; // string | Alphanumeric string identifying the service group.
$options['request_body'] = {"services":[{"id":"0QbayrOodFILsM58jum2nt"},{"id":"5QoWSdPgkxvL9eoDMXRDr4"}]}; // array<string,object>
try {
$apiInstance->removeServiceGroupServices($options);
} catch (Exception $e) {
echo 'Exception when calling IamServiceGroupsApi->removeServiceGroupServices: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_group_id | string | Alphanumeric string identifying the service group. | |
request_body | array<string,object> | [optional] |
void (empty response body)
[Back to top] [Back to API list] [Back to README]
updateAServiceGroup($options): object // Update a service group
Update a service group.
$options['service_group_id'] = 'service_group_id_example'; // string | Alphanumeric string identifying the service group.
$options['request_body'] = {"name":"Prod Services","description":"Services running in the production environment."}; // array<string,object>
try {
$result = $apiInstance->updateAServiceGroup($options);
} catch (Exception $e) {
echo 'Exception when calling IamServiceGroupsApi->updateAServiceGroup: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_group_id | string | Alphanumeric string identifying the service group. | |
request_body | array<string,object> | [optional] |
object