Skip to content

Latest commit

 

History

History
309 lines (216 loc) · 9.45 KB

IamServiceGroupsApi.md

File metadata and controls

309 lines (216 loc) · 9.45 KB

Fastly\Api\IamServiceGroupsApi

$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
);

Methods

Method Fastly API endpoint 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()

addServiceGroupServices($options): object // Add services in a service group

Add services in a service group.

Example

    $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;
}

Options

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]

Return type

object

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

createAServiceGroup()

createAServiceGroup($options): object // Create a service group

Create a service group.

Example

    $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;
}

Options

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

Name Type Description Notes
request_body array<string,object> [optional]

Return type

object

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

deleteAServiceGroup()

deleteAServiceGroup($options) // Delete a service group

Delete a service group.

Example

    $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;
}

Options

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.

Return type

void (empty response body)

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

getAServiceGroup()

getAServiceGroup($options): object // Get a service group

Get a service group.

Example

    $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;
}

Options

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.

Return type

object

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

listServiceGroupServices()

listServiceGroupServices($options): object // List services to a service group

List services to a service group.

Example

    $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;
}

Options

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]

Return type

object

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

listServiceGroups()

listServiceGroups($options): object // List service groups

List all service groups.

Example

    $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;
}

Options

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]

Return type

object

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

removeServiceGroupServices()

removeServiceGroupServices($options) // Remove services from a service group

Remove services from a service group.

Example

    $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;
}

Options

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]

Return type

void (empty response body)

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

updateAServiceGroup()

updateAServiceGroup($options): object // Update a service group

Update a service group.

Example

    $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;
}

Options

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]

Return type

object

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