pub struct ProjectMethods<'a, C>where
C: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on project resources.
It is not used directly, but through the SecretManager
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_secretmanager1 as secretmanager1;
use secretmanager1::{SecretManager, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http1()
.build()
);
let mut hub = SecretManager::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `locations_get(...)`, `locations_list(...)`, `locations_secrets_add_version(...)`, `locations_secrets_create(...)`, `locations_secrets_delete(...)`, `locations_secrets_get(...)`, `locations_secrets_get_iam_policy(...)`, `locations_secrets_list(...)`, `locations_secrets_patch(...)`, `locations_secrets_set_iam_policy(...)`, `locations_secrets_test_iam_permissions(...)`, `locations_secrets_versions_access(...)`, `locations_secrets_versions_destroy(...)`, `locations_secrets_versions_disable(...)`, `locations_secrets_versions_enable(...)`, `locations_secrets_versions_get(...)`, `locations_secrets_versions_list(...)`, `secrets_add_version(...)`, `secrets_create(...)`, `secrets_delete(...)`, `secrets_get(...)`, `secrets_get_iam_policy(...)`, `secrets_list(...)`, `secrets_patch(...)`, `secrets_set_iam_policy(...)`, `secrets_test_iam_permissions(...)`, `secrets_versions_access(...)`, `secrets_versions_destroy(...)`, `secrets_versions_disable(...)`, `secrets_versions_enable(...)`, `secrets_versions_get(...)` and `secrets_versions_list(...)`
// to build up your call.
let rb = hub.projects();
Implementations§
Source§impl<'a, C> ProjectMethods<'a, C>
impl<'a, C> ProjectMethods<'a, C>
Sourcepub fn locations_secrets_versions_access(
&self,
name: &str,
) -> ProjectLocationSecretVersionAccesCall<'a, C>
pub fn locations_secrets_versions_access( &self, name: &str, ) -> ProjectLocationSecretVersionAccesCall<'a, C>
Create a builder to help you perform the following task:
Accesses a SecretVersion. This call returns the secret data. projects/*/secrets/*/versions/latest
is an alias to the most recently created SecretVersion.
§Arguments
name
- Required. The resource name of the SecretVersion in the formatprojects/*/secrets/*/versions/*
orprojects/*/locations/*/secrets/*/versions/*
.projects/*/secrets/*/versions/latest
orprojects/*/locations/*/secrets/*/versions/latest
is an alias to the most recently created SecretVersion.
Sourcepub fn locations_secrets_versions_destroy(
&self,
request: DestroySecretVersionRequest,
name: &str,
) -> ProjectLocationSecretVersionDestroyCall<'a, C>
pub fn locations_secrets_versions_destroy( &self, request: DestroySecretVersionRequest, name: &str, ) -> ProjectLocationSecretVersionDestroyCall<'a, C>
Create a builder to help you perform the following task:
Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.
§Arguments
request
- No description provided.name
- Required. The resource name of the SecretVersion to destroy in the formatprojects/*/secrets/*/versions/*
orprojects/*/locations/*/secrets/*/versions/*
.
Sourcepub fn locations_secrets_versions_disable(
&self,
request: DisableSecretVersionRequest,
name: &str,
) -> ProjectLocationSecretVersionDisableCall<'a, C>
pub fn locations_secrets_versions_disable( &self, request: DisableSecretVersionRequest, name: &str, ) -> ProjectLocationSecretVersionDisableCall<'a, C>
Create a builder to help you perform the following task:
Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.
§Arguments
request
- No description provided.name
- Required. The resource name of the SecretVersion to disable in the formatprojects/*/secrets/*/versions/*
orprojects/*/locations/*/secrets/*/versions/*
.
Sourcepub fn locations_secrets_versions_enable(
&self,
request: EnableSecretVersionRequest,
name: &str,
) -> ProjectLocationSecretVersionEnableCall<'a, C>
pub fn locations_secrets_versions_enable( &self, request: EnableSecretVersionRequest, name: &str, ) -> ProjectLocationSecretVersionEnableCall<'a, C>
Create a builder to help you perform the following task:
Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.
§Arguments
request
- No description provided.name
- Required. The resource name of the SecretVersion to enable in the formatprojects/*/secrets/*/versions/*
orprojects/*/locations/*/secrets/*/versions/*
.
Sourcepub fn locations_secrets_versions_get(
&self,
name: &str,
) -> ProjectLocationSecretVersionGetCall<'a, C>
pub fn locations_secrets_versions_get( &self, name: &str, ) -> ProjectLocationSecretVersionGetCall<'a, C>
Create a builder to help you perform the following task:
Gets metadata for a SecretVersion. projects/*/secrets/*/versions/latest
is an alias to the most recently created SecretVersion.
§Arguments
name
- Required. The resource name of the SecretVersion in the formatprojects/*/secrets/*/versions/*
orprojects/*/locations/*/secrets/*/versions/*
.projects/*/secrets/*/versions/latest
orprojects/*/locations/*/secrets/*/versions/latest
is an alias to the most recently created SecretVersion.
Sourcepub fn locations_secrets_versions_list(
&self,
parent: &str,
) -> ProjectLocationSecretVersionListCall<'a, C>
pub fn locations_secrets_versions_list( &self, parent: &str, ) -> ProjectLocationSecretVersionListCall<'a, C>
Create a builder to help you perform the following task:
Lists SecretVersions. This call does not return secret data.
§Arguments
parent
- Required. The resource name of the Secret associated with the SecretVersions to list, in the formatprojects/*/secrets/*
orprojects/*/locations/*/secrets/*
.
Sourcepub fn locations_secrets_add_version(
&self,
request: AddSecretVersionRequest,
parent: &str,
) -> ProjectLocationSecretAddVersionCall<'a, C>
pub fn locations_secrets_add_version( &self, request: AddSecretVersionRequest, parent: &str, ) -> ProjectLocationSecretAddVersionCall<'a, C>
Create a builder to help you perform the following task:
Creates a new SecretVersion containing secret data and attaches it to an existing Secret.
§Arguments
request
- No description provided.parent
- Required. The resource name of the Secret to associate with the SecretVersion in the formatprojects/*/secrets/*
orprojects/*/locations/*/secrets/*
.
Sourcepub fn locations_secrets_create(
&self,
request: Secret,
parent: &str,
) -> ProjectLocationSecretCreateCall<'a, C>
pub fn locations_secrets_create( &self, request: Secret, parent: &str, ) -> ProjectLocationSecretCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a new Secret containing no SecretVersions.
§Arguments
request
- No description provided.parent
- Required. The resource name of the project to associate with the Secret, in the formatprojects/*
orprojects/*/locations/*
.
Sourcepub fn locations_secrets_delete(
&self,
name: &str,
) -> ProjectLocationSecretDeleteCall<'a, C>
pub fn locations_secrets_delete( &self, name: &str, ) -> ProjectLocationSecretDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a Secret.
§Arguments
name
- Required. The resource name of the Secret to delete in the formatprojects/*/secrets/*
.
Sourcepub fn locations_secrets_get(
&self,
name: &str,
) -> ProjectLocationSecretGetCall<'a, C>
pub fn locations_secrets_get( &self, name: &str, ) -> ProjectLocationSecretGetCall<'a, C>
Create a builder to help you perform the following task:
Gets metadata for a given Secret.
§Arguments
name
- Required. The resource name of the Secret, in the formatprojects/*/secrets/*
orprojects/*/locations/*/secrets/*
.
Sourcepub fn locations_secrets_get_iam_policy(
&self,
resource: &str,
) -> ProjectLocationSecretGetIamPolicyCall<'a, C>
pub fn locations_secrets_get_iam_policy( &self, resource: &str, ) -> ProjectLocationSecretGetIamPolicyCall<'a, C>
Create a builder to help you perform the following task:
Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.
§Arguments
resource
- REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
Sourcepub fn locations_secrets_list(
&self,
parent: &str,
) -> ProjectLocationSecretListCall<'a, C>
pub fn locations_secrets_list( &self, parent: &str, ) -> ProjectLocationSecretListCall<'a, C>
Create a builder to help you perform the following task:
Lists Secrets.
§Arguments
parent
- Required. The resource name of the project associated with the Secrets, in the formatprojects/*
orprojects/*/locations/*
Sourcepub fn locations_secrets_patch(
&self,
request: Secret,
name: &str,
) -> ProjectLocationSecretPatchCall<'a, C>
pub fn locations_secrets_patch( &self, request: Secret, name: &str, ) -> ProjectLocationSecretPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates metadata of an existing Secret.
§Arguments
request
- No description provided.name
- Output only. The resource name of the Secret in the formatprojects/*/secrets/*
.
Sourcepub fn locations_secrets_set_iam_policy(
&self,
request: SetIamPolicyRequest,
resource: &str,
) -> ProjectLocationSecretSetIamPolicyCall<'a, C>
pub fn locations_secrets_set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str, ) -> ProjectLocationSecretSetIamPolicyCall<'a, C>
Create a builder to help you perform the following task:
Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.
§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.
Sourcepub fn locations_secrets_test_iam_permissions(
&self,
request: TestIamPermissionsRequest,
resource: &str,
) -> ProjectLocationSecretTestIamPermissionCall<'a, C>
pub fn locations_secrets_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str, ) -> ProjectLocationSecretTestIamPermissionCall<'a, C>
Create a builder to help you perform the following task:
Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
§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.
Sourcepub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, C>
pub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, C>
Create a builder to help you perform the following task:
Gets information about a location.
§Arguments
name
- Resource name for the location.
Sourcepub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C>
pub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C>
Create a builder to help you perform the following task:
Lists information about the supported locations for this service.
§Arguments
name
- The resource that owns the locations collection, if applicable.
Sourcepub fn secrets_versions_access(
&self,
name: &str,
) -> ProjectSecretVersionAccesCall<'a, C>
pub fn secrets_versions_access( &self, name: &str, ) -> ProjectSecretVersionAccesCall<'a, C>
Create a builder to help you perform the following task:
Accesses a SecretVersion. This call returns the secret data. projects/*/secrets/*/versions/latest
is an alias to the most recently created SecretVersion.
§Arguments
name
- Required. The resource name of the SecretVersion in the formatprojects/*/secrets/*/versions/*
orprojects/*/locations/*/secrets/*/versions/*
.projects/*/secrets/*/versions/latest
orprojects/*/locations/*/secrets/*/versions/latest
is an alias to the most recently created SecretVersion.
Sourcepub fn secrets_versions_destroy(
&self,
request: DestroySecretVersionRequest,
name: &str,
) -> ProjectSecretVersionDestroyCall<'a, C>
pub fn secrets_versions_destroy( &self, request: DestroySecretVersionRequest, name: &str, ) -> ProjectSecretVersionDestroyCall<'a, C>
Create a builder to help you perform the following task:
Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.
§Arguments
request
- No description provided.name
- Required. The resource name of the SecretVersion to destroy in the formatprojects/*/secrets/*/versions/*
orprojects/*/locations/*/secrets/*/versions/*
.
Sourcepub fn secrets_versions_disable(
&self,
request: DisableSecretVersionRequest,
name: &str,
) -> ProjectSecretVersionDisableCall<'a, C>
pub fn secrets_versions_disable( &self, request: DisableSecretVersionRequest, name: &str, ) -> ProjectSecretVersionDisableCall<'a, C>
Create a builder to help you perform the following task:
Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.
§Arguments
request
- No description provided.name
- Required. The resource name of the SecretVersion to disable in the formatprojects/*/secrets/*/versions/*
orprojects/*/locations/*/secrets/*/versions/*
.
Sourcepub fn secrets_versions_enable(
&self,
request: EnableSecretVersionRequest,
name: &str,
) -> ProjectSecretVersionEnableCall<'a, C>
pub fn secrets_versions_enable( &self, request: EnableSecretVersionRequest, name: &str, ) -> ProjectSecretVersionEnableCall<'a, C>
Create a builder to help you perform the following task:
Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.
§Arguments
request
- No description provided.name
- Required. The resource name of the SecretVersion to enable in the formatprojects/*/secrets/*/versions/*
orprojects/*/locations/*/secrets/*/versions/*
.
Sourcepub fn secrets_versions_get(
&self,
name: &str,
) -> ProjectSecretVersionGetCall<'a, C>
pub fn secrets_versions_get( &self, name: &str, ) -> ProjectSecretVersionGetCall<'a, C>
Create a builder to help you perform the following task:
Gets metadata for a SecretVersion. projects/*/secrets/*/versions/latest
is an alias to the most recently created SecretVersion.
§Arguments
name
- Required. The resource name of the SecretVersion in the formatprojects/*/secrets/*/versions/*
orprojects/*/locations/*/secrets/*/versions/*
.projects/*/secrets/*/versions/latest
orprojects/*/locations/*/secrets/*/versions/latest
is an alias to the most recently created SecretVersion.
Sourcepub fn secrets_versions_list(
&self,
parent: &str,
) -> ProjectSecretVersionListCall<'a, C>
pub fn secrets_versions_list( &self, parent: &str, ) -> ProjectSecretVersionListCall<'a, C>
Create a builder to help you perform the following task:
Lists SecretVersions. This call does not return secret data.
§Arguments
parent
- Required. The resource name of the Secret associated with the SecretVersions to list, in the formatprojects/*/secrets/*
orprojects/*/locations/*/secrets/*
.
Sourcepub fn secrets_add_version(
&self,
request: AddSecretVersionRequest,
parent: &str,
) -> ProjectSecretAddVersionCall<'a, C>
pub fn secrets_add_version( &self, request: AddSecretVersionRequest, parent: &str, ) -> ProjectSecretAddVersionCall<'a, C>
Create a builder to help you perform the following task:
Creates a new SecretVersion containing secret data and attaches it to an existing Secret.
§Arguments
request
- No description provided.parent
- Required. The resource name of the Secret to associate with the SecretVersion in the formatprojects/*/secrets/*
orprojects/*/locations/*/secrets/*
.
Sourcepub fn secrets_create(
&self,
request: Secret,
parent: &str,
) -> ProjectSecretCreateCall<'a, C>
pub fn secrets_create( &self, request: Secret, parent: &str, ) -> ProjectSecretCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a new Secret containing no SecretVersions.
§Arguments
request
- No description provided.parent
- Required. The resource name of the project to associate with the Secret, in the formatprojects/*
orprojects/*/locations/*
.
Sourcepub fn secrets_delete(&self, name: &str) -> ProjectSecretDeleteCall<'a, C>
pub fn secrets_delete(&self, name: &str) -> ProjectSecretDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a Secret.
§Arguments
name
- Required. The resource name of the Secret to delete in the formatprojects/*/secrets/*
.
Sourcepub fn secrets_get(&self, name: &str) -> ProjectSecretGetCall<'a, C>
pub fn secrets_get(&self, name: &str) -> ProjectSecretGetCall<'a, C>
Create a builder to help you perform the following task:
Gets metadata for a given Secret.
§Arguments
name
- Required. The resource name of the Secret, in the formatprojects/*/secrets/*
orprojects/*/locations/*/secrets/*
.
Sourcepub fn secrets_get_iam_policy(
&self,
resource: &str,
) -> ProjectSecretGetIamPolicyCall<'a, C>
pub fn secrets_get_iam_policy( &self, resource: &str, ) -> ProjectSecretGetIamPolicyCall<'a, C>
Create a builder to help you perform the following task:
Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.
§Arguments
resource
- REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
Sourcepub fn secrets_list(&self, parent: &str) -> ProjectSecretListCall<'a, C>
pub fn secrets_list(&self, parent: &str) -> ProjectSecretListCall<'a, C>
Create a builder to help you perform the following task:
Lists Secrets.
§Arguments
parent
- Required. The resource name of the project associated with the Secrets, in the formatprojects/*
orprojects/*/locations/*
Sourcepub fn secrets_patch(
&self,
request: Secret,
name: &str,
) -> ProjectSecretPatchCall<'a, C>
pub fn secrets_patch( &self, request: Secret, name: &str, ) -> ProjectSecretPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates metadata of an existing Secret.
§Arguments
request
- No description provided.name
- Output only. The resource name of the Secret in the formatprojects/*/secrets/*
.
Sourcepub fn secrets_set_iam_policy(
&self,
request: SetIamPolicyRequest,
resource: &str,
) -> ProjectSecretSetIamPolicyCall<'a, C>
pub fn secrets_set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str, ) -> ProjectSecretSetIamPolicyCall<'a, C>
Create a builder to help you perform the following task:
Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.
§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.
Sourcepub fn secrets_test_iam_permissions(
&self,
request: TestIamPermissionsRequest,
resource: &str,
) -> ProjectSecretTestIamPermissionCall<'a, C>
pub fn secrets_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str, ) -> ProjectSecretTestIamPermissionCall<'a, C>
Create a builder to help you perform the following task:
Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
§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.
Trait Implementations§
impl<'a, C> MethodsBuilder for ProjectMethods<'a, C>
Auto Trait Implementations§
impl<'a, C> Freeze for ProjectMethods<'a, C>
impl<'a, C> !RefUnwindSafe for ProjectMethods<'a, C>
impl<'a, C> Send for ProjectMethods<'a, C>where
C: Sync,
impl<'a, C> Sync for ProjectMethods<'a, C>where
C: Sync,
impl<'a, C> Unpin for ProjectMethods<'a, C>
impl<'a, C> !UnwindSafe for ProjectMethods<'a, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more