Class ConfigClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet 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 as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ConfigClient configClient = ConfigClient.create()) {
DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
Deployment response = configClient.getDeployment(name);
}
Note: close() needs to be called on the ConfigClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
ListDeployments |
Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDeployment |
Gets details about a [Deployment][google.cloud.config.v1.Deployment]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDeployment |
Creates a [Deployment][google.cloud.config.v1.Deployment]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDeployment |
Updates a [Deployment][google.cloud.config.v1.Deployment]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDeployment |
Deletes a [Deployment][google.cloud.config.v1.Deployment]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListRevisions |
Lists [Revision][google.cloud.config.v1.Revision]s of a deployment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetRevision |
Gets details about a [Revision][google.cloud.config.v1.Revision]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetResource |
Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListResources |
Lists [Resources][google.cloud.config.v1.Resource] in a given revision. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ExportDeploymentStatefile |
Exports Terraform state file from a given deployment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ExportRevisionStatefile |
Exports Terraform state file from a given revision. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ImportStatefile |
Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteStatefile |
Deletes Terraform state file in a given deployment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
LockDeployment |
Locks a deployment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UnlockDeployment |
Unlocks a locked deployment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ExportLockInfo |
Exports the lock info on a locked deployment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreatePreview |
Creates a [Preview][google.cloud.config.v1.Preview]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetPreview |
Gets details about a [Preview][google.cloud.config.v1.Preview]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListPreviews |
Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeletePreview |
Deletes a [Preview][google.cloud.config.v1.Preview]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ExportPreviewResult |
Export [Preview][google.cloud.config.v1.Preview] results. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTerraformVersions |
Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTerraformVersion |
Gets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListResourceChanges |
Lists ResourceChanges for a given preview. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetResourceChange |
Get a ResourceChange for a given preview. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListResourceDrifts |
List ResourceDrifts for a given preview. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetResourceDrift |
Get a ResourceDrift for a given preview. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAutoMigrationConfig |
Get the AutoMigrationConfig for a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateAutoMigrationConfig |
Updates the AutoMigrationConfig for a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDeploymentGroup |
Get a DeploymentGroup for a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDeploymentGroup |
Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDeploymentGroup |
Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDeploymentGroup |
Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDeploymentGroups |
List DeploymentGroups for a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ProvisionDeploymentGroup |
Provisions a deployment group. NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
|
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeprovisionDeploymentGroup |
Deprovisions a deployment group. NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
|
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDeploymentGroupRevision |
Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDeploymentGroupRevisions |
Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field: * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
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 parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of ConfigSettings to create(). For example:
To customize credentials:
// This snippet 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 as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ConfigSettings configSettings =
ConfigSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ConfigClient configClient = ConfigClient.create(configSettings);
To customize the endpoint:
// This snippet 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 as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ConfigSettings configSettings = ConfigSettings.newBuilder().setEndpoint(myEndpoint).build();
ConfigClient configClient = ConfigClient.create(configSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet 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 as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ConfigSettings configSettings = ConfigSettings.newHttpJsonBuilder().build();
ConfigClient configClient = ConfigClient.create(configSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConfigClient(ConfigSettings settings) Constructs an instance of ConfigClient, using the given settings.protectedConfigClient(ConfigStub stub) -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final ConfigClientcreate()Constructs an instance of ConfigClient with default settings.static final ConfigClientcreate(ConfigSettings settings) Constructs an instance of ConfigClient, using the given settings.static final ConfigClientcreate(ConfigStub stub) Constructs an instance of ConfigClient, using the given stub for making calls.Creates a [Deployment][google.cloud.config.v1.Deployment].createDeploymentAsync(LocationName parent, Deployment deployment, String deploymentId) Creates a [Deployment][google.cloud.config.v1.Deployment].createDeploymentAsync(String parent, Deployment deployment, String deploymentId) Creates a [Deployment][google.cloud.config.v1.Deployment].Creates a [Deployment][google.cloud.config.v1.Deployment].Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.createDeploymentGroupAsync(LocationName parent, DeploymentGroup deploymentGroup, String deploymentGroupId) Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.createDeploymentGroupAsync(String parent, DeploymentGroup deploymentGroup, String deploymentGroupId) Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.Creates a [Deployment][google.cloud.config.v1.Deployment].createPreviewAsync(CreatePreviewRequest request) Creates a [Preview][google.cloud.config.v1.Preview].createPreviewAsync(LocationName parent, Preview preview) Creates a [Preview][google.cloud.config.v1.Preview].createPreviewAsync(String parent, Preview preview) Creates a [Preview][google.cloud.config.v1.Preview].Creates a [Preview][google.cloud.config.v1.Preview].Creates a [Preview][google.cloud.config.v1.Preview].Deletes a [Deployment][google.cloud.config.v1.Deployment].Deletes a [Deployment][google.cloud.config.v1.Deployment].deleteDeploymentAsync(String name) Deletes a [Deployment][google.cloud.config.v1.Deployment].Deletes a [Deployment][google.cloud.config.v1.Deployment].Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Deletes a [Deployment][google.cloud.config.v1.Deployment].deletePreviewAsync(DeletePreviewRequest request) Deletes a [Preview][google.cloud.config.v1.Preview].Deletes a [Preview][google.cloud.config.v1.Preview].deletePreviewAsync(String name) Deletes a [Preview][google.cloud.config.v1.Preview].Deletes a [Preview][google.cloud.config.v1.Preview].Deletes a [Preview][google.cloud.config.v1.Preview].final voiddeleteStatefile(DeleteStatefileRequest request) Deletes Terraform state file in a given deployment.final voidDeletes Terraform state file in a given deployment.final voiddeleteStatefile(String name) Deletes Terraform state file in a given deployment.final UnaryCallable<DeleteStatefileRequest,com.google.protobuf.Empty> Deletes Terraform state file in a given deployment.Deprovisions a deployment group.Deprovisions a deployment group.Deprovisions a deployment group.Deprovisions a deployment group.Deprovisions a deployment group.final StatefileExports Terraform state file from a given deployment.Exports Terraform state file from a given deployment.final LockInfoexportLockInfo(DeploymentName name) Exports the lock info on a locked deployment.final LockInfoexportLockInfo(ExportLockInfoRequest request) Exports the lock info on a locked deployment.final LockInfoexportLockInfo(String name) Exports the lock info on a locked deployment.Exports the lock info on a locked deployment.Export [Preview][google.cloud.config.v1.Preview] results.Export [Preview][google.cloud.config.v1.Preview] results.final StatefileExports Terraform state file from a given revision.Exports Terraform state file from a given revision.final AutoMigrationConfigGet the AutoMigrationConfig for a given project and location.final AutoMigrationConfigGet the AutoMigrationConfig for a given project and location.final AutoMigrationConfiggetAutoMigrationConfig(String name) Get the AutoMigrationConfig for a given project and location.Get the AutoMigrationConfig for a given project and location.final DeploymentgetDeployment(DeploymentName name) Gets details about a [Deployment][google.cloud.config.v1.Deployment].final DeploymentgetDeployment(GetDeploymentRequest request) Gets details about a [Deployment][google.cloud.config.v1.Deployment].final DeploymentgetDeployment(String name) Gets details about a [Deployment][google.cloud.config.v1.Deployment].Gets details about a [Deployment][google.cloud.config.v1.Deployment].final DeploymentGroupGet a DeploymentGroup for a given project and location.final DeploymentGroupGet a DeploymentGroup for a given project and location.final DeploymentGroupgetDeploymentGroup(String name) Get a DeploymentGroup for a given project and location.Get a DeploymentGroup for a given project and location.final DeploymentGroupRevisionGets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].final DeploymentGroupRevisionGets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].final DeploymentGroupRevisionGets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PreviewgetPreview(GetPreviewRequest request) Gets details about a [Preview][google.cloud.config.v1.Preview].final PreviewgetPreview(PreviewName name) Gets details about a [Preview][google.cloud.config.v1.Preview].final PreviewgetPreview(String name) Gets details about a [Preview][google.cloud.config.v1.Preview].Gets details about a [Preview][google.cloud.config.v1.Preview].final ResourcegetResource(GetResourceRequest request) Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager.final ResourcegetResource(ResourceName name) Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager.final ResourcegetResource(String name) Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager.Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager.final ResourceChangeGet a ResourceChange for a given preview.final ResourceChangeGet a ResourceChange for a given preview.final ResourceChangegetResourceChange(String name) Get a ResourceChange for a given preview.Get a ResourceChange for a given preview.final ResourceDriftgetResourceDrift(GetResourceDriftRequest request) Get a ResourceDrift for a given preview.final ResourceDriftGet a ResourceDrift for a given preview.final ResourceDriftgetResourceDrift(String name) Get a ResourceDrift for a given preview.Get a ResourceDrift for a given preview.final RevisiongetRevision(GetRevisionRequest request) Gets details about a [Revision][google.cloud.config.v1.Revision].final RevisiongetRevision(RevisionName name) Gets details about a [Revision][google.cloud.config.v1.Revision].final RevisiongetRevision(String name) Gets details about a [Revision][google.cloud.config.v1.Revision].Gets details about a [Revision][google.cloud.config.v1.Revision].final ConfigSettingsgetStub()final TerraformVersionGets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion].final TerraformVersionGets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion].final TerraformVersiongetTerraformVersion(String name) Gets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion].Gets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion].final StatefileimportStatefile(DeploymentName parent, long lockId) Imports Terraform state file in a given deployment.final StatefileimportStatefile(ImportStatefileRequest request) Imports Terraform state file in a given deployment.final StatefileimportStatefile(String parent, long lockId) Imports Terraform state file in a given deployment.Imports Terraform state file in a given deployment.booleanbooleanLists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].listDeploymentGroupRevisions(String parent) Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].final UnaryCallable<ListDeploymentGroupRevisionsRequest,ConfigClient.ListDeploymentGroupRevisionsPagedResponse> Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].List DeploymentGroups for a given project and location.listDeploymentGroups(LocationName parent) List DeploymentGroups for a given project and location.listDeploymentGroups(String parent) List DeploymentGroups for a given project and location.List DeploymentGroups for a given project and location.List DeploymentGroups for a given project and location.listDeployments(ListDeploymentsRequest request) Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.listDeployments(LocationName parent) Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.listDeployments(String parent) Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.listPreviews(ListPreviewsRequest request) Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.listPreviews(LocationName parent) Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.listPreviews(String parent) Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.Lists ResourceChanges for a given preview.listResourceChanges(PreviewName parent) Lists ResourceChanges for a given preview.listResourceChanges(String parent) Lists ResourceChanges for a given preview.Lists ResourceChanges for a given preview.Lists ResourceChanges for a given preview.List ResourceDrifts for a given preview.listResourceDrifts(PreviewName parent) List ResourceDrifts for a given preview.listResourceDrifts(String parent) List ResourceDrifts for a given preview.List ResourceDrifts for a given preview.List ResourceDrifts for a given preview.listResources(ListResourcesRequest request) Lists [Resources][google.cloud.config.v1.Resource] in a given revision.listResources(RevisionName parent) Lists [Resources][google.cloud.config.v1.Resource] in a given revision.listResources(String parent) Lists [Resources][google.cloud.config.v1.Resource] in a given revision.Lists [Resources][google.cloud.config.v1.Resource] in a given revision.Lists [Resources][google.cloud.config.v1.Resource] in a given revision.listRevisions(DeploymentName parent) Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.listRevisions(ListRevisionsRequest request) Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.listRevisions(String parent) Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.listTerraformVersions(LocationName parent) Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.listTerraformVersions(String parent) Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.Locks a deployment.lockDeploymentAsync(LockDeploymentRequest request) Locks a deployment.lockDeploymentAsync(String name) Locks a deployment.Locks a deployment.Locks a deployment.Provisions a deployment group.Provisions a deployment group.Provisions a deployment group.Provisions a deployment group.Provisions a deployment group.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.unlockDeploymentAsync(DeploymentName name, long lockId) Unlocks a locked deployment.Unlocks a locked deployment.unlockDeploymentAsync(String name, long lockId) Unlocks a locked deployment.Unlocks a locked deployment.Unlocks a locked deployment.updateAutoMigrationConfigAsync(AutoMigrationConfig autoMigrationConfig, com.google.protobuf.FieldMask updateMask) Updates the AutoMigrationConfig for a given project and location.Updates the AutoMigrationConfig for a given project and location.Updates the AutoMigrationConfig for a given project and location.Updates the AutoMigrationConfig for a given project and location.updateDeploymentAsync(Deployment deployment, com.google.protobuf.FieldMask updateMask) Updates a [Deployment][google.cloud.config.v1.Deployment].Updates a [Deployment][google.cloud.config.v1.Deployment].Updates a [Deployment][google.cloud.config.v1.Deployment].updateDeploymentGroupAsync(DeploymentGroup deploymentGroup, com.google.protobuf.FieldMask updateMask) Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Updates a [Deployment][google.cloud.config.v1.Deployment].
-
Constructor Details
-
ConfigClient
Constructs an instance of ConfigClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
ConfigClient
-
-
Method Details
-
create
Constructs an instance of ConfigClient with default settings.- Throws:
IOException
-
create
Constructs an instance of ConfigClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of ConfigClient, using the given stub for making calls. This is for advanced usage - prefer using create(ConfigSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listDeployments
Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Deployment element : configClient.listDeployments(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the Deployments are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.- Throws:
ApiException- if the remote call fails
-
listDeployments
Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Deployment element : configClient.listDeployments(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the Deployments are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.- Throws:
ApiException- if the remote call fails
-
listDeployments
public final ConfigClient.ListDeploymentsPagedResponse listDeployments(ListDeploymentsRequest request) Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListDeploymentsRequest request = ListDeploymentsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Deployment element : configClient.listDeployments(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listDeploymentsPagedCallable
public final UnaryCallable<ListDeploymentsRequest,ConfigClient.ListDeploymentsPagedResponse> listDeploymentsPagedCallable()Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListDeploymentsRequest request = ListDeploymentsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Deployment> future = configClient.listDeploymentsPagedCallable().futureCall(request); // Do something. for (Deployment element : future.get().iterateAll()) { // doThingsWith(element); } } -
listDeploymentsCallable
public final UnaryCallable<ListDeploymentsRequest,ListDeploymentsResponse> listDeploymentsCallable()Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListDeploymentsRequest request = ListDeploymentsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListDeploymentsResponse response = configClient.listDeploymentsCallable().call(request); for (Deployment element : response.getDeploymentsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getDeployment
Gets details about a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); Deployment response = configClient.getDeployment(name); }- Parameters:
name- Required. The name of the deployment. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
getDeployment
Gets details about a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); Deployment response = configClient.getDeployment(name); }- Parameters:
name- Required. The name of the deployment. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
getDeployment
Gets details about a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetDeploymentRequest request = GetDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .build(); Deployment response = configClient.getDeployment(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getDeploymentCallable
Gets details about a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetDeploymentRequest request = GetDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .build(); ApiFuture<Deployment> future = configClient.getDeploymentCallable().futureCall(request); // Do something. Deployment response = future.get(); } -
createDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> createDeploymentAsync(LocationName parent, Deployment deployment, String deploymentId) Creates a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Deployment deployment = Deployment.newBuilder().build(); String deploymentId = "deploymentId-136894784"; Deployment response = configClient.createDeploymentAsync(parent, deployment, deploymentId).get(); }- Parameters:
parent- Required. The parent in whose context the Deployment is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.deployment- Required. [Deployment][google.cloud.config.v1.Deployment] resource to be created.deploymentId- Required. The Deployment ID.- Throws:
ApiException- if the remote call fails
-
createDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> createDeploymentAsync(String parent, Deployment deployment, String deploymentId) Creates a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Deployment deployment = Deployment.newBuilder().build(); String deploymentId = "deploymentId-136894784"; Deployment response = configClient.createDeploymentAsync(parent, deployment, deploymentId).get(); }- Parameters:
parent- Required. The parent in whose context the Deployment is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.deployment- Required. [Deployment][google.cloud.config.v1.Deployment] resource to be created.deploymentId- Required. The Deployment ID.- Throws:
ApiException- if the remote call fails
-
createDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> createDeploymentAsync(CreateDeploymentRequest request) Creates a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { CreateDeploymentRequest request = CreateDeploymentRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDeploymentId("deploymentId-136894784") .setDeployment(Deployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); Deployment response = configClient.createDeploymentAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createDeploymentOperationCallable
public final OperationCallable<CreateDeploymentRequest,Deployment, createDeploymentOperationCallable()OperationMetadata> Creates a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { CreateDeploymentRequest request = CreateDeploymentRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDeploymentId("deploymentId-136894784") .setDeployment(Deployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Deployment, OperationMetadata> future = configClient.createDeploymentOperationCallable().futureCall(request); // Do something. Deployment response = future.get(); } -
createDeploymentCallable
Creates a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { CreateDeploymentRequest request = CreateDeploymentRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDeploymentId("deploymentId-136894784") .setDeployment(Deployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = configClient.createDeploymentCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> updateDeploymentAsync(Deployment deployment, com.google.protobuf.FieldMask updateMask) Updates a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { Deployment deployment = Deployment.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Deployment response = configClient.updateDeploymentAsync(deployment, updateMask).get(); }- Parameters:
deployment- Required. [Deployment][google.cloud.config.v1.Deployment] to update.The deployment's `name` field is used to identify the resource to be updated. Format: `projects/{project}/locations/{location}/deployments/{deployment}`
updateMask- Optional. Field mask used to specify the fields to be overwritten in the Deployment resource by the update.The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
- Throws:
ApiException- if the remote call fails
-
updateDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> updateDeploymentAsync(UpdateDeploymentRequest request) Updates a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UpdateDeploymentRequest request = UpdateDeploymentRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDeployment(Deployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); Deployment response = configClient.updateDeploymentAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateDeploymentOperationCallable
public final OperationCallable<UpdateDeploymentRequest,Deployment, updateDeploymentOperationCallable()OperationMetadata> Updates a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UpdateDeploymentRequest request = UpdateDeploymentRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDeployment(Deployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Deployment, OperationMetadata> future = configClient.updateDeploymentOperationCallable().futureCall(request); // Do something. Deployment response = future.get(); } -
updateDeploymentCallable
Updates a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UpdateDeploymentRequest request = UpdateDeploymentRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDeployment(Deployment.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = configClient.updateDeploymentCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> deleteDeploymentAsync(DeploymentName name) Deletes a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); Deployment response = configClient.deleteDeploymentAsync(name).get(); }- Parameters:
name- Required. The name of the Deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
deleteDeploymentAsync
Deletes a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); Deployment response = configClient.deleteDeploymentAsync(name).get(); }- Parameters:
name- Required. The name of the Deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
deleteDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> deleteDeploymentAsync(DeleteDeploymentRequest request) Deletes a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeleteDeploymentRequest request = DeleteDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); Deployment response = configClient.deleteDeploymentAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteDeploymentOperationCallable
public final OperationCallable<DeleteDeploymentRequest,Deployment, deleteDeploymentOperationCallable()OperationMetadata> Deletes a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeleteDeploymentRequest request = DeleteDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); OperationFuture<Deployment, OperationMetadata> future = configClient.deleteDeploymentOperationCallable().futureCall(request); // Do something. Deployment response = future.get(); } -
deleteDeploymentCallable
Deletes a [Deployment][google.cloud.config.v1.Deployment].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeleteDeploymentRequest request = DeleteDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); ApiFuture<Operation> future = configClient.deleteDeploymentCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listRevisions
Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); for (Revision element : configClient.listRevisions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the Revisions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
listRevisions
Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); for (Revision element : configClient.listRevisions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the Revisions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
listRevisions
Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListRevisionsRequest request = ListRevisionsRequest.newBuilder() .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Revision element : configClient.listRevisions(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listRevisionsPagedCallable
public final UnaryCallable<ListRevisionsRequest,ConfigClient.ListRevisionsPagedResponse> listRevisionsPagedCallable()Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListRevisionsRequest request = ListRevisionsRequest.newBuilder() .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Revision> future = configClient.listRevisionsPagedCallable().futureCall(request); // Do something. for (Revision element : future.get().iterateAll()) { // doThingsWith(element); } } -
listRevisionsCallable
Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListRevisionsRequest request = ListRevisionsRequest.newBuilder() .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListRevisionsResponse response = configClient.listRevisionsCallable().call(request); for (Revision element : response.getRevisionsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getRevision
Gets details about a [Revision][google.cloud.config.v1.Revision].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { RevisionName name = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); Revision response = configClient.getRevision(name); }- Parameters:
name- Required. The name of the Revision in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.- Throws:
ApiException- if the remote call fails
-
getRevision
Gets details about a [Revision][google.cloud.config.v1.Revision].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString(); Revision response = configClient.getRevision(name); }- Parameters:
name- Required. The name of the Revision in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.- Throws:
ApiException- if the remote call fails
-
getRevision
Gets details about a [Revision][google.cloud.config.v1.Revision].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetRevisionRequest request = GetRevisionRequest.newBuilder() .setName( RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") .toString()) .build(); Revision response = configClient.getRevision(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getRevisionCallable
Gets details about a [Revision][google.cloud.config.v1.Revision].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetRevisionRequest request = GetRevisionRequest.newBuilder() .setName( RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") .toString()) .build(); ApiFuture<Revision> future = configClient.getRevisionCallable().futureCall(request); // Do something. Revision response = future.get(); } -
getResource
Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ResourceName name = ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]"); Resource response = configClient.getResource(name); }- Parameters:
name- Required. The name of the Resource in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.- Throws:
ApiException- if the remote call fails
-
getResource
Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]") .toString(); Resource response = configClient.getResource(name); }- Parameters:
name- Required. The name of the Resource in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.- Throws:
ApiException- if the remote call fails
-
getResource
Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetResourceRequest request = GetResourceRequest.newBuilder() .setName( ResourceName.of( "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]") .toString()) .build(); Resource response = configClient.getResource(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getResourceCallable
Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetResourceRequest request = GetResourceRequest.newBuilder() .setName( ResourceName.of( "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]") .toString()) .build(); ApiFuture<Resource> future = configClient.getResourceCallable().futureCall(request); // Do something. Resource response = future.get(); } -
listResources
Lists [Resources][google.cloud.config.v1.Resource] in a given revision.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { RevisionName parent = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); for (Resource element : configClient.listResources(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the Resources are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.- Throws:
ApiException- if the remote call fails
-
listResources
Lists [Resources][google.cloud.config.v1.Resource] in a given revision.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString(); for (Resource element : configClient.listResources(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the Resources are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.- Throws:
ApiException- if the remote call fails
-
listResources
Lists [Resources][google.cloud.config.v1.Resource] in a given revision.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListResourcesRequest request = ListResourcesRequest.newBuilder() .setParent( RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") .toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Resource element : configClient.listResources(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listResourcesPagedCallable
public final UnaryCallable<ListResourcesRequest,ConfigClient.ListResourcesPagedResponse> listResourcesPagedCallable()Lists [Resources][google.cloud.config.v1.Resource] in a given revision.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListResourcesRequest request = ListResourcesRequest.newBuilder() .setParent( RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") .toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Resource> future = configClient.listResourcesPagedCallable().futureCall(request); // Do something. for (Resource element : future.get().iterateAll()) { // doThingsWith(element); } } -
listResourcesCallable
Lists [Resources][google.cloud.config.v1.Resource] in a given revision.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListResourcesRequest request = ListResourcesRequest.newBuilder() .setParent( RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") .toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListResourcesResponse response = configClient.listResourcesCallable().call(request); for (Resource element : response.getResourcesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
exportDeploymentStatefile
Exports Terraform state file from a given deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ExportDeploymentStatefileRequest request = ExportDeploymentStatefileRequest.newBuilder() .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setDraft(true) .build(); Statefile response = configClient.exportDeploymentStatefile(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
exportDeploymentStatefileCallable
public final UnaryCallable<ExportDeploymentStatefileRequest,Statefile> exportDeploymentStatefileCallable()Exports Terraform state file from a given deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ExportDeploymentStatefileRequest request = ExportDeploymentStatefileRequest.newBuilder() .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setDraft(true) .build(); ApiFuture<Statefile> future = configClient.exportDeploymentStatefileCallable().futureCall(request); // Do something. Statefile response = future.get(); } -
exportRevisionStatefile
Exports Terraform state file from a given revision.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ExportRevisionStatefileRequest request = ExportRevisionStatefileRequest.newBuilder() .setParent( RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") .toString()) .build(); Statefile response = configClient.exportRevisionStatefile(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
exportRevisionStatefileCallable
public final UnaryCallable<ExportRevisionStatefileRequest,Statefile> exportRevisionStatefileCallable()Exports Terraform state file from a given revision.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ExportRevisionStatefileRequest request = ExportRevisionStatefileRequest.newBuilder() .setParent( RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") .toString()) .build(); ApiFuture<Statefile> future = configClient.exportRevisionStatefileCallable().futureCall(request); // Do something. Statefile response = future.get(); } -
importStatefile
Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); long lockId = 338696367; Statefile response = configClient.importStatefile(parent, lockId); }- Parameters:
parent- Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.lockId- Required. Lock ID of the lock file to verify that the user who is importing the state file previously locked the Deployment.- Throws:
ApiException- if the remote call fails
-
importStatefile
Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); long lockId = 338696367; Statefile response = configClient.importStatefile(parent, lockId); }- Parameters:
parent- Required. The parent in whose context the statefile is listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.lockId- Required. Lock ID of the lock file to verify that the user who is importing the state file previously locked the Deployment.- Throws:
ApiException- if the remote call fails
-
importStatefile
Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ImportStatefileRequest request = ImportStatefileRequest.newBuilder() .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setLockId(338696367) .setSkipDraft(true) .build(); Statefile response = configClient.importStatefile(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
importStatefileCallable
Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ImportStatefileRequest request = ImportStatefileRequest.newBuilder() .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setLockId(338696367) .setSkipDraft(true) .build(); ApiFuture<Statefile> future = configClient.importStatefileCallable().futureCall(request); // Do something. Statefile response = future.get(); } -
deleteStatefile
Deletes Terraform state file in a given deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); configClient.deleteStatefile(name); }- Parameters:
name- Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
deleteStatefile
Deletes Terraform state file in a given deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); configClient.deleteStatefile(name); }- Parameters:
name- Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
deleteStatefile
Deletes Terraform state file in a given deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeleteStatefileRequest request = DeleteStatefileRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setLockId(338696367) .build(); configClient.deleteStatefile(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteStatefileCallable
public final UnaryCallable<DeleteStatefileRequest,com.google.protobuf.Empty> deleteStatefileCallable()Deletes Terraform state file in a given deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeleteStatefileRequest request = DeleteStatefileRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setLockId(338696367) .build(); ApiFuture<Empty> future = configClient.deleteStatefileCallable().futureCall(request); // Do something. future.get(); } -
lockDeploymentAsync
Locks a deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); Deployment response = configClient.lockDeploymentAsync(name).get(); }- Parameters:
name- Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
lockDeploymentAsync
Locks a deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); Deployment response = configClient.lockDeploymentAsync(name).get(); }- Parameters:
name- Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
lockDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> lockDeploymentAsync(LockDeploymentRequest request) Locks a deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { LockDeploymentRequest request = LockDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .build(); Deployment response = configClient.lockDeploymentAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
lockDeploymentOperationCallable
public final OperationCallable<LockDeploymentRequest,Deployment, lockDeploymentOperationCallable()OperationMetadata> Locks a deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { LockDeploymentRequest request = LockDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .build(); OperationFuture<Deployment, OperationMetadata> future = configClient.lockDeploymentOperationCallable().futureCall(request); // Do something. Deployment response = future.get(); } -
lockDeploymentCallable
Locks a deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { LockDeploymentRequest request = LockDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .build(); ApiFuture<Operation> future = configClient.lockDeploymentCallable().futureCall(request); // Do something. Operation response = future.get(); } -
unlockDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> unlockDeploymentAsync(DeploymentName name, long lockId) Unlocks a locked deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); long lockId = 338696367; Deployment response = configClient.unlockDeploymentAsync(name, lockId).get(); }- Parameters:
name- Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.lockId- Required. Lock ID of the lock file to be unlocked.- Throws:
ApiException- if the remote call fails
-
unlockDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> unlockDeploymentAsync(String name, long lockId) Unlocks a locked deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); long lockId = 338696367; Deployment response = configClient.unlockDeploymentAsync(name, lockId).get(); }- Parameters:
name- Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.lockId- Required. Lock ID of the lock file to be unlocked.- Throws:
ApiException- if the remote call fails
-
unlockDeploymentAsync
public final OperationFuture<Deployment,OperationMetadata> unlockDeploymentAsync(UnlockDeploymentRequest request) Unlocks a locked deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UnlockDeploymentRequest request = UnlockDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setLockId(338696367) .build(); Deployment response = configClient.unlockDeploymentAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
unlockDeploymentOperationCallable
public final OperationCallable<UnlockDeploymentRequest,Deployment, unlockDeploymentOperationCallable()OperationMetadata> Unlocks a locked deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UnlockDeploymentRequest request = UnlockDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setLockId(338696367) .build(); OperationFuture<Deployment, OperationMetadata> future = configClient.unlockDeploymentOperationCallable().futureCall(request); // Do something. Deployment response = future.get(); } -
unlockDeploymentCallable
Unlocks a locked deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UnlockDeploymentRequest request = UnlockDeploymentRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setLockId(338696367) .build(); ApiFuture<Operation> future = configClient.unlockDeploymentCallable().futureCall(request); // Do something. Operation response = future.get(); } -
exportLockInfo
Exports the lock info on a locked deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); LockInfo response = configClient.exportLockInfo(name); }- Parameters:
name- Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
exportLockInfo
Exports the lock info on a locked deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); LockInfo response = configClient.exportLockInfo(name); }- Parameters:
name- Required. The name of the deployment in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.- Throws:
ApiException- if the remote call fails
-
exportLockInfo
Exports the lock info on a locked deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ExportLockInfoRequest request = ExportLockInfoRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .build(); LockInfo response = configClient.exportLockInfo(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
exportLockInfoCallable
Exports the lock info on a locked deployment.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ExportLockInfoRequest request = ExportLockInfoRequest.newBuilder() .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .build(); ApiFuture<LockInfo> future = configClient.exportLockInfoCallable().futureCall(request); // Do something. LockInfo response = future.get(); } -
createPreviewAsync
public final OperationFuture<Preview,OperationMetadata> createPreviewAsync(LocationName parent, Preview preview) Creates a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Preview preview = Preview.newBuilder().build(); Preview response = configClient.createPreviewAsync(parent, preview).get(); }- Parameters:
parent- Required. The parent in whose context the Preview is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.preview- Required. [Preview][google.cloud.config.v1.Preview] resource to be created.- Throws:
ApiException- if the remote call fails
-
createPreviewAsync
public final OperationFuture<Preview,OperationMetadata> createPreviewAsync(String parent, Preview preview) Creates a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Preview preview = Preview.newBuilder().build(); Preview response = configClient.createPreviewAsync(parent, preview).get(); }- Parameters:
parent- Required. The parent in whose context the Preview is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'.preview- Required. [Preview][google.cloud.config.v1.Preview] resource to be created.- Throws:
ApiException- if the remote call fails
-
createPreviewAsync
public final OperationFuture<Preview,OperationMetadata> createPreviewAsync(CreatePreviewRequest request) Creates a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { CreatePreviewRequest request = CreatePreviewRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPreviewId("previewId-832627965") .setPreview(Preview.newBuilder().build()) .setRequestId("requestId693933066") .build(); Preview response = configClient.createPreviewAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createPreviewOperationCallable
public final OperationCallable<CreatePreviewRequest,Preview, createPreviewOperationCallable()OperationMetadata> Creates a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { CreatePreviewRequest request = CreatePreviewRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPreviewId("previewId-832627965") .setPreview(Preview.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Preview, OperationMetadata> future = configClient.createPreviewOperationCallable().futureCall(request); // Do something. Preview response = future.get(); } -
createPreviewCallable
Creates a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { CreatePreviewRequest request = CreatePreviewRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPreviewId("previewId-832627965") .setPreview(Preview.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = configClient.createPreviewCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getPreview
Gets details about a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { PreviewName name = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]"); Preview response = configClient.getPreview(name); }- Parameters:
name- Required. The name of the preview. Format: 'projects/{project_id}/locations/{location}/previews/{preview}'.- Throws:
ApiException- if the remote call fails
-
getPreview
Gets details about a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString(); Preview response = configClient.getPreview(name); }- Parameters:
name- Required. The name of the preview. Format: 'projects/{project_id}/locations/{location}/previews/{preview}'.- Throws:
ApiException- if the remote call fails
-
getPreview
Gets details about a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetPreviewRequest request = GetPreviewRequest.newBuilder() .setName(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .build(); Preview response = configClient.getPreview(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getPreviewCallable
Gets details about a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetPreviewRequest request = GetPreviewRequest.newBuilder() .setName(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .build(); ApiFuture<Preview> future = configClient.getPreviewCallable().futureCall(request); // Do something. Preview response = future.get(); } -
listPreviews
Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Preview element : configClient.listPreviews(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the Previews are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.- Throws:
ApiException- if the remote call fails
-
listPreviews
Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Preview element : configClient.listPreviews(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the Previews are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.- Throws:
ApiException- if the remote call fails
-
listPreviews
Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListPreviewsRequest request = ListPreviewsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Preview element : configClient.listPreviews(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listPreviewsPagedCallable
public final UnaryCallable<ListPreviewsRequest,ConfigClient.ListPreviewsPagedResponse> listPreviewsPagedCallable()Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListPreviewsRequest request = ListPreviewsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Preview> future = configClient.listPreviewsPagedCallable().futureCall(request); // Do something. for (Preview element : future.get().iterateAll()) { // doThingsWith(element); } } -
listPreviewsCallable
Lists [Preview][google.cloud.config.v1.Preview]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListPreviewsRequest request = ListPreviewsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListPreviewsResponse response = configClient.listPreviewsCallable().call(request); for (Preview element : response.getPreviewsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deletePreviewAsync
Deletes a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { PreviewName name = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]"); Preview response = configClient.deletePreviewAsync(name).get(); }- Parameters:
name- Required. The name of the Preview in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.- Throws:
ApiException- if the remote call fails
-
deletePreviewAsync
Deletes a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString(); Preview response = configClient.deletePreviewAsync(name).get(); }- Parameters:
name- Required. The name of the Preview in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.- Throws:
ApiException- if the remote call fails
-
deletePreviewAsync
public final OperationFuture<Preview,OperationMetadata> deletePreviewAsync(DeletePreviewRequest request) Deletes a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeletePreviewRequest request = DeletePreviewRequest.newBuilder() .setName(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .setRequestId("requestId693933066") .build(); Preview response = configClient.deletePreviewAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deletePreviewOperationCallable
public final OperationCallable<DeletePreviewRequest,Preview, deletePreviewOperationCallable()OperationMetadata> Deletes a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeletePreviewRequest request = DeletePreviewRequest.newBuilder() .setName(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Preview, OperationMetadata> future = configClient.deletePreviewOperationCallable().futureCall(request); // Do something. Preview response = future.get(); } -
deletePreviewCallable
Deletes a [Preview][google.cloud.config.v1.Preview].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeletePreviewRequest request = DeletePreviewRequest.newBuilder() .setName(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = configClient.deletePreviewCallable().futureCall(request); // Do something. Operation response = future.get(); } -
exportPreviewResult
Export [Preview][google.cloud.config.v1.Preview] results.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ExportPreviewResultRequest request = ExportPreviewResultRequest.newBuilder() .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .build(); ExportPreviewResultResponse response = configClient.exportPreviewResult(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
exportPreviewResultCallable
public final UnaryCallable<ExportPreviewResultRequest,ExportPreviewResultResponse> exportPreviewResultCallable()Export [Preview][google.cloud.config.v1.Preview] results.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ExportPreviewResultRequest request = ExportPreviewResultRequest.newBuilder() .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .build(); ApiFuture<ExportPreviewResultResponse> future = configClient.exportPreviewResultCallable().futureCall(request); // Do something. ExportPreviewResultResponse response = future.get(); } -
listTerraformVersions
public final ConfigClient.ListTerraformVersionsPagedResponse listTerraformVersions(LocationName parent) Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (TerraformVersion element : configClient.listTerraformVersions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the TerraformVersions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.- Throws:
ApiException- if the remote call fails
-
listTerraformVersions
Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (TerraformVersion element : configClient.listTerraformVersions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the TerraformVersions are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}'.- Throws:
ApiException- if the remote call fails
-
listTerraformVersions
public final ConfigClient.ListTerraformVersionsPagedResponse listTerraformVersions(ListTerraformVersionsRequest request) Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListTerraformVersionsRequest request = ListTerraformVersionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (TerraformVersion element : configClient.listTerraformVersions(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listTerraformVersionsPagedCallable
public final UnaryCallable<ListTerraformVersionsRequest,ConfigClient.ListTerraformVersionsPagedResponse> listTerraformVersionsPagedCallable()Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListTerraformVersionsRequest request = ListTerraformVersionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<TerraformVersion> future = configClient.listTerraformVersionsPagedCallable().futureCall(request); // Do something. for (TerraformVersion element : future.get().iterateAll()) { // doThingsWith(element); } } -
listTerraformVersionsCallable
public final UnaryCallable<ListTerraformVersionsRequest,ListTerraformVersionsResponse> listTerraformVersionsCallable()Lists [TerraformVersion][google.cloud.config.v1.TerraformVersion]s in a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListTerraformVersionsRequest request = ListTerraformVersionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListTerraformVersionsResponse response = configClient.listTerraformVersionsCallable().call(request); for (TerraformVersion element : response.getTerraformVersionsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getTerraformVersion
Gets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { TerraformVersionName name = TerraformVersionName.of("[PROJECT]", "[LOCATION]", "[TERRAFORM_VERSION]"); TerraformVersion response = configClient.getTerraformVersion(name); }- Parameters:
name- Required. The name of the TerraformVersion. Format: 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'- Throws:
ApiException- if the remote call fails
-
getTerraformVersion
Gets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = TerraformVersionName.of("[PROJECT]", "[LOCATION]", "[TERRAFORM_VERSION]").toString(); TerraformVersion response = configClient.getTerraformVersion(name); }- Parameters:
name- Required. The name of the TerraformVersion. Format: 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_version}'- Throws:
ApiException- if the remote call fails
-
getTerraformVersion
Gets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetTerraformVersionRequest request = GetTerraformVersionRequest.newBuilder() .setName( TerraformVersionName.of("[PROJECT]", "[LOCATION]", "[TERRAFORM_VERSION]") .toString()) .build(); TerraformVersion response = configClient.getTerraformVersion(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getTerraformVersionCallable
public final UnaryCallable<GetTerraformVersionRequest,TerraformVersion> getTerraformVersionCallable()Gets details about a [TerraformVersion][google.cloud.config.v1.TerraformVersion].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetTerraformVersionRequest request = GetTerraformVersionRequest.newBuilder() .setName( TerraformVersionName.of("[PROJECT]", "[LOCATION]", "[TERRAFORM_VERSION]") .toString()) .build(); ApiFuture<TerraformVersion> future = configClient.getTerraformVersionCallable().futureCall(request); // Do something. TerraformVersion response = future.get(); } -
listResourceChanges
Lists ResourceChanges for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { PreviewName parent = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]"); for (ResourceChange element : configClient.listResourceChanges(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the ResourceChanges are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.- Throws:
ApiException- if the remote call fails
-
listResourceChanges
Lists ResourceChanges for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString(); for (ResourceChange element : configClient.listResourceChanges(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the ResourceChanges are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.- Throws:
ApiException- if the remote call fails
-
listResourceChanges
public final ConfigClient.ListResourceChangesPagedResponse listResourceChanges(ListResourceChangesRequest request) Lists ResourceChanges for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListResourceChangesRequest request = ListResourceChangesRequest.newBuilder() .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (ResourceChange element : configClient.listResourceChanges(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listResourceChangesPagedCallable
public final UnaryCallable<ListResourceChangesRequest,ConfigClient.ListResourceChangesPagedResponse> listResourceChangesPagedCallable()Lists ResourceChanges for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListResourceChangesRequest request = ListResourceChangesRequest.newBuilder() .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<ResourceChange> future = configClient.listResourceChangesPagedCallable().futureCall(request); // Do something. for (ResourceChange element : future.get().iterateAll()) { // doThingsWith(element); } } -
listResourceChangesCallable
public final UnaryCallable<ListResourceChangesRequest,ListResourceChangesResponse> listResourceChangesCallable()Lists ResourceChanges for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListResourceChangesRequest request = ListResourceChangesRequest.newBuilder() .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListResourceChangesResponse response = configClient.listResourceChangesCallable().call(request); for (ResourceChange element : response.getResourceChangesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getResourceChange
Get a ResourceChange for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ResourceChangeName name = ResourceChangeName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_CHANGE]"); ResourceChange response = configClient.getResourceChange(name); }- Parameters:
name- Required. The name of the resource change to retrieve. Format: 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'.- Throws:
ApiException- if the remote call fails
-
getResourceChange
Get a ResourceChange for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = ResourceChangeName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_CHANGE]") .toString(); ResourceChange response = configClient.getResourceChange(name); }- Parameters:
name- Required. The name of the resource change to retrieve. Format: 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'.- Throws:
ApiException- if the remote call fails
-
getResourceChange
Get a ResourceChange for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetResourceChangeRequest request = GetResourceChangeRequest.newBuilder() .setName( ResourceChangeName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_CHANGE]") .toString()) .build(); ResourceChange response = configClient.getResourceChange(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getResourceChangeCallable
Get a ResourceChange for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetResourceChangeRequest request = GetResourceChangeRequest.newBuilder() .setName( ResourceChangeName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_CHANGE]") .toString()) .build(); ApiFuture<ResourceChange> future = configClient.getResourceChangeCallable().futureCall(request); // Do something. ResourceChange response = future.get(); } -
listResourceDrifts
List ResourceDrifts for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { PreviewName parent = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]"); for (ResourceDrift element : configClient.listResourceDrifts(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the ResourceDrifts are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.- Throws:
ApiException- if the remote call fails
-
listResourceDrifts
List ResourceDrifts for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString(); for (ResourceDrift element : configClient.listResourceDrifts(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent in whose context the ResourceDrifts are listed. The parent value is in the format: 'projects/{project_id}/locations/{location}/previews/{preview}'.- Throws:
ApiException- if the remote call fails
-
listResourceDrifts
public final ConfigClient.ListResourceDriftsPagedResponse listResourceDrifts(ListResourceDriftsRequest request) List ResourceDrifts for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListResourceDriftsRequest request = ListResourceDriftsRequest.newBuilder() .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (ResourceDrift element : configClient.listResourceDrifts(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listResourceDriftsPagedCallable
public final UnaryCallable<ListResourceDriftsRequest,ConfigClient.ListResourceDriftsPagedResponse> listResourceDriftsPagedCallable()List ResourceDrifts for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListResourceDriftsRequest request = ListResourceDriftsRequest.newBuilder() .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<ResourceDrift> future = configClient.listResourceDriftsPagedCallable().futureCall(request); // Do something. for (ResourceDrift element : future.get().iterateAll()) { // doThingsWith(element); } } -
listResourceDriftsCallable
public final UnaryCallable<ListResourceDriftsRequest,ListResourceDriftsResponse> listResourceDriftsCallable()List ResourceDrifts for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListResourceDriftsRequest request = ListResourceDriftsRequest.newBuilder() .setParent(PreviewName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListResourceDriftsResponse response = configClient.listResourceDriftsCallable().call(request); for (ResourceDrift element : response.getResourceDriftsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getResourceDrift
Get a ResourceDrift for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ResourceDriftName name = ResourceDriftName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_DRIFT]"); ResourceDrift response = configClient.getResourceDrift(name); }- Parameters:
name- Required. The name of the resource drift to retrieve. Format: 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'.- Throws:
ApiException- if the remote call fails
-
getResourceDrift
Get a ResourceDrift for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = ResourceDriftName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_DRIFT]") .toString(); ResourceDrift response = configClient.getResourceDrift(name); }- Parameters:
name- Required. The name of the resource drift to retrieve. Format: 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'.- Throws:
ApiException- if the remote call fails
-
getResourceDrift
Get a ResourceDrift for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetResourceDriftRequest request = GetResourceDriftRequest.newBuilder() .setName( ResourceDriftName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_DRIFT]") .toString()) .build(); ResourceDrift response = configClient.getResourceDrift(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getResourceDriftCallable
Get a ResourceDrift for a given preview.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetResourceDriftRequest request = GetResourceDriftRequest.newBuilder() .setName( ResourceDriftName.of("[PROJECT]", "[LOCATION]", "[PREVIEW]", "[RESOURCE_DRIFT]") .toString()) .build(); ApiFuture<ResourceDrift> future = configClient.getResourceDriftCallable().futureCall(request); // Do something. ResourceDrift response = future.get(); } -
getAutoMigrationConfig
Get the AutoMigrationConfig for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { AutoMigrationConfigName name = AutoMigrationConfigName.of("[PROJECT]", "[LOCATION]"); AutoMigrationConfig response = configClient.getAutoMigrationConfig(name); }- Parameters:
name- Required. The name of the AutoMigrationConfig. Format: 'projects/{project_id}/locations/{location}/AutoMigrationConfig'.- Throws:
ApiException- if the remote call fails
-
getAutoMigrationConfig
Get the AutoMigrationConfig for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = AutoMigrationConfigName.of("[PROJECT]", "[LOCATION]").toString(); AutoMigrationConfig response = configClient.getAutoMigrationConfig(name); }- Parameters:
name- Required. The name of the AutoMigrationConfig. Format: 'projects/{project_id}/locations/{location}/AutoMigrationConfig'.- Throws:
ApiException- if the remote call fails
-
getAutoMigrationConfig
Get the AutoMigrationConfig for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetAutoMigrationConfigRequest request = GetAutoMigrationConfigRequest.newBuilder() .setName(AutoMigrationConfigName.of("[PROJECT]", "[LOCATION]").toString()) .build(); AutoMigrationConfig response = configClient.getAutoMigrationConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getAutoMigrationConfigCallable
public final UnaryCallable<GetAutoMigrationConfigRequest,AutoMigrationConfig> getAutoMigrationConfigCallable()Get the AutoMigrationConfig for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetAutoMigrationConfigRequest request = GetAutoMigrationConfigRequest.newBuilder() .setName(AutoMigrationConfigName.of("[PROJECT]", "[LOCATION]").toString()) .build(); ApiFuture<AutoMigrationConfig> future = configClient.getAutoMigrationConfigCallable().futureCall(request); // Do something. AutoMigrationConfig response = future.get(); } -
updateAutoMigrationConfigAsync
public final OperationFuture<AutoMigrationConfig,OperationMetadata> updateAutoMigrationConfigAsync(AutoMigrationConfig autoMigrationConfig, com.google.protobuf.FieldMask updateMask) Updates the AutoMigrationConfig for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { AutoMigrationConfig autoMigrationConfig = AutoMigrationConfig.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); AutoMigrationConfig response = configClient.updateAutoMigrationConfigAsync(autoMigrationConfig, updateMask).get(); }- Parameters:
autoMigrationConfig- Required. The AutoMigrationConfig to update.updateMask- Optional. The update mask applies to the resource. See [google.protobuf.FieldMask][google.protobuf.FieldMask].- Throws:
ApiException- if the remote call fails
-
updateAutoMigrationConfigAsync
public final OperationFuture<AutoMigrationConfig,OperationMetadata> updateAutoMigrationConfigAsync(UpdateAutoMigrationConfigRequest request) Updates the AutoMigrationConfig for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UpdateAutoMigrationConfigRequest request = UpdateAutoMigrationConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setAutoMigrationConfig(AutoMigrationConfig.newBuilder().build()) .build(); AutoMigrationConfig response = configClient.updateAutoMigrationConfigAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateAutoMigrationConfigOperationCallable
public final OperationCallable<UpdateAutoMigrationConfigRequest,AutoMigrationConfig, updateAutoMigrationConfigOperationCallable()OperationMetadata> Updates the AutoMigrationConfig for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UpdateAutoMigrationConfigRequest request = UpdateAutoMigrationConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setAutoMigrationConfig(AutoMigrationConfig.newBuilder().build()) .build(); OperationFuture<AutoMigrationConfig, OperationMetadata> future = configClient.updateAutoMigrationConfigOperationCallable().futureCall(request); // Do something. AutoMigrationConfig response = future.get(); } -
updateAutoMigrationConfigCallable
public final UnaryCallable<UpdateAutoMigrationConfigRequest,Operation> updateAutoMigrationConfigCallable()Updates the AutoMigrationConfig for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UpdateAutoMigrationConfigRequest request = UpdateAutoMigrationConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setAutoMigrationConfig(AutoMigrationConfig.newBuilder().build()) .build(); ApiFuture<Operation> future = configClient.updateAutoMigrationConfigCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getDeploymentGroup
Get a DeploymentGroup for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentGroupName name = DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]"); DeploymentGroup response = configClient.getDeploymentGroup(name); }- Parameters:
name- Required. The name of the deployment group to retrieve. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.- Throws:
ApiException- if the remote call fails
-
getDeploymentGroup
Get a DeploymentGroup for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]").toString(); DeploymentGroup response = configClient.getDeploymentGroup(name); }- Parameters:
name- Required. The name of the deployment group to retrieve. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.- Throws:
ApiException- if the remote call fails
-
getDeploymentGroup
Get a DeploymentGroup for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetDeploymentGroupRequest request = GetDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .build(); DeploymentGroup response = configClient.getDeploymentGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getDeploymentGroupCallable
Get a DeploymentGroup for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetDeploymentGroupRequest request = GetDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .build(); ApiFuture<DeploymentGroup> future = configClient.getDeploymentGroupCallable().futureCall(request); // Do something. DeploymentGroup response = future.get(); } -
createDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> createDeploymentGroupAsync(LocationName parent, DeploymentGroup deploymentGroup, String deploymentGroupId) Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); DeploymentGroup deploymentGroup = DeploymentGroup.newBuilder().build(); String deploymentGroupId = "deploymentGroupId717062517"; DeploymentGroup response = configClient.createDeploymentGroupAsync(parent, deploymentGroup, deploymentGroupId).get(); }- Parameters:
parent- Required. The parent in whose context the Deployment Group is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'deploymentGroup- Required. [Deployment Group][] resource to createdeploymentGroupId- Required. The deployment group ID.- Throws:
ApiException- if the remote call fails
-
createDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> createDeploymentGroupAsync(String parent, DeploymentGroup deploymentGroup, String deploymentGroupId) Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); DeploymentGroup deploymentGroup = DeploymentGroup.newBuilder().build(); String deploymentGroupId = "deploymentGroupId717062517"; DeploymentGroup response = configClient.createDeploymentGroupAsync(parent, deploymentGroup, deploymentGroupId).get(); }- Parameters:
parent- Required. The parent in whose context the Deployment Group is created. The parent value is in the format: 'projects/{project_id}/locations/{location}'deploymentGroup- Required. [Deployment Group][] resource to createdeploymentGroupId- Required. The deployment group ID.- Throws:
ApiException- if the remote call fails
-
createDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> createDeploymentGroupAsync(CreateDeploymentGroupRequest request) Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { CreateDeploymentGroupRequest request = CreateDeploymentGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDeploymentGroupId("deploymentGroupId717062517") .setDeploymentGroup(DeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); DeploymentGroup response = configClient.createDeploymentGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createDeploymentGroupOperationCallable
public final OperationCallable<CreateDeploymentGroupRequest,DeploymentGroup, createDeploymentGroupOperationCallable()OperationMetadata> Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { CreateDeploymentGroupRequest request = CreateDeploymentGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDeploymentGroupId("deploymentGroupId717062517") .setDeploymentGroup(DeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<DeploymentGroup, OperationMetadata> future = configClient.createDeploymentGroupOperationCallable().futureCall(request); // Do something. DeploymentGroup response = future.get(); } -
createDeploymentGroupCallable
Creates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { CreateDeploymentGroupRequest request = CreateDeploymentGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDeploymentGroupId("deploymentGroupId717062517") .setDeploymentGroup(DeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = configClient.createDeploymentGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> updateDeploymentGroupAsync(DeploymentGroup deploymentGroup, com.google.protobuf.FieldMask updateMask) Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentGroup deploymentGroup = DeploymentGroup.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); DeploymentGroup response = configClient.updateDeploymentGroupAsync(deploymentGroup, updateMask).get(); }- Parameters:
deploymentGroup- Required. [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] to update.The deployment group's `name` field is used to identify the resource to be updated. Format: `projects/{project}/locations/{location}/deploymentGroups/{deployment_group_id}`
updateMask- Optional. Field mask used to specify the fields to be overwritten in the Deployment Group resource by the update.The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
- Throws:
ApiException- if the remote call fails
-
updateDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> updateDeploymentGroupAsync(UpdateDeploymentGroupRequest request) Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UpdateDeploymentGroupRequest request = UpdateDeploymentGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDeploymentGroup(DeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); DeploymentGroup response = configClient.updateDeploymentGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateDeploymentGroupOperationCallable
public final OperationCallable<UpdateDeploymentGroupRequest,DeploymentGroup, updateDeploymentGroupOperationCallable()OperationMetadata> Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UpdateDeploymentGroupRequest request = UpdateDeploymentGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDeploymentGroup(DeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<DeploymentGroup, OperationMetadata> future = configClient.updateDeploymentGroupOperationCallable().futureCall(request); // Do something. DeploymentGroup response = future.get(); } -
updateDeploymentGroupCallable
Updates a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { UpdateDeploymentGroupRequest request = UpdateDeploymentGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setDeploymentGroup(DeploymentGroup.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = configClient.updateDeploymentGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> deleteDeploymentGroupAsync(DeploymentGroupName name) Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentGroupName name = DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]"); DeploymentGroup response = configClient.deleteDeploymentGroupAsync(name).get(); }- Parameters:
name- Required. The name of DeploymentGroup in the format projects/{project_id}/locations/{location_id}/deploymentGroups/{deploymentGroup}- Throws:
ApiException- if the remote call fails
-
deleteDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> deleteDeploymentGroupAsync(String name) Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]").toString(); DeploymentGroup response = configClient.deleteDeploymentGroupAsync(name).get(); }- Parameters:
name- Required. The name of DeploymentGroup in the format projects/{project_id}/locations/{location_id}/deploymentGroups/{deploymentGroup}- Throws:
ApiException- if the remote call fails
-
deleteDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> deleteDeploymentGroupAsync(DeleteDeploymentGroupRequest request) Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeleteDeploymentGroupRequest request = DeleteDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .setRequestId("requestId693933066") .setForce(true) .build(); DeploymentGroup response = configClient.deleteDeploymentGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteDeploymentGroupOperationCallable
public final OperationCallable<DeleteDeploymentGroupRequest,DeploymentGroup, deleteDeploymentGroupOperationCallable()OperationMetadata> Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeleteDeploymentGroupRequest request = DeleteDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .setRequestId("requestId693933066") .setForce(true) .build(); OperationFuture<DeploymentGroup, OperationMetadata> future = configClient.deleteDeploymentGroupOperationCallable().futureCall(request); // Do something. DeploymentGroup response = future.get(); } -
deleteDeploymentGroupCallable
Deletes a [DeploymentGroup][google.cloud.config.v1.DeploymentGroup]Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeleteDeploymentGroupRequest request = DeleteDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .setRequestId("requestId693933066") .setForce(true) .build(); ApiFuture<Operation> future = configClient.deleteDeploymentGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listDeploymentGroups
public final ConfigClient.ListDeploymentGroupsPagedResponse listDeploymentGroups(LocationName parent) List DeploymentGroups for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (DeploymentGroup element : configClient.listDeploymentGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of deployment groups. Format: 'projects/{project_id}/locations/{location}'.- Throws:
ApiException- if the remote call fails
-
listDeploymentGroups
List DeploymentGroups for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (DeploymentGroup element : configClient.listDeploymentGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of deployment groups. Format: 'projects/{project_id}/locations/{location}'.- Throws:
ApiException- if the remote call fails
-
listDeploymentGroups
public final ConfigClient.ListDeploymentGroupsPagedResponse listDeploymentGroups(ListDeploymentGroupsRequest request) List DeploymentGroups for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListDeploymentGroupsRequest request = ListDeploymentGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (DeploymentGroup element : configClient.listDeploymentGroups(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listDeploymentGroupsPagedCallable
public final UnaryCallable<ListDeploymentGroupsRequest,ConfigClient.ListDeploymentGroupsPagedResponse> listDeploymentGroupsPagedCallable()List DeploymentGroups for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListDeploymentGroupsRequest request = ListDeploymentGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<DeploymentGroup> future = configClient.listDeploymentGroupsPagedCallable().futureCall(request); // Do something. for (DeploymentGroup element : future.get().iterateAll()) { // doThingsWith(element); } } -
listDeploymentGroupsCallable
public final UnaryCallable<ListDeploymentGroupsRequest,ListDeploymentGroupsResponse> listDeploymentGroupsCallable()List DeploymentGroups for a given project and location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListDeploymentGroupsRequest request = ListDeploymentGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListDeploymentGroupsResponse response = configClient.listDeploymentGroupsCallable().call(request); for (DeploymentGroup element : response.getDeploymentGroupsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
provisionDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> provisionDeploymentGroupAsync(DeploymentGroupName name) Provisions a deployment group.NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
- last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentGroupName name = DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]"); DeploymentGroup response = configClient.provisionDeploymentGroupAsync(name).get(); }- Parameters:
name- Required. The name of the deployment group to provision. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.- Throws:
ApiException- if the remote call fails
-
provisionDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> provisionDeploymentGroupAsync(String name) Provisions a deployment group.NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
- last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]").toString(); DeploymentGroup response = configClient.provisionDeploymentGroupAsync(name).get(); }- Parameters:
name- Required. The name of the deployment group to provision. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.- Throws:
ApiException- if the remote call fails
-
provisionDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> provisionDeploymentGroupAsync(ProvisionDeploymentGroupRequest request) Provisions a deployment group.NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
- last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ProvisionDeploymentGroupRequest request = ProvisionDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .putAllDeploymentSpecs(new HashMap<String, DeploymentSpec>()) .build(); DeploymentGroup response = configClient.provisionDeploymentGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
provisionDeploymentGroupOperationCallable
public final OperationCallable<ProvisionDeploymentGroupRequest,DeploymentGroup, provisionDeploymentGroupOperationCallable()OperationMetadata> Provisions a deployment group.NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
- last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ProvisionDeploymentGroupRequest request = ProvisionDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .putAllDeploymentSpecs(new HashMap<String, DeploymentSpec>()) .build(); OperationFuture<DeploymentGroup, OperationMetadata> future = configClient.provisionDeploymentGroupOperationCallable().futureCall(request); // Do something. DeploymentGroup response = future.get(); } -
provisionDeploymentGroupCallable
public final UnaryCallable<ProvisionDeploymentGroupRequest,Operation> provisionDeploymentGroupCallable()Provisions a deployment group.NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
- last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ProvisionDeploymentGroupRequest request = ProvisionDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .putAllDeploymentSpecs(new HashMap<String, DeploymentSpec>()) .build(); ApiFuture<Operation> future = configClient.provisionDeploymentGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deprovisionDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> deprovisionDeploymentGroupAsync(DeploymentGroupName name) Deprovisions a deployment group.NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
- last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentGroupName name = DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]"); DeploymentGroup response = configClient.deprovisionDeploymentGroupAsync(name).get(); }- Parameters:
name- Required. The name of the deployment group to deprovision. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.- Throws:
ApiException- if the remote call fails
-
deprovisionDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> deprovisionDeploymentGroupAsync(String name) Deprovisions a deployment group.NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
- last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]").toString(); DeploymentGroup response = configClient.deprovisionDeploymentGroupAsync(name).get(); }- Parameters:
name- Required. The name of the deployment group to deprovision. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.- Throws:
ApiException- if the remote call fails
-
deprovisionDeploymentGroupAsync
public final OperationFuture<DeploymentGroup,OperationMetadata> deprovisionDeploymentGroupAsync(DeprovisionDeploymentGroupRequest request) Deprovisions a deployment group.NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
- last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeprovisionDeploymentGroupRequest request = DeprovisionDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .setForce(true) .build(); DeploymentGroup response = configClient.deprovisionDeploymentGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deprovisionDeploymentGroupOperationCallable
public final OperationCallable<DeprovisionDeploymentGroupRequest,DeploymentGroup, deprovisionDeploymentGroupOperationCallable()OperationMetadata> Deprovisions a deployment group.NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
- last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeprovisionDeploymentGroupRequest request = DeprovisionDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .setForce(true) .build(); OperationFuture<DeploymentGroup, OperationMetadata> future = configClient.deprovisionDeploymentGroupOperationCallable().futureCall(request); // Do something. DeploymentGroup response = future.get(); } -
deprovisionDeploymentGroupCallable
public final UnaryCallable<DeprovisionDeploymentGroupRequest,Operation> deprovisionDeploymentGroupCallable()Deprovisions a deployment group.NOTE: As a first step of this operation, Infra Manager will automatically delete any Deployments that were part of the
- last successful* [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision] but are *no longer* included in the *current* [DeploymentGroup][google.cloud.config.v1.DeploymentGroup] definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeprovisionDeploymentGroupRequest request = DeprovisionDeploymentGroupRequest.newBuilder() .setName( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .setForce(true) .build(); ApiFuture<Operation> future = configClient.deprovisionDeploymentGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getDeploymentGroupRevision
Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentGroupRevisionName name = DeploymentGroupRevisionName.of( "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]", "[REVISION]"); DeploymentGroupRevision response = configClient.getDeploymentGroupRevision(name); }- Parameters:
name- Required. The name of the deployment group revision to retrieve. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}/revisions/{revision}'.- Throws:
ApiException- if the remote call fails
-
getDeploymentGroupRevision
Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String name = DeploymentGroupRevisionName.of( "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]", "[REVISION]") .toString(); DeploymentGroupRevision response = configClient.getDeploymentGroupRevision(name); }- Parameters:
name- Required. The name of the deployment group revision to retrieve. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}/revisions/{revision}'.- Throws:
ApiException- if the remote call fails
-
getDeploymentGroupRevision
public final DeploymentGroupRevision getDeploymentGroupRevision(GetDeploymentGroupRevisionRequest request) Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetDeploymentGroupRevisionRequest request = GetDeploymentGroupRevisionRequest.newBuilder() .setName( DeploymentGroupRevisionName.of( "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]", "[REVISION]") .toString()) .build(); DeploymentGroupRevision response = configClient.getDeploymentGroupRevision(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getDeploymentGroupRevisionCallable
public final UnaryCallable<GetDeploymentGroupRevisionRequest,DeploymentGroupRevision> getDeploymentGroupRevisionCallable()Gets details about a [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetDeploymentGroupRevisionRequest request = GetDeploymentGroupRevisionRequest.newBuilder() .setName( DeploymentGroupRevisionName.of( "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]", "[REVISION]") .toString()) .build(); ApiFuture<DeploymentGroupRevision> future = configClient.getDeploymentGroupRevisionCallable().futureCall(request); // Do something. DeploymentGroupRevision response = future.get(); } -
listDeploymentGroupRevisions
public final ConfigClient.ListDeploymentGroupRevisionsPagedResponse listDeploymentGroupRevisions(DeploymentGroupName parent) Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { DeploymentGroupName parent = DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]"); for (DeploymentGroupRevision element : configClient.listDeploymentGroupRevisions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of deployment group revisions. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.- Throws:
ApiException- if the remote call fails
-
listDeploymentGroupRevisions
public final ConfigClient.ListDeploymentGroupRevisionsPagedResponse listDeploymentGroupRevisions(String parent) Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { String parent = DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]").toString(); for (DeploymentGroupRevision element : configClient.listDeploymentGroupRevisions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent, which owns this collection of deployment group revisions. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.- Throws:
ApiException- if the remote call fails
-
listDeploymentGroupRevisions
public final ConfigClient.ListDeploymentGroupRevisionsPagedResponse listDeploymentGroupRevisions(ListDeploymentGroupRevisionsRequest request) Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListDeploymentGroupRevisionsRequest request = ListDeploymentGroupRevisionsRequest.newBuilder() .setParent( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (DeploymentGroupRevision element : configClient.listDeploymentGroupRevisions(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listDeploymentGroupRevisionsPagedCallable
public final UnaryCallable<ListDeploymentGroupRevisionsRequest,ConfigClient.ListDeploymentGroupRevisionsPagedResponse> listDeploymentGroupRevisionsPagedCallable()Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListDeploymentGroupRevisionsRequest request = ListDeploymentGroupRevisionsRequest.newBuilder() .setParent( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<DeploymentGroupRevision> future = configClient.listDeploymentGroupRevisionsPagedCallable().futureCall(request); // Do something. for (DeploymentGroupRevision element : future.get().iterateAll()) { // doThingsWith(element); } } -
listDeploymentGroupRevisionsCallable
public final UnaryCallable<ListDeploymentGroupRevisionsRequest,ListDeploymentGroupRevisionsResponse> listDeploymentGroupRevisionsCallable()Lists [DeploymentGroupRevision][google.cloud.config.v1.DeploymentGroupRevision]s in a given [DeploymentGroup][google.cloud.config.v1.DeploymentGroup].Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListDeploymentGroupRevisionsRequest request = ListDeploymentGroupRevisionsRequest.newBuilder() .setParent( DeploymentGroupName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_GROUP]") .toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListDeploymentGroupRevisionsResponse response = configClient.listDeploymentGroupRevisionsCallable().call(request); for (DeploymentGroupRevision element : response.getDeploymentGroupRevisionsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listLocations
Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:
* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : configClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,ConfigClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:
* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = configClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:
* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = configClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = configClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = configClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
setIamPolicy
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = configClient.setIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = configClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
getIamPolicy
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = configClient.getIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = configClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
testIamPermissions
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = configClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet 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 as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ConfigClient configClient = ConfigClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = configClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-