Reference documentation and code samples for the Google Cloud Saas Platform Saas Service Mgmt V1 Client class SaasRolloutsClient.
Service Description: Manages the rollout of SaaS services.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parseName method to extract the individual identifiers contained within formatted names that are returned by the API.
Namespace
Google \ Cloud \ SaasPlatform \ SaasServiceMgmt \ V1 \ ClientMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
options |
array|Google\ApiCore\Options\ClientOptions
Optional. Options for configuring the service API wrapper. |
↳ apiEndpoint |
string
The address of the API remote host. May optionally include the port, formatted as "
|
↳ credentials |
Google\Auth\FetchAuthTokenInterface|Google\ApiCore\CredentialsWrapper
This option should only be used with a pre-constructed Google\Auth\FetchAuthTokenInterface or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. Important: If you are providing a path to a credentials file, or a decoded credentials file as a PHP array, this usage is now DEPRECATED. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. It is recommended to create the credentials explicitly |
↳ credentialsConfig |
array
Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() . |
↳ disableRetries |
bool
Determines whether or not retries defined by the client configuration should be disabled. Defaults to |
↳ clientConfig |
string|array
Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
↳ transport |
string|Google\ApiCore\Transport\TransportInterface
The transport used for executing network requests. May be either the string |
↳ transportConfig |
array
Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options. |
↳ clientCertSource |
callable
A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
↳ logger |
false|Psr\Log\LoggerInterface
A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag |
↳ universeDomain |
string
The service domain for the client. Defaults to 'googleapis.com'. |
createRollout
Create a new rollout.
The async variant is SaasRolloutsClient::createRolloutAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateRolloutRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout |
|
use Google\ApiCore\ApiException;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateRolloutRequest;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout;
/**
* @param string $formattedParent The parent of the rollout. Please see
* {@see SaasRolloutsClient::locationName()} for help formatting this field.
* @param string $rolloutId The ID value for the new rollout.
* @param string $formattedRolloutRolloutKind Immutable. Name of the RolloutKind this rollout is stemming from
* and adhering to. Please see
* {@see SaasRolloutsClient::rolloutKindName()} for help formatting this field.
*/
function create_rollout_sample(
string $formattedParent,
string $rolloutId,
string $formattedRolloutRolloutKind
): void {
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$rollout = (new Rollout())
->setRolloutKind($formattedRolloutRolloutKind);
$request = (new CreateRolloutRequest())
->setParent($formattedParent)
->setRolloutId($rolloutId)
->setRollout($rollout);
// Call the API and handle any network failures.
try {
/** @var Rollout $response */
$response = $saasRolloutsClient->createRollout($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SaasRolloutsClient::locationName('[PROJECT]', '[LOCATION]');
$rolloutId = '[ROLLOUT_ID]';
$formattedRolloutRolloutKind = SaasRolloutsClient::rolloutKindName(
'[PROJECT]',
'[LOCATION]',
'[ROLLOUT_KIND_ID]'
);
create_rollout_sample($formattedParent, $rolloutId, $formattedRolloutRolloutKind);
}
createRolloutKind
Create a new rollout kind.
The async variant is SaasRolloutsClient::createRolloutKindAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateRolloutKindRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind |
|
use Google\ApiCore\ApiException;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateRolloutKindRequest;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind;
/**
* @param string $formattedParent The parent of the rollout kind. Please see
* {@see SaasRolloutsClient::locationName()} for help formatting this field.
* @param string $rolloutKindId The ID value for the new rollout kind.
*/
function create_rollout_kind_sample(string $formattedParent, string $rolloutKindId): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$rolloutKind = new RolloutKind();
$request = (new CreateRolloutKindRequest())
->setParent($formattedParent)
->setRolloutKindId($rolloutKindId)
->setRolloutKind($rolloutKind);
// Call the API and handle any network failures.
try {
/** @var RolloutKind $response */
$response = $saasRolloutsClient->createRolloutKind($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SaasRolloutsClient::locationName('[PROJECT]', '[LOCATION]');
$rolloutKindId = '[ROLLOUT_KIND_ID]';
create_rollout_kind_sample($formattedParent, $rolloutKindId);
}
deleteRollout
Delete a single rollout.
The async variant is SaasRolloutsClient::deleteRolloutAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteRolloutRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteRolloutRequest;
/**
* @param string $formattedName The resource name of the resource within a service. Please see
* {@see SaasRolloutsClient::rolloutName()} for help formatting this field.
*/
function delete_rollout_sample(string $formattedName): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$request = (new DeleteRolloutRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$saasRolloutsClient->deleteRollout($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SaasRolloutsClient::rolloutName('[PROJECT]', '[LOCATION]', '[ROLLOUT_ID]');
delete_rollout_sample($formattedName);
}
deleteRolloutKind
Delete a single rollout kind.
The async variant is SaasRolloutsClient::deleteRolloutKindAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteRolloutKindRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
use Google\ApiCore\ApiException;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteRolloutKindRequest;
/**
* @param string $formattedName The resource name of the resource within a service. Please see
* {@see SaasRolloutsClient::rolloutKindName()} for help formatting this field.
*/
function delete_rollout_kind_sample(string $formattedName): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$request = (new DeleteRolloutKindRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$saasRolloutsClient->deleteRolloutKind($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SaasRolloutsClient::rolloutKindName(
'[PROJECT]',
'[LOCATION]',
'[ROLLOUT_KIND_ID]'
);
delete_rollout_kind_sample($formattedName);
}
getRollout
Retrieve a single rollout.
The async variant is SaasRolloutsClient::getRolloutAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetRolloutRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout |
|
use Google\ApiCore\ApiException;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetRolloutRequest;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout;
/**
* @param string $formattedName The resource name of the resource within a service. Please see
* {@see SaasRolloutsClient::rolloutName()} for help formatting this field.
*/
function get_rollout_sample(string $formattedName): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$request = (new GetRolloutRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Rollout $response */
$response = $saasRolloutsClient->getRollout($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SaasRolloutsClient::rolloutName('[PROJECT]', '[LOCATION]', '[ROLLOUT_ID]');
get_rollout_sample($formattedName);
}
getRolloutKind
Retrieve a single rollout kind.
The async variant is SaasRolloutsClient::getRolloutKindAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetRolloutKindRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind |
|
use Google\ApiCore\ApiException;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetRolloutKindRequest;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind;
/**
* @param string $formattedName The resource name of the resource within a service. Please see
* {@see SaasRolloutsClient::rolloutKindName()} for help formatting this field.
*/
function get_rollout_kind_sample(string $formattedName): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$request = (new GetRolloutKindRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var RolloutKind $response */
$response = $saasRolloutsClient->getRolloutKind($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = SaasRolloutsClient::rolloutKindName(
'[PROJECT]',
'[LOCATION]',
'[ROLLOUT_KIND_ID]'
);
get_rollout_kind_sample($formattedName);
}
listRolloutKinds
Retrieve a collection of rollout kinds.
The async variant is SaasRolloutsClient::listRolloutKindsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListRolloutKindsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListRolloutKindsRequest;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind;
/**
* @param string $formattedParent The parent of the rollout kind. Please see
* {@see SaasRolloutsClient::locationName()} for help formatting this field.
*/
function list_rollout_kinds_sample(string $formattedParent): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$request = (new ListRolloutKindsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $saasRolloutsClient->listRolloutKinds($request);
/** @var RolloutKind $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SaasRolloutsClient::locationName('[PROJECT]', '[LOCATION]');
list_rollout_kinds_sample($formattedParent);
}
listRollouts
Retrieve a collection of rollouts.
The async variant is SaasRolloutsClient::listRolloutsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListRolloutsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListRolloutsRequest;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout;
/**
* @param string $formattedParent The parent of the rollout. Please see
* {@see SaasRolloutsClient::locationName()} for help formatting this field.
*/
function list_rollouts_sample(string $formattedParent): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$request = (new ListRolloutsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $saasRolloutsClient->listRollouts($request);
/** @var Rollout $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = SaasRolloutsClient::locationName('[PROJECT]', '[LOCATION]');
list_rollouts_sample($formattedParent);
}
updateRollout
Update a single rollout.
The async variant is SaasRolloutsClient::updateRolloutAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateRolloutRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout |
|
use Google\ApiCore\ApiException;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateRolloutRequest;
/**
* @param string $formattedRolloutRolloutKind Immutable. Name of the RolloutKind this rollout is stemming from
* and adhering to. Please see
* {@see SaasRolloutsClient::rolloutKindName()} for help formatting this field.
*/
function update_rollout_sample(string $formattedRolloutRolloutKind): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$rollout = (new Rollout())
->setRolloutKind($formattedRolloutRolloutKind);
$request = (new UpdateRolloutRequest())
->setRollout($rollout);
// Call the API and handle any network failures.
try {
/** @var Rollout $response */
$response = $saasRolloutsClient->updateRollout($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedRolloutRolloutKind = SaasRolloutsClient::rolloutKindName(
'[PROJECT]',
'[LOCATION]',
'[ROLLOUT_KIND_ID]'
);
update_rollout_sample($formattedRolloutRolloutKind);
}
updateRolloutKind
Update a single rollout kind.
The async variant is SaasRolloutsClient::updateRolloutKindAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateRolloutKindRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind |
|
use Google\ApiCore\ApiException;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateRolloutKindRequest;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function update_rollout_kind_sample(): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$rolloutKind = new RolloutKind();
$request = (new UpdateRolloutKindRequest())
->setRolloutKind($rolloutKind);
// Call the API and handle any network failures.
try {
/** @var RolloutKind $response */
$response = $saasRolloutsClient->updateRolloutKind($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
getLocation
Gets information about a location.
The async variant is SaasRolloutsClient::getLocationAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Location\Location |
|
use Google\ApiCore\ApiException;
use Google\Cloud\Location\GetLocationRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function get_location_sample(): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$request = new GetLocationRequest();
// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $saasRolloutsClient->getLocation($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
listLocations
Lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in
the ListLocationsRequest.name field: *
Global locations: If name is empty, the method lists the
public locations available to all projects. * Project-specific
locations: If name follows the format
projects/{project}, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is
passed as the name field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.
The async variant is SaasRolloutsClient::listLocationsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
A request to house fields associated with the call. |
callOptions |
array
Optional. |
↳ retrySettings |
Google\ApiCore\RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage. |
| Returns | |
|---|---|
| Type | Description |
Google\ApiCore\PagedListResponse |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Client\SaasRolloutsClient;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function list_locations_sample(): void
{
// Create a client.
$saasRolloutsClient = new SaasRolloutsClient();
// Prepare the request message.
$request = new ListLocationsRequest();
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $saasRolloutsClient->listLocations($request);
/** @var Location $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
createRolloutAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateRolloutRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout> |
|
createRolloutKindAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\CreateRolloutKindRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind> |
|
deleteRolloutAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteRolloutRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
|
deleteRolloutKindAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\DeleteRolloutKindRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
|
getRolloutAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetRolloutRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout> |
|
getRolloutKindAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\GetRolloutKindRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind> |
|
listRolloutKindsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListRolloutKindsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listRolloutsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\ListRolloutsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
updateRolloutAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateRolloutRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\Rollout> |
|
updateRolloutKindAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\UpdateRolloutKindRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\SaasPlatform\SaasServiceMgmt\V1\RolloutKind> |
|
getLocationAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Location\Location> |
|
listLocationsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
static::locationName
Formats a string containing the fully-qualified path to represent a location resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted location resource. |
static::releaseName
Formats a string containing the fully-qualified path to represent a release resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
release |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted release resource. |
static::rolloutName
Formats a string containing the fully-qualified path to represent a rollout resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
rolloutId |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted rollout resource. |
static::rolloutKindName
Formats a string containing the fully-qualified path to represent a rollout_kind resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
rolloutKindId |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted rollout_kind resource. |
static::unitKindName
Formats a string containing the fully-qualified path to represent a unit_kind resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
unitKind |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted unit_kind resource. |
static::parseName
Parses a formatted name string and returns an associative array of the components in the name.
The following name formats are supported: Template: Pattern
- location: projects/{project}/locations/{location}
- release: projects/{project}/locations/{location}/releases/{release}
- rollout: projects/{project}/locations/{location}/rollouts/{rollout_id}
- rolloutKind: projects/{project}/locations/{location}/rolloutKinds/{rollout_kind_id}
- unitKind: projects/{project}/locations/{location}/unitKinds/{unit_kind}
The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.
| Parameters | |
|---|---|
| Name | Description |
formattedName |
string
The formatted name string |
template |
?string
Optional name of template to match |
| Returns | |
|---|---|
| Type | Description |
array |
An associative array from name component IDs to component values. |