Infrastructure Manager API . projects . locations . deploymentGroups

Instance Methods

revisions()

Returns the revisions Resource.

close()

Close httplib2 connections.

create(parent, body=None, deploymentGroupId=None, requestId=None, x__xgafv=None)

Creates a DeploymentGroup The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.

delete(name, deploymentReferencePolicy=None, force=None, requestId=None, x__xgafv=None)

Deletes a DeploymentGroup

deprovision(name, body=None, x__xgafv=None)

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 but are *no longer* included in the *current* DeploymentGroup definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

get(name, x__xgafv=None)

Get a DeploymentGroup for a given project and location.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

List DeploymentGroups for a given project and location.

list_next()

Retrieves the next page of results.

patch(name, body=None, requestId=None, updateMask=None, x__xgafv=None)

Updates a DeploymentGroup

provision(name, body=None, x__xgafv=None)

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 but are *no longer* included in the *current* DeploymentGroup definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

Method Details

close()
Close httplib2 connections.
create(parent, body=None, deploymentGroupId=None, requestId=None, x__xgafv=None)
Creates a DeploymentGroup The newly created DeploymentGroup will be in the `CREATING` state and can be retrieved via Get and List calls.

Args:
  parent: string, Required. The parent in whose context the Deployment Group is created. The parent value is in the format: 'projects/{project_id}/locations/{location}' (required)
  body: object, The request body.
    The object takes the form of:

{ # A DeploymentGroup is a collection of DeploymentUnits that in a DAG-like structure.
  "annotations": { # Optional. Arbitrary key-value metadata storage e.g. to help client tools identify deployment group during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.
    "a_key": "A String",
  },
  "createTime": "A String", # Output only. Time when the deployment group was created.
  "deploymentUnits": [ # The deployment units of the deployment group in a DAG like structure. When a deployment group is being provisioned, the deployment units are deployed in a DAG order. The provided units must be in a DAG order, otherwise an error will be returned.
    { # A DeploymentUnit is a container for a deployment and its dependencies. An existing deployment can be provided directly in the unit, or the unit can act as a placeholder to define the DAG, with the deployment specs supplied in a `provisionDeploymentRequest`.
      "dependencies": [ # Required. The IDs of the deployment units within the deployment group that this unit depends on.
        "A String",
      ],
      "deployment": "A String", # Optional. The name of the deployment to be provisioned. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      "id": "A String", # The id of the deployment unit. Must be unique within the deployment group.
    },
  ],
  "labels": { # Optional. User-defined metadata for the deployment group.
    "a_key": "A String",
  },
  "name": "A String", # Identifier. The name of the deployment group. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
  "provisioningError": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The error status of the deployment group provisioning or deprovisioning.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "provisioningState": "A String", # Output only. The provisioning state of the deployment group.
  "provisioningStateDescription": "A String", # Output only. Additional information regarding the current provisioning state.
  "state": "A String", # Output only. Current state of the deployment group.
  "stateDescription": "A String", # Output only. Additional information regarding the current state.
  "updateTime": "A String", # Output only. Time when the deployment group was last updated.
}

  deploymentGroupId: string, Required. The deployment group ID.
  requestId: string, Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
  "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
}
delete(name, deploymentReferencePolicy=None, force=None, requestId=None, x__xgafv=None)
Deletes a DeploymentGroup

Args:
  name: string, Required. The name of DeploymentGroup in the format projects/{project_id}/locations/{location_id}/deploymentGroups/{deploymentGroup} (required)
  deploymentReferencePolicy: string, Optional. Policy on how to handle referenced deployments when deleting the DeploymentGroup. If unspecified, the default behavior is to fail the deletion if any deployments currently referenced in the `deployment_units` of the DeploymentGroup or in the latest revision are not deleted.
    Allowed values
      DEPLOYMENT_REFERENCE_POLICY_UNSPECIFIED - The default behavior. If unspecified, the system will act as if `FAIL_IF_ANY_REFERENCES_EXIST` is specified.
      FAIL_IF_ANY_REFERENCES_EXIST - Fail the deletion if any deployments currently referenced in the `deployment_units` of the DeploymentGroup or in the latest revision are not deleted.
      FAIL_IF_METADATA_REFERENCES_EXIST - Fail the deletion only if any deployments currently referenced in the `deployment_units` of the DeploymentGroup are not deleted. The deletion will proceed even if the deployments in the latest revision of the DeploymentGroup are not deleted.
      IGNORE_DEPLOYMENT_REFERENCES - Ignore any deployments currently referenced in the `deployment_units` of the DeploymentGroup or in the latest revision.
  force: boolean, Optional. If set to true, any revisions for this deployment group will also be deleted. (Otherwise, the request will only work if the deployment group has no revisions.)
  requestId: string, Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
  "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
}
deprovision(name, body=None, x__xgafv=None)
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 but are *no longer* included in the *current* DeploymentGroup definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

Args:
  name: string, Required. The name of the deployment group to deprovision. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for the DeprovisionDeploymentGroup method.
  "deletePolicy": "A String", # Optional. Policy on how resources within each deployment should be handled during deletion. This policy is applied globally to the deletion of all deployments in this group. This corresponds to the 'delete_policy' field in DeleteDeploymentRequest.
  "force": True or False, # Optional. If set to true, this option is propagated to the deletion of each deployment in the group. This corresponds to the 'force' field in DeleteDeploymentRequest.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
  "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
}
get(name, x__xgafv=None)
Get a DeploymentGroup for a given project and location.

Args:
  name: string, Required. The name of the deployment group to retrieve. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A DeploymentGroup is a collection of DeploymentUnits that in a DAG-like structure.
  "annotations": { # Optional. Arbitrary key-value metadata storage e.g. to help client tools identify deployment group during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.
    "a_key": "A String",
  },
  "createTime": "A String", # Output only. Time when the deployment group was created.
  "deploymentUnits": [ # The deployment units of the deployment group in a DAG like structure. When a deployment group is being provisioned, the deployment units are deployed in a DAG order. The provided units must be in a DAG order, otherwise an error will be returned.
    { # A DeploymentUnit is a container for a deployment and its dependencies. An existing deployment can be provided directly in the unit, or the unit can act as a placeholder to define the DAG, with the deployment specs supplied in a `provisionDeploymentRequest`.
      "dependencies": [ # Required. The IDs of the deployment units within the deployment group that this unit depends on.
        "A String",
      ],
      "deployment": "A String", # Optional. The name of the deployment to be provisioned. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      "id": "A String", # The id of the deployment unit. Must be unique within the deployment group.
    },
  ],
  "labels": { # Optional. User-defined metadata for the deployment group.
    "a_key": "A String",
  },
  "name": "A String", # Identifier. The name of the deployment group. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
  "provisioningError": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The error status of the deployment group provisioning or deprovisioning.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "provisioningState": "A String", # Output only. The provisioning state of the deployment group.
  "provisioningStateDescription": "A String", # Output only. Additional information regarding the current provisioning state.
  "state": "A String", # Output only. Current state of the deployment group.
  "stateDescription": "A String", # Output only. Additional information regarding the current state.
  "updateTime": "A String", # Output only. Time when the deployment group was last updated.
}
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
List DeploymentGroups for a given project and location.

Args:
  parent: string, Required. The parent, which owns this collection of deployment groups. Format: 'projects/{project_id}/locations/{location}'. (required)
  filter: string, Optional. Lists the DeploymentGroups that match the filter expression. A filter expression filters the deployment groups listed in the response. The expression must be of the form '{field} {operator} {value}' where operators: '<', '>', '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS operator which is roughly synonymous with equality). {field} can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = "projects/foo/locations/us-central1/deploymentGroups/bar" - Filter by labels: - Resources that have a key called 'foo' labels.foo:* - Resources that have a key called 'foo' whose value is 'bar' labels.foo = bar - Filter by state: - DeploymentGroups in CREATING state. state=CREATING
  orderBy: string, Optional. Field to use to sort the list.
  pageSize: integer, Optional. When requesting a page of resources, 'page_size' specifies number of resources to return. If unspecified, at most 500 will be returned. The maximum value is 1000.
  pageToken: string, Optional. Token returned by previous call to 'ListDeploymentGroups' which specifies the position in the list from where to continue listing the deployment groups.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response message for the ListDeploymentGroups method.
  "deploymentGroups": [ # The deployment groups from the specified collection.
    { # A DeploymentGroup is a collection of DeploymentUnits that in a DAG-like structure.
      "annotations": { # Optional. Arbitrary key-value metadata storage e.g. to help client tools identify deployment group during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.
        "a_key": "A String",
      },
      "createTime": "A String", # Output only. Time when the deployment group was created.
      "deploymentUnits": [ # The deployment units of the deployment group in a DAG like structure. When a deployment group is being provisioned, the deployment units are deployed in a DAG order. The provided units must be in a DAG order, otherwise an error will be returned.
        { # A DeploymentUnit is a container for a deployment and its dependencies. An existing deployment can be provided directly in the unit, or the unit can act as a placeholder to define the DAG, with the deployment specs supplied in a `provisionDeploymentRequest`.
          "dependencies": [ # Required. The IDs of the deployment units within the deployment group that this unit depends on.
            "A String",
          ],
          "deployment": "A String", # Optional. The name of the deployment to be provisioned. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
          "id": "A String", # The id of the deployment unit. Must be unique within the deployment group.
        },
      ],
      "labels": { # Optional. User-defined metadata for the deployment group.
        "a_key": "A String",
      },
      "name": "A String", # Identifier. The name of the deployment group. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
      "provisioningError": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The error status of the deployment group provisioning or deprovisioning.
        "code": 42, # The status code, which should be an enum value of google.rpc.Code.
        "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
          {
            "a_key": "", # Properties of the object. Contains field @type with type URL.
          },
        ],
        "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
      },
      "provisioningState": "A String", # Output only. The provisioning state of the deployment group.
      "provisioningStateDescription": "A String", # Output only. Additional information regarding the current provisioning state.
      "state": "A String", # Output only. Current state of the deployment group.
      "stateDescription": "A String", # Output only. Additional information regarding the current state.
      "updateTime": "A String", # Output only. Time when the deployment group was last updated.
    },
  ],
  "nextPageToken": "A String", # Token to be supplied to the next ListDeploymentGroups request via `page_token` to obtain the next set of results.
  "unreachable": [ # Locations that could not be reached.
    "A String",
  ],
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
patch(name, body=None, requestId=None, updateMask=None, x__xgafv=None)
Updates a DeploymentGroup

Args:
  name: string, Identifier. The name of the deployment group. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'. (required)
  body: object, The request body.
    The object takes the form of:

{ # A DeploymentGroup is a collection of DeploymentUnits that in a DAG-like structure.
  "annotations": { # Optional. Arbitrary key-value metadata storage e.g. to help client tools identify deployment group during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.
    "a_key": "A String",
  },
  "createTime": "A String", # Output only. Time when the deployment group was created.
  "deploymentUnits": [ # The deployment units of the deployment group in a DAG like structure. When a deployment group is being provisioned, the deployment units are deployed in a DAG order. The provided units must be in a DAG order, otherwise an error will be returned.
    { # A DeploymentUnit is a container for a deployment and its dependencies. An existing deployment can be provided directly in the unit, or the unit can act as a placeholder to define the DAG, with the deployment specs supplied in a `provisionDeploymentRequest`.
      "dependencies": [ # Required. The IDs of the deployment units within the deployment group that this unit depends on.
        "A String",
      ],
      "deployment": "A String", # Optional. The name of the deployment to be provisioned. Format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
      "id": "A String", # The id of the deployment unit. Must be unique within the deployment group.
    },
  ],
  "labels": { # Optional. User-defined metadata for the deployment group.
    "a_key": "A String",
  },
  "name": "A String", # Identifier. The name of the deployment group. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'.
  "provisioningError": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The error status of the deployment group provisioning or deprovisioning.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "provisioningState": "A String", # Output only. The provisioning state of the deployment group.
  "provisioningStateDescription": "A String", # Output only. Additional information regarding the current provisioning state.
  "state": "A String", # Output only. Current state of the deployment group.
  "stateDescription": "A String", # Output only. Additional information regarding the current state.
  "updateTime": "A String", # Output only. Time when the deployment group was last updated.
}

  requestId: string, Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
  updateMask: string, 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.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
  "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
}
provision(name, body=None, x__xgafv=None)
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 but are *no longer* included in the *current* DeploymentGroup definition (e.g., following an `UpdateDeploymentGroup` call), along with their actuated resources.

Args:
  name: string, Required. The name of the deployment group to provision. Format: 'projects/{project_id}/locations/{location}/deploymentGroups/{deployment_group}'. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for the ProvisionDeploymentGroup method.
  "deploymentSpecs": { # Optional. The deployment specs of the deployment units to be created within the same project and location of the deployment group. The key is the unit ID, and the value is the `DeploymentSpec`. Provisioning will fail if a `deployment_spec` has a `deployment_id` that matches an existing deployment in the same project and location. If an existing deployment was part of the last successful revision but is no longer in the current DeploymentGroup's `deployment_units`, it will be recreated if included in `deployment_specs`.
    "a_key": { # Spec for a deployment to be created.
      "deployment": { # A Deployment is a group of resources and configs managed and provisioned by Infra Manager. # Required. The deployment to be created.
        "annotations": { # Optional. Arbitrary key-value metadata storage e.g. to help client tools identify deployments during automation. See https://google.aip.dev/148#annotations for details on format and size limitations.
          "a_key": "A String",
        },
        "artifactsGcsBucket": "A String", # Optional. User-defined location of Cloud Build logs and artifacts in Google Cloud Storage. Format: `gs://{bucket}/{folder}` A default bucket will be bootstrapped if the field is not set or empty. Default bucket format: `gs://--blueprint-config` Constraints: - The bucket needs to be in the same project as the deployment - The path cannot be within the path of `gcs_source` - The field cannot be updated, including changing its presence
        "createTime": "A String", # Output only. Time when the deployment was created.
        "deleteBuild": "A String", # Output only. Cloud Build instance UUID associated with deleting this deployment.
        "deleteLogs": "A String", # Output only. Location of Cloud Build logs in Google Cloud Storage, populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
        "deleteResults": { # Outputs and artifacts from applying a deployment. # Output only. Location of artifacts from a DeleteDeployment operation.
          "artifacts": "A String", # Location of artifacts (e.g. logs) in Google Cloud Storage. Format: `gs://{bucket}/{object}`
          "content": "A String", # Location of a blueprint copy and other manifests in Google Cloud Storage. Format: `gs://{bucket}/{object}`
          "outputs": { # Map of output name to output info.
            "a_key": { # Describes a Terraform output.
              "sensitive": True or False, # Identifies whether Terraform has set this output as a potential sensitive value.
              "value": "", # Value of output.
            },
          },
        },
        "errorCode": "A String", # Output only. Error code describing errors that may have occurred.
        "errorLogs": "A String", # Output only. Location of Terraform error logs in Google Cloud Storage. Format: `gs://{bucket}/{object}`.
        "importExistingResources": True or False, # By default, Infra Manager will return a failure when Terraform encounters a 409 code (resource conflict error) during actuation. If this flag is set to true, Infra Manager will instead attempt to automatically import the resource into the Terraform state (for supported resource types) and continue actuation. Not all resource types are supported, refer to documentation.
        "labels": { # Optional. User-defined metadata for the deployment.
          "a_key": "A String",
        },
        "latestRevision": "A String", # Output only. Revision name that was most recently applied. Format: `projects/{project}/locations/{location}/deployments/{deployment}/ revisions/{revision}`
        "lockState": "A String", # Output only. Current lock state of the deployment.
        "name": "A String", # Identifier. Resource name of the deployment. Format: `projects/{project}/locations/{location}/deployments/{deployment}`
        "providerConfig": { # ProviderConfig contains the provider configurations. # Optional. This field specifies the provider configurations.
          "sourceType": "A String", # Optional. ProviderSource specifies the source type of the provider.
        },
        "quotaValidation": "A String", # Optional. Input to control quota checks for resources in terraform configuration files. There are limited resources on which quota validation applies.
        "serviceAccount": "A String", # Required. User-specified Service Account (SA) credentials to be used when actuating resources. Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
        "state": "A String", # Output only. Current state of the deployment.
        "stateDetail": "A String", # Output only. Additional information regarding the current state.
        "terraformBlueprint": { # TerraformBlueprint describes the source of a Terraform root module which describes the resources and configs to be deployed. # A blueprint described using Terraform's HashiCorp Configuration Language as a root module.
          "externalValues": { # Optional. Map of input variable names in this blueprint to configurations for importing values from external sources.
            "a_key": { # Configuration for a source of an external value.
              "deploymentSource": { # Configuration for a value sourced from a Deployment. # A source from a Deployment.
                "deployment": "A String", # Required. The resource name of the source Deployment to import the output from. Format: projects/{project}/locations/{location}/deployments/{deployment} The source deployment must be in the same project and location.
                "outputName": "A String", # Required. The name of the output variable in the source deployment's latest successfully applied revision.
              },
            },
          },
          "gcsSource": "A String", # URI of an object in Google Cloud Storage. Format: `gs://{bucket}/{object}` URI may also specify an object version for zipped objects. Format: `gs://{bucket}/{object}#{version}`
          "gitSource": { # A set of files in a Git repository. # URI of a public Git repo.
            "directory": "A String", # Optional. Subdirectory inside the repository. Example: 'staging/my-package'
            "ref": "A String", # Optional. Git reference (e.g. branch or tag).
            "repo": "A String", # Optional. Repository URL. Example: 'https://github.com/kubernetes/examples.git'
          },
          "inputValues": { # Optional. Input variable values for the Terraform blueprint.
            "a_key": { # A Terraform input variable.
              "inputValue": "", # Optional. Input variable value.
            },
          },
        },
        "tfErrors": [ # Output only. Errors encountered when deleting this deployment. Errors are truncated to 10 entries, see `delete_results` and `error_logs` for full details.
          { # Errors encountered during actuation using Terraform
            "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Original error response from underlying Google API, if available.
              "code": 42, # The status code, which should be an enum value of google.rpc.Code.
              "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                {
                  "a_key": "", # Properties of the object. Contains field @type with type URL.
                },
              ],
              "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
            },
            "errorDescription": "A String", # A human-readable error description.
            "httpResponseCode": 42, # HTTP response code returned from Google Cloud Platform APIs when Terraform fails to provision the resource. If unset or 0, no HTTP response code was returned by Terraform.
            "resourceAddress": "A String", # Address of the resource associated with the error, e.g. `google_compute_network.vpc_network`.
          },
        ],
        "tfVersion": "A String", # Output only. The current Terraform version set on the deployment. It is in the format of "Major.Minor.Patch", for example, "1.3.10".
        "tfVersionConstraint": "A String", # Optional. The user-specified Terraform version constraint. Example: "=1.3.10".
        "updateTime": "A String", # Output only. Time when the deployment was last modified.
        "workerPool": "A String", # Optional. The user-specified Cloud Build worker pool resource in which the Cloud Build job will execute. Format: `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. If this field is unspecified, the default Cloud Build worker pool will be used.
      },
      "deploymentId": "A String", # Required. The id of the deployment to be created which doesn't include the project id and location.
    },
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
  "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    "a_key": "", # Properties of the object. Contains field @type with type URL.
  },
}