pub struct ProjectMethods<'a, S>
where S: 'a,
{ /* private fields */ }
Expand description

A builder providing access to all methods supported on project resources. It is not used directly, but through the Iam hub.

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_iam1 as iam1;
 
use std::default::Default;
use iam1::{Iam, oauth2, hyper, hyper_rustls, chrono, FieldMask};
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
        secret,
        oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = Iam::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `locations_workload_identity_pools_create(...)`, `locations_workload_identity_pools_delete(...)`, `locations_workload_identity_pools_get(...)`, `locations_workload_identity_pools_list(...)`, `locations_workload_identity_pools_namespaces_managed_identities_operations_get(...)`, `locations_workload_identity_pools_namespaces_managed_identities_workload_sources_operations_get(...)`, `locations_workload_identity_pools_namespaces_operations_get(...)`, `locations_workload_identity_pools_operations_get(...)`, `locations_workload_identity_pools_patch(...)`, `locations_workload_identity_pools_providers_create(...)`, `locations_workload_identity_pools_providers_delete(...)`, `locations_workload_identity_pools_providers_get(...)`, `locations_workload_identity_pools_providers_keys_create(...)`, `locations_workload_identity_pools_providers_keys_delete(...)`, `locations_workload_identity_pools_providers_keys_get(...)`, `locations_workload_identity_pools_providers_keys_list(...)`, `locations_workload_identity_pools_providers_keys_operations_get(...)`, `locations_workload_identity_pools_providers_keys_undelete(...)`, `locations_workload_identity_pools_providers_list(...)`, `locations_workload_identity_pools_providers_operations_get(...)`, `locations_workload_identity_pools_providers_patch(...)`, `locations_workload_identity_pools_providers_undelete(...)`, `locations_workload_identity_pools_undelete(...)`, `roles_create(...)`, `roles_delete(...)`, `roles_get(...)`, `roles_list(...)`, `roles_patch(...)`, `roles_undelete(...)`, `service_accounts_create(...)`, `service_accounts_delete(...)`, `service_accounts_disable(...)`, `service_accounts_enable(...)`, `service_accounts_get(...)`, `service_accounts_get_iam_policy(...)`, `service_accounts_keys_create(...)`, `service_accounts_keys_delete(...)`, `service_accounts_keys_disable(...)`, `service_accounts_keys_enable(...)`, `service_accounts_keys_get(...)`, `service_accounts_keys_list(...)`, `service_accounts_keys_upload(...)`, `service_accounts_list(...)`, `service_accounts_patch(...)`, `service_accounts_set_iam_policy(...)`, `service_accounts_sign_blob(...)`, `service_accounts_sign_jwt(...)`, `service_accounts_test_iam_permissions(...)`, `service_accounts_undelete(...)` and `service_accounts_update(...)`
// to build up your call.
let rb = hub.projects();

Implementations§

source§

impl<'a, S> ProjectMethods<'a, S>

source

pub fn locations_workload_identity_pools_namespaces_managed_identities_operations_get( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolNamespaceManagedIdentityOperationGetCall<'a, S>

Create a builder to help you perform the following task:

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

§Arguments
  • name - The name of the operation resource.
source

pub fn locations_workload_identity_pools_namespaces_managed_identities_workload_sources_operations_get( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolNamespaceManagedIdentityWorkloadSourceOperationGetCall<'a, S>

Create a builder to help you perform the following task:

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

§Arguments
  • name - The name of the operation resource.
source

pub fn locations_workload_identity_pools_namespaces_operations_get( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolNamespaceOperationGetCall<'a, S>

Create a builder to help you perform the following task:

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

§Arguments
  • name - The name of the operation resource.
source

pub fn locations_workload_identity_pools_operations_get( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolOperationGetCall<'a, S>

Create a builder to help you perform the following task:

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

§Arguments
  • name - The name of the operation resource.
source

pub fn locations_workload_identity_pools_providers_keys_operations_get( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolProviderKeyOperationGetCall<'a, S>

Create a builder to help you perform the following task:

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

§Arguments
  • name - The name of the operation resource.
source

pub fn locations_workload_identity_pools_providers_keys_create( &self, request: WorkloadIdentityPoolProviderKey, parent: &str ) -> ProjectLocationWorkloadIdentityPoolProviderKeyCreateCall<'a, S>

Create a builder to help you perform the following task:

Create a new WorkloadIdentityPoolProviderKey in a WorkloadIdentityPoolProvider.

§Arguments
  • request - No description provided.
  • parent - Required. The parent provider resource to create the key in.
source

pub fn locations_workload_identity_pools_providers_keys_delete( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolProviderKeyDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes an WorkloadIdentityPoolProviderKey. You can undelete a key for 30 days. After 30 days, deletion is permanent.

§Arguments
  • name - Required. The name of the encryption key to delete.
source

pub fn locations_workload_identity_pools_providers_keys_get( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolProviderKeyGetCall<'a, S>

Create a builder to help you perform the following task:

Gets an individual WorkloadIdentityPoolProviderKey.

§Arguments
  • name - Required. The name of the key to retrieve.
source

pub fn locations_workload_identity_pools_providers_keys_list( &self, parent: &str ) -> ProjectLocationWorkloadIdentityPoolProviderKeyListCall<'a, S>

Create a builder to help you perform the following task:

Lists all non-deleted WorkloadIdentityPoolProviderKeys in a project. If show_deleted is set to true, then deleted pools are also listed.

§Arguments
  • parent - Required. The parent provider resource to list encryption keys for.
source

pub fn locations_workload_identity_pools_providers_keys_undelete( &self, request: UndeleteWorkloadIdentityPoolProviderKeyRequest, name: &str ) -> ProjectLocationWorkloadIdentityPoolProviderKeyUndeleteCall<'a, S>

Create a builder to help you perform the following task:

Undeletes an WorkloadIdentityPoolProviderKey, as long as it was deleted fewer than 30 days ago.

§Arguments
  • request - No description provided.
  • name - Required. The name of the encryption key to undelete.
source

pub fn locations_workload_identity_pools_providers_operations_get( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolProviderOperationGetCall<'a, S>

Create a builder to help you perform the following task:

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

§Arguments
  • name - The name of the operation resource.
source

pub fn locations_workload_identity_pools_providers_create( &self, request: WorkloadIdentityPoolProvider, parent: &str ) -> ProjectLocationWorkloadIdentityPoolProviderCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a new WorkloadIdentityPoolProvider in a WorkloadIdentityPool. You cannot reuse the name of a deleted provider until 30 days after deletion.

§Arguments
  • request - No description provided.
  • parent - Required. The pool to create this provider in.
source

pub fn locations_workload_identity_pools_providers_delete( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolProviderDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes a WorkloadIdentityPoolProvider. Deleting a provider does not revoke credentials that have already been issued; they continue to grant access. You can undelete a provider for 30 days. After 30 days, deletion is permanent. You cannot update deleted providers. However, you can view and list them.

§Arguments
  • name - Required. The name of the provider to delete.
source

pub fn locations_workload_identity_pools_providers_get( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolProviderGetCall<'a, S>

Create a builder to help you perform the following task:

Gets an individual WorkloadIdentityPoolProvider.

§Arguments
  • name - Required. The name of the provider to retrieve.
source

pub fn locations_workload_identity_pools_providers_list( &self, parent: &str ) -> ProjectLocationWorkloadIdentityPoolProviderListCall<'a, S>

Create a builder to help you perform the following task:

Lists all non-deleted WorkloadIdentityPoolProviders in a WorkloadIdentityPool. If show_deleted is set to true, then deleted providers are also listed.

§Arguments
  • parent - Required. The pool to list providers for.
source

pub fn locations_workload_identity_pools_providers_patch( &self, request: WorkloadIdentityPoolProvider, name: &str ) -> ProjectLocationWorkloadIdentityPoolProviderPatchCall<'a, S>

Create a builder to help you perform the following task:

Updates an existing WorkloadIdentityPoolProvider.

§Arguments
  • request - No description provided.
  • name - Output only. The resource name of the provider.
source

pub fn locations_workload_identity_pools_providers_undelete( &self, request: UndeleteWorkloadIdentityPoolProviderRequest, name: &str ) -> ProjectLocationWorkloadIdentityPoolProviderUndeleteCall<'a, S>

Create a builder to help you perform the following task:

Undeletes a WorkloadIdentityPoolProvider, as long as it was deleted fewer than 30 days ago.

§Arguments
  • request - No description provided.
  • name - Required. The name of the provider to undelete.
source

pub fn locations_workload_identity_pools_create( &self, request: WorkloadIdentityPool, parent: &str ) -> ProjectLocationWorkloadIdentityPoolCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a new WorkloadIdentityPool. You cannot reuse the name of a deleted pool until 30 days after deletion.

§Arguments
  • request - No description provided.
  • parent - Required. The parent resource to create the pool in. The only supported location is global.
source

pub fn locations_workload_identity_pools_delete( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes a WorkloadIdentityPool. You cannot use a deleted pool to exchange external credentials for Google Cloud credentials. However, deletion does not revoke credentials that have already been issued. Credentials issued for a deleted pool do not grant access to resources. If the pool is undeleted, and the credentials are not expired, they grant access again. You can undelete a pool for 30 days. After 30 days, deletion is permanent. You cannot update deleted pools. However, you can view and list them.

§Arguments
  • name - Required. The name of the pool to delete.
source

pub fn locations_workload_identity_pools_get( &self, name: &str ) -> ProjectLocationWorkloadIdentityPoolGetCall<'a, S>

Create a builder to help you perform the following task:

Gets an individual WorkloadIdentityPool.

§Arguments
  • name - Required. The name of the pool to retrieve.
source

pub fn locations_workload_identity_pools_list( &self, parent: &str ) -> ProjectLocationWorkloadIdentityPoolListCall<'a, S>

Create a builder to help you perform the following task:

Lists all non-deleted WorkloadIdentityPools in a project. If show_deleted is set to true, then deleted pools are also listed.

§Arguments
  • parent - Required. The parent resource to list pools for.
source

pub fn locations_workload_identity_pools_patch( &self, request: WorkloadIdentityPool, name: &str ) -> ProjectLocationWorkloadIdentityPoolPatchCall<'a, S>

Create a builder to help you perform the following task:

Updates an existing WorkloadIdentityPool.

§Arguments
  • request - No description provided.
  • name - Output only. The resource name of the pool.
source

pub fn locations_workload_identity_pools_undelete( &self, request: UndeleteWorkloadIdentityPoolRequest, name: &str ) -> ProjectLocationWorkloadIdentityPoolUndeleteCall<'a, S>

Create a builder to help you perform the following task:

Undeletes a WorkloadIdentityPool, as long as it was deleted fewer than 30 days ago.

§Arguments
  • request - No description provided.
  • name - Required. The name of the pool to undelete.
source

pub fn roles_create( &self, request: CreateRoleRequest, parent: &str ) -> ProjectRoleCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a new custom Role.

§Arguments
  • request - No description provided.
  • parent - The parent parameter’s value depends on the target resource for the request, namely projects or organizations. Each resource type’s parent value format is described below: * projects.roles.create(): projects/{PROJECT_ID}. This method creates project-level custom roles. Example request URL: https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles * organizations.roles.create(): organizations/{ORGANIZATION_ID}. This method creates organization-level custom roles. Example request URL: https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.
source

pub fn roles_delete(&self, name: &str) -> ProjectRoleDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed.

§Arguments
  • name - The name parameter’s value depends on the target resource for the request, namely projects or organizations. Each resource type’s name value format is described below: * projects.roles.delete(): projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}. This method deletes only custom roles that have been created at the project level. Example request URL: https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} * organizations.roles.delete(): organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}. This method deletes only custom roles that have been created at the organization level. Example request URL: https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID} Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.
source

pub fn roles_get(&self, name: &str) -> ProjectRoleGetCall<'a, S>

Create a builder to help you perform the following task:

Gets the definition of a Role.

§Arguments
  • name - The name parameter’s value depends on the target resource for the request, namely roles, projects, or organizations. Each resource type’s name value format is described below: * roles.get(): roles/{ROLE_NAME}. This method returns results from all predefined roles in Cloud IAM. Example request URL: https://iam.googleapis.com/v1/roles/{ROLE_NAME} * projects.roles.get(): projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}. This method returns only custom roles that have been created at the project level. Example request URL: https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} * organizations.roles.get(): organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}. This method returns only custom roles that have been created at the organization level. Example request URL: https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID} Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.
source

pub fn roles_list(&self, parent: &str) -> ProjectRoleListCall<'a, S>

Create a builder to help you perform the following task:

Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project.

§Arguments
  • parent - The parent parameter’s value depends on the target resource for the request, namely roles, projects, or organizations. Each resource type’s parent value format is described below: * roles.list(): An empty string. This method doesn’t require a resource; it simply returns all predefined roles in Cloud IAM. Example request URL: https://iam.googleapis.com/v1/roles * projects.roles.list(): projects/{PROJECT_ID}. This method lists all project-level custom roles. Example request URL: https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles * organizations.roles.list(): organizations/{ORGANIZATION_ID}. This method lists all organization-level custom roles. Example request URL: https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.
source

pub fn roles_patch( &self, request: Role, name: &str ) -> ProjectRolePatchCall<'a, S>

Create a builder to help you perform the following task:

Updates the definition of a custom Role.

§Arguments
  • request - No description provided.
  • name - The name parameter’s value depends on the target resource for the request, namely projects or organizations. Each resource type’s name value format is described below: * projects.roles.patch(): projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}. This method updates only custom roles that have been created at the project level. Example request URL: https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} * organizations.roles.patch(): organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}. This method updates only custom roles that have been created at the organization level. Example request URL: https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID} Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.
source

pub fn roles_undelete( &self, request: UndeleteRoleRequest, name: &str ) -> ProjectRoleUndeleteCall<'a, S>

Create a builder to help you perform the following task:

Undeletes a custom Role.

§Arguments
  • request - No description provided.
  • name - The name parameter’s value depends on the target resource for the request, namely projects or organizations. Each resource type’s name value format is described below: * projects.roles.undelete(): projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}. This method undeletes only custom roles that have been created at the project level. Example request URL: https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} * organizations.roles.undelete(): organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}. This method undeletes only custom roles that have been created at the organization level. Example request URL: https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID} Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.
source

pub fn service_accounts_keys_create( &self, request: CreateServiceAccountKeyRequest, name: &str ) -> ProjectServiceAccountKeyCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a ServiceAccountKey.

§Arguments
  • request - No description provided.
  • name - Required. The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_keys_delete( &self, name: &str ) -> ProjectServiceAccountKeyDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes a ServiceAccountKey. Deleting a service account key does not revoke short-lived credentials that have been issued based on the service account key.

§Arguments
  • name - Required. The resource name of the service account key. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID} * projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key projects/-/serviceAccounts/fake@example.com/keys/fake-key, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_keys_disable( &self, request: DisableServiceAccountKeyRequest, name: &str ) -> ProjectServiceAccountKeyDisableCall<'a, S>

Create a builder to help you perform the following task:

Disable a ServiceAccountKey. A disabled service account key can be re-enabled with EnableServiceAccountKey.

§Arguments
  • request - No description provided.
  • name - Required. The resource name of the service account key. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID} * projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key projects/-/serviceAccounts/fake@example.com/keys/fake-key, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_keys_enable( &self, request: EnableServiceAccountKeyRequest, name: &str ) -> ProjectServiceAccountKeyEnableCall<'a, S>

Create a builder to help you perform the following task:

Enable a ServiceAccountKey.

§Arguments
  • request - No description provided.
  • name - Required. The resource name of the service account key. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID} * projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key projects/-/serviceAccounts/fake@example.com/keys/fake-key, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_keys_get( &self, name: &str ) -> ProjectServiceAccountKeyGetCall<'a, S>

Create a builder to help you perform the following task:

Gets a ServiceAccountKey.

§Arguments
  • name - Required. The resource name of the service account key. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID} * projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key projects/-/serviceAccounts/fake@example.com/keys/fake-key, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_keys_list( &self, name: &str ) -> ProjectServiceAccountKeyListCall<'a, S>

Create a builder to help you perform the following task:

Lists every ServiceAccountKey for a service account.

§Arguments
  • name - Required. The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_keys_upload( &self, request: UploadServiceAccountKeyRequest, name: &str ) -> ProjectServiceAccountKeyUploadCall<'a, S>

Create a builder to help you perform the following task:

Uploads the public key portion of a key pair that you manage, and associates the public key with a ServiceAccount. After you upload the public key, you can use the private key from the key pair as a service account key.

§Arguments
  • request - No description provided.
  • name - The resource name of the service account key. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_create( &self, request: CreateServiceAccountRequest, name: &str ) -> ProjectServiceAccountCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a ServiceAccount.

§Arguments
  • request - No description provided.
  • name - Required. The resource name of the project associated with the service accounts, such as projects/my-project-123.
source

pub fn service_accounts_delete( &self, name: &str ) -> ProjectServiceAccountDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes a ServiceAccount. Warning: After you delete a service account, you might not be able to undelete it. If you know that you need to re-enable the service account in the future, use DisableServiceAccount instead. If you delete a service account, IAM permanently removes the service account 30 days later. Google Cloud cannot recover the service account after it is permanently removed, even if you file a support request. To help avoid unplanned outages, we recommend that you disable the service account before you delete it. Use DisableServiceAccount to disable the service account, then wait at least 24 hours and watch for unintended consequences. If there are no unintended consequences, you can delete the service account.

§Arguments
  • name - Required. The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_disable( &self, request: DisableServiceAccountRequest, name: &str ) -> ProjectServiceAccountDisableCall<'a, S>

Create a builder to help you perform the following task:

Disables a ServiceAccount immediately. If an application uses the service account to authenticate, that application can no longer call Google APIs or access Google Cloud resources. Existing access tokens for the service account are rejected, and requests for new access tokens will fail. To re-enable the service account, use EnableServiceAccount. After you re-enable the service account, its existing access tokens will be accepted, and you can request new access tokens. To help avoid unplanned outages, we recommend that you disable the service account before you delete it. Use this method to disable the service account, then wait at least 24 hours and watch for unintended consequences. If there are no unintended consequences, you can delete the service account with DeleteServiceAccount.

§Arguments
  • request - No description provided.
  • name - The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_enable( &self, request: EnableServiceAccountRequest, name: &str ) -> ProjectServiceAccountEnableCall<'a, S>

Create a builder to help you perform the following task:

Enables a ServiceAccount that was disabled by DisableServiceAccount. If the service account is already enabled, then this method has no effect. If the service account was disabled by other means—for example, if Google disabled the service account because it was compromised—you cannot use this method to enable the service account.

§Arguments
  • request - No description provided.
  • name - The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_get( &self, name: &str ) -> ProjectServiceAccountGetCall<'a, S>

Create a builder to help you perform the following task:

Gets a ServiceAccount.

§Arguments
  • name - Required. The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_get_iam_policy( &self, resource: &str ) -> ProjectServiceAccountGetIamPolicyCall<'a, S>

Create a builder to help you perform the following task:

Gets the IAM policy that is attached to a ServiceAccount. This IAM policy specifies which principals have access to the service account. This method does not tell you whether the service account has been granted any roles on other resources. To check whether a service account has role grants on a resource, use the getIamPolicy method for that resource. For example, to view the role grants for a project, call the Resource Manager API’s projects.getIamPolicy method.

§Arguments
  • resource - REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
source

pub fn service_accounts_list( &self, name: &str ) -> ProjectServiceAccountListCall<'a, S>

Create a builder to help you perform the following task:

Lists every ServiceAccount that belongs to a specific project.

§Arguments
  • name - Required. The resource name of the project associated with the service accounts, such as projects/my-project-123.
source

pub fn service_accounts_patch( &self, request: PatchServiceAccountRequest, name: &str ) -> ProjectServiceAccountPatchCall<'a, S>

Create a builder to help you perform the following task:

Patches a ServiceAccount.

§Arguments
  • request - No description provided.
  • name - The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str ) -> ProjectServiceAccountSetIamPolicyCall<'a, S>

Create a builder to help you perform the following task:

Sets the IAM policy that is attached to a ServiceAccount. Use this method to grant or revoke access to the service account. For example, you could grant a principal the ability to impersonate the service account. This method does not enable the service account to access other resources. To grant roles to a service account on a resource, follow these steps: 1. Call the resource’s getIamPolicy method to get its current IAM policy. 2. Edit the policy so that it binds the service account to an IAM role for the resource. 3. Call the resource’s setIamPolicy method to update its IAM policy. For detailed instructions, see Manage access to project, folders, and organizations or Manage access to other resources.

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.
source

pub fn service_accounts_sign_blob( &self, request: SignBlobRequest, name: &str ) -> ProjectServiceAccountSignBlobCall<'a, S>

Create a builder to help you perform the following task:

Note: This method is deprecated. Use the signBlob method in the IAM Service Account Credentials API instead. If you currently use this method, see the migration guide for instructions. Signs a blob using the system-managed private key for a ServiceAccount.

§Arguments
  • request - No description provided.
  • name - Required. Deprecated. Migrate to Service Account Credentials API. The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_sign_jwt( &self, request: SignJwtRequest, name: &str ) -> ProjectServiceAccountSignJwtCall<'a, S>

Create a builder to help you perform the following task:

Note: This method is deprecated. Use the signJwt method in the IAM Service Account Credentials API instead. If you currently use this method, see the migration guide for instructions. Signs a JSON Web Token (JWT) using the system-managed private key for a ServiceAccount.

§Arguments
  • request - No description provided.
  • name - Required. Deprecated. Migrate to Service Account Credentials API. The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str ) -> ProjectServiceAccountTestIamPermissionCall<'a, S>

Create a builder to help you perform the following task:

Tests whether the caller has the specified permissions on a ServiceAccount.

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.
source

pub fn service_accounts_undelete( &self, request: UndeleteServiceAccountRequest, name: &str ) -> ProjectServiceAccountUndeleteCall<'a, S>

Create a builder to help you perform the following task:

Restores a deleted ServiceAccount. Important: It is not always possible to restore a deleted service account. Use this method only as a last resort. After you delete a service account, IAM permanently removes the service account 30 days later. There is no way to restore a deleted service account that has been permanently removed.

§Arguments
  • request - No description provided.
  • name - The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
source

pub fn service_accounts_update( &self, request: ServiceAccount, name: &str ) -> ProjectServiceAccountUpdateCall<'a, S>

Create a builder to help you perform the following task:

Note: We are in the process of deprecating this method. Use PatchServiceAccount instead. Updates a ServiceAccount. You can update only the display_name field.

§Arguments
  • request - No description provided.
  • name - The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.

Trait Implementations§

source§

impl<'a, S> MethodsBuilder for ProjectMethods<'a, S>

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for ProjectMethods<'a, S>

§

impl<'a, S> Send for ProjectMethods<'a, S>
where S: Sync,

§

impl<'a, S> Sync for ProjectMethods<'a, S>
where S: Sync,

§

impl<'a, S> Unpin for ProjectMethods<'a, S>

§

impl<'a, S> !UnwindSafe for ProjectMethods<'a, S>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more