service_account#
State module for managing Service Accounts.
- async idem_gcp.states.gcp.iam.service_account.present(hub, ctx, name: str, resource_id: str = None, project_id: str = None, account_id: str = None, display_name: str = None, description: str = None, unique_id: str = None, email: str = None, etag: str = None, disabled: bool = None, oauth2_client_id: str = None) Dict[str, Any] [source]#
Create or update a service account resource.
- Parameters:
name (str, Optional) – The resource name of the service account.
resource_id (str, Optional) – An identifier of the resource in the provider. Defaults to None.
project_id (str, Optional) – A valid API project identifier.
account_id (str) – Required on create. The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 6-30 characters long, and match the regular expression [a-z]([-a-z0-9]*[a-z0-9]) to comply with RFC1035.
display_name (str, Optional) – A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
description (str, Optional) – A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
unique_id (str, Optional) – The unique, stable numeric ID for the service account.
email (str, Optional) – The email address of the service account.
etag (str, Optional) – A base64-encoded string.
disabled (str, Optional) – Output only. Whether the service account is disabled.
oauth2_client_id (str, Optional) – The OAuth 2.0 client ID for the service account.
- Returns:
Dict[str, Any]
Examples
resource_is_present: gcp.iam.service_account.present: - name: value - project_id: value
- async idem_gcp.states.gcp.iam.service_account.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any] [source]#
Deletes a service account.
- Parameters:
- Returns:
Dict[str, Any]
Examples
resource_is_absent: gcp.iam.service_account.absent: - resource_id: resource-id
- async idem_gcp.states.gcp.iam.service_account.describe(hub, ctx) Dict[str, Dict[str, Any]] [source]#
Describe the resource in a way that can be recreated/managed with the corresponding “present” function.
Lists every ServiceAccount that belongs to a specific project.
- Returns:
Dict[str, Any]
Examples
$ idem describe gcp.iam.service_accounts