pub struct Config { /* private fields */ }Expand description
Implements a client for the Infrastructure Manager API.
§Example
let client = Config::builder().build().await?;
// use `client` to make requests to the Infrastructure Manager API.§Service Description
Infrastructure Manager is a managed service that automates the deployment and management of Google Cloud infrastructure resources.
§Configuration
To configure Config use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://config.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
Config holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap Config in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl Config
impl Config
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for Config.
let client = Config::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: Config + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: Config + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn list_deployments(&self) -> ListDeployments
pub fn list_deployments(&self) -> ListDeployments
Lists Deployments in a given project and location.
Sourcepub fn get_deployment(&self) -> GetDeployment
pub fn get_deployment(&self) -> GetDeployment
Gets details about a Deployment.
Sourcepub fn create_deployment(&self) -> CreateDeployment
pub fn create_deployment(&self) -> CreateDeployment
Creates a Deployment.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn update_deployment(&self) -> UpdateDeployment
pub fn update_deployment(&self) -> UpdateDeployment
Updates a Deployment.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn delete_deployment(&self) -> DeleteDeployment
pub fn delete_deployment(&self) -> DeleteDeployment
Deletes a Deployment.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_revisions(&self) -> ListRevisions
pub fn list_revisions(&self) -> ListRevisions
Lists Revisions of a deployment.
Sourcepub fn get_revision(&self) -> GetRevision
pub fn get_revision(&self) -> GetRevision
Gets details about a Revision.
Sourcepub fn get_resource(&self) -> GetResource
pub fn get_resource(&self) -> GetResource
Gets details about a Resource deployed by Infra Manager.
Sourcepub fn list_resources(&self) -> ListResources
pub fn list_resources(&self) -> ListResources
Lists Resources in a given revision.
Sourcepub fn export_deployment_statefile(&self) -> ExportDeploymentStatefile
pub fn export_deployment_statefile(&self) -> ExportDeploymentStatefile
Exports Terraform state file from a given deployment.
Sourcepub fn export_revision_statefile(&self) -> ExportRevisionStatefile
pub fn export_revision_statefile(&self) -> ExportRevisionStatefile
Exports Terraform state file from a given revision.
Sourcepub fn import_statefile(&self) -> ImportStatefile
pub fn import_statefile(&self) -> ImportStatefile
Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.
Sourcepub fn delete_statefile(&self) -> DeleteStatefile
pub fn delete_statefile(&self) -> DeleteStatefile
Deletes Terraform state file in a given deployment.
Sourcepub fn lock_deployment(&self) -> LockDeployment
pub fn lock_deployment(&self) -> LockDeployment
Locks a deployment.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn unlock_deployment(&self) -> UnlockDeployment
pub fn unlock_deployment(&self) -> UnlockDeployment
Unlocks a locked deployment.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn export_lock_info(&self) -> ExportLockInfo
pub fn export_lock_info(&self) -> ExportLockInfo
Exports the lock info on a locked deployment.
Sourcepub fn create_preview(&self) -> CreatePreview
pub fn create_preview(&self) -> CreatePreview
Creates a Preview.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn get_preview(&self) -> GetPreview
pub fn get_preview(&self) -> GetPreview
Gets details about a Preview.
Sourcepub fn list_previews(&self) -> ListPreviews
pub fn list_previews(&self) -> ListPreviews
Lists Previews in a given project and location.
Sourcepub fn delete_preview(&self) -> DeletePreview
pub fn delete_preview(&self) -> DeletePreview
Deletes a Preview.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn export_preview_result(&self) -> ExportPreviewResult
pub fn export_preview_result(&self) -> ExportPreviewResult
Export Preview results.
Sourcepub fn list_terraform_versions(&self) -> ListTerraformVersions
pub fn list_terraform_versions(&self) -> ListTerraformVersions
Lists TerraformVersions in a given project and location.
Sourcepub fn get_terraform_version(&self) -> GetTerraformVersion
pub fn get_terraform_version(&self) -> GetTerraformVersion
Gets details about a TerraformVersion.
Sourcepub fn list_locations(&self) -> ListLocations
pub fn list_locations(&self) -> ListLocations
Lists information about the supported locations for this service.
Sourcepub fn get_location(&self) -> GetLocation
pub fn get_location(&self) -> GetLocation
Gets information about a location.
Sourcepub fn set_iam_policy(&self) -> SetIamPolicy
pub fn set_iam_policy(&self) -> SetIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
errors.
Sourcepub fn get_iam_policy(&self) -> GetIamPolicy
pub fn get_iam_policy(&self) -> GetIamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Sourcepub fn test_iam_permissions(&self) -> TestIamPermissions
pub fn test_iam_permissions(&self) -> TestIamPermissions
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Sourcepub fn delete_operation(&self) -> DeleteOperation
pub fn delete_operation(&self) -> DeleteOperation
Provides the Operations service functionality in this service.
Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.