class ProjectsInstanceConfigs extends Resource (View source)

The "instanceConfigs" collection of methods.

Typical usage is:

 $spannerService = new Google\Service\Spanner(...);
 $instanceConfigs = $spannerService->projects_instanceConfigs;

Methods

create(string $parent, CreateInstanceConfigRequest $postBody, array $optParams = [])

Creates an instance configuration and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance config. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS. Immediately after the request returns: The instance configuration is readable via the API, with all requested attributes. The instance config's reconciling field is set to true. Its state is CREATING. While the operation is pending: Cancelling the operation renders the instance configuration immediately unreadable via the API. Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected. Upon completion of the returned operation: Instances can be created using the instance configuration. * The instance config's reconciling field becomes false. Its state becomes READY. The returned long-running operation will have a name of the format /operations/ and can be used to track creation of the instance config. The metadata field type is CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires spanner.instanceConfigs.create permission on the resource parent.

delete(string $name, array $optParams = [])

Deletes the instance config. Deletion is only allowed when no instances are using the configuration. If any instances are using the config, returns FAILED_PRECONDITION. Only user-managed configurations can be deleted.

get(string $name, array $optParams = [])

Gets information about a particular instance configuration.

listProjectsInstanceConfigs(string $parent, array $optParams = [])

Lists the supported instance configurations for a given project. Returns both Google-managed configurations and user-managed configurations.

patch(string $name, UpdateInstanceConfigRequest $postBody, array $optParams = [])

Updates an instance config. The returned long-running operation can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns NOT_FOUND. Only user-managed configurations can be updated. Immediately after the request returns: The instance config's reconciling field is set to true. While the operation is pending: Cancelling the operation sets its metadata's cancel_time. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a CANCELLED status. All other attempts to modify the instance configuration are rejected. Reading the instance configuration via the API continues to give the pre-request values. Upon completion of the returned operation: Creating instances using the instance configuration uses the new values. The instance config's new values are readable via the API. * The instance config's reconciling field becomes false. The returned long-running operation will have a name of the format /operations/ and can be used to track the instance configuration modification. The metadata field type is UpdateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires spanner.instanceConfigs.update permission on the resource name.

Details

Operation create(string $parent, CreateInstanceConfigRequest $postBody, array $optParams = [])

Creates an instance configuration and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance config. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS. Immediately after the request returns: The instance configuration is readable via the API, with all requested attributes. The instance config's reconciling field is set to true. Its state is CREATING. While the operation is pending: Cancelling the operation renders the instance configuration immediately unreadable via the API. Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected. Upon completion of the returned operation: Instances can be created using the instance configuration. * The instance config's reconciling field becomes false. Its state becomes READY. The returned long-running operation will have a name of the format /operations/ and can be used to track creation of the instance config. The metadata field type is CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires spanner.instanceConfigs.create permission on the resource parent.

(instanceConfigs.create)

Parameters

string $parent

Required. The name of the project in which to create the instance config. Values are of the form projects/.

CreateInstanceConfigRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

SpannerEmpty delete(string $name, array $optParams = [])

Deletes the instance config. Deletion is only allowed when no instances are using the configuration. If any instances are using the config, returns FAILED_PRECONDITION. Only user-managed configurations can be deleted.

Authorization requires spanner.instanceConfigs.delete permission on the resource name. (instanceConfigs.delete)

Parameters

string $name

Required. The name of the instance configuration to be deleted. Values are of the form projects//instanceConfigs/

array $optParams

Optional parameters.

Return Value

SpannerEmpty

Exceptions

Exception

InstanceConfig get(string $name, array $optParams = [])

Gets information about a particular instance configuration.

(instanceConfigs.get)

Parameters

string $name

Required. The name of the requested instance configuration. Values are of the form projects//instanceConfigs/.

array $optParams

Optional parameters.

Return Value

InstanceConfig

Exceptions

Exception

ListInstanceConfigsResponse listProjectsInstanceConfigs(string $parent, array $optParams = [])

Lists the supported instance configurations for a given project. Returns both Google-managed configurations and user-managed configurations.

(instanceConfigs.listProjectsInstanceConfigs)

Parameters

string $parent

Required. The name of the project for which a list of supported instance configurations is requested. Values are of the form projects/.

array $optParams

Optional parameters.

Return Value

ListInstanceConfigsResponse

Exceptions

Exception

Operation patch(string $name, UpdateInstanceConfigRequest $postBody, array $optParams = [])

Updates an instance config. The returned long-running operation can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns NOT_FOUND. Only user-managed configurations can be updated. Immediately after the request returns: The instance config's reconciling field is set to true. While the operation is pending: Cancelling the operation sets its metadata's cancel_time. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a CANCELLED status. All other attempts to modify the instance configuration are rejected. Reading the instance configuration via the API continues to give the pre-request values. Upon completion of the returned operation: Creating instances using the instance configuration uses the new values. The instance config's new values are readable via the API. * The instance config's reconciling field becomes false. The returned long-running operation will have a name of the format /operations/ and can be used to track the instance configuration modification. The metadata field type is UpdateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires spanner.instanceConfigs.update permission on the resource name.

(instanceConfigs.patch)

Parameters

string $name

A unique identifier for the instance configuration. Values are of the form projects//instanceConfigs/a-z*. User instance configuration must start with custom-.

UpdateInstanceConfigRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception