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 CloudKMS hub.

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_cloudkms1_beta1 as cloudkms1_beta1;
 
use std::default::Default;
use cloudkms1_beta1::{CloudKMS, 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 = CloudKMS::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_get(...)`, `locations_key_rings_create(...)`, `locations_key_rings_crypto_keys_create(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_create(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_destroy(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_get(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_list(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_patch(...)`, `locations_key_rings_crypto_keys_crypto_key_versions_restore(...)`, `locations_key_rings_crypto_keys_decrypt(...)`, `locations_key_rings_crypto_keys_encrypt(...)`, `locations_key_rings_crypto_keys_get(...)`, `locations_key_rings_crypto_keys_get_iam_policy(...)`, `locations_key_rings_crypto_keys_list(...)`, `locations_key_rings_crypto_keys_patch(...)`, `locations_key_rings_crypto_keys_set_iam_policy(...)`, `locations_key_rings_crypto_keys_test_iam_permissions(...)`, `locations_key_rings_crypto_keys_update_primary_version(...)`, `locations_key_rings_get(...)`, `locations_key_rings_get_iam_policy(...)`, `locations_key_rings_list(...)`, `locations_key_rings_set_iam_policy(...)`, `locations_key_rings_test_iam_permissions(...)` and `locations_list(...)`
// to build up your call.
let rb = hub.projects();

Implementations§

source§

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

source

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

Create a builder to help you perform the following task:

Lists CryptoKeyVersions.

§Arguments
  • parent - Required. The resource name of the CryptoKey to list, in the format projects/*/locations/*/keyRings/*/cryptoKeys/*.
source

pub fn locations_key_rings_crypto_keys_crypto_key_versions_create( &self, request: CryptoKeyVersion, parent: &str ) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, S>

Create a builder to help you perform the following task:

Create a new CryptoKeyVersion in a CryptoKey.

The server will assign the next sequential id. If unset, state will be set to ENABLED.

§Arguments
  • request - No description provided.
  • parent - Required. The name of the CryptoKey associated with the CryptoKeyVersions.
source

pub fn locations_key_rings_crypto_keys_crypto_key_versions_destroy( &self, request: DestroyCryptoKeyVersionRequest, name: &str ) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, S>

Create a builder to help you perform the following task:

Schedule a CryptoKeyVersion for destruction.

Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED and destroy_time will be set to a time 24 hours in the future, at which point the state will be changed to DESTROYED, and the key material will be irrevocably destroyed.

Before the destroy_time is reached, RestoreCryptoKeyVersion may be called to reverse the process.

§Arguments
  • request - No description provided.
  • name - The resource name of the CryptoKeyVersion to destroy.
source

pub fn locations_key_rings_crypto_keys_crypto_key_versions_restore( &self, request: RestoreCryptoKeyVersionRequest, name: &str ) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, S>

Create a builder to help you perform the following task:

Restore a CryptoKeyVersion in the DESTROY_SCHEDULED, state.

Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will be cleared.

§Arguments
  • request - No description provided.
  • name - The resource name of the CryptoKeyVersion to restore.
source

pub fn locations_key_rings_crypto_keys_crypto_key_versions_patch( &self, request: CryptoKeyVersion, name: &str ) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, S>

Create a builder to help you perform the following task:

Update a CryptoKeyVersion’s metadata.

state may be changed between ENABLED and DISABLED using this method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to move between other states.

§Arguments
  • request - No description provided.
  • name - Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.
source

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

Create a builder to help you perform the following task:

Returns metadata for a given CryptoKeyVersion.

§Arguments
  • name - The name of the CryptoKeyVersion to get.
source

pub fn locations_key_rings_crypto_keys_patch( &self, request: CryptoKey, name: &str ) -> ProjectLocationKeyRingCryptoKeyPatchCall<'a, S>

Create a builder to help you perform the following task:

Update a CryptoKey.

§Arguments
  • request - No description provided.
  • name - Output only. The resource name for this CryptoKey in the format projects/*/locations/*/keyRings/*/cryptoKeys/*.
source

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

Create a builder to help you perform the following task:

Returns metadata for a given CryptoKey, as well as its primary CryptoKeyVersion.

§Arguments
  • name - The name of the CryptoKey to get.
source

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

Create a builder to help you perform the following task:

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

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

pub fn locations_key_rings_crypto_keys_decrypt( &self, request: DecryptRequest, name: &str ) -> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, S>

Create a builder to help you perform the following task:

Decrypt data that was protected by Encrypt.

§Arguments
  • request - No description provided.
  • name - Required. The resource name of the CryptoKey to use for decryption. The server will choose the appropriate version.
source

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

Create a builder to help you perform the following task:

Lists CryptoKeys.

§Arguments
  • parent - Required. The resource name of the KeyRing to list, in the format projects/*/locations/*/keyRings/*.
source

pub fn locations_key_rings_crypto_keys_encrypt( &self, request: EncryptRequest, name: &str ) -> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, S>

Create a builder to help you perform the following task:

Encrypt data, so that it can only be recovered by a call to Decrypt.

§Arguments
  • request - No description provided.
  • name - Required. The resource name of the CryptoKey or CryptoKeyVersion to use for encryption. If a CryptoKey is specified, the server will use its primary version.
source

pub fn locations_key_rings_crypto_keys_create( &self, request: CryptoKey, parent: &str ) -> ProjectLocationKeyRingCryptoKeyCreateCall<'a, S>

Create a builder to help you perform the following task:

Create a new CryptoKey within a KeyRing.

CryptoKey.purpose is required.

§Arguments
  • request - No description provided.
  • parent - Required. The name of the KeyRing associated with the CryptoKeys.
source

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

Create a builder to help you perform the following task:

Sets the access control policy on the specified resource. Replaces any existing policy.

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

pub fn locations_key_rings_crypto_keys_update_primary_version( &self, request: UpdateCryptoKeyPrimaryVersionRequest, name: &str ) -> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, S>

Create a builder to help you perform the following task:

Update the version of a CryptoKey that will be used in Encrypt

§Arguments
  • request - No description provided.
  • name - The resource name of the CryptoKey to update.
source

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

Create a builder to help you perform the following task:

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

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

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

Create a builder to help you perform the following task:

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

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

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

Create a builder to help you perform the following task:

Returns metadata for a given KeyRing.

§Arguments
  • name - The name of the KeyRing to get.
source

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

Create a builder to help you perform the following task:

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.

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

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

Create a builder to help you perform the following task:

Lists KeyRings.

§Arguments
  • parent - Required. The resource name of the location associated with the KeyRings, in the format projects/*/locations/*.
source

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

Create a builder to help you perform the following task:

Sets the access control policy on the specified resource. Replaces any existing policy.

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

pub fn locations_key_rings_create( &self, request: KeyRing, parent: &str ) -> ProjectLocationKeyRingCreateCall<'a, S>

Create a builder to help you perform the following task:

Create a new KeyRing in a given Project and Location.

§Arguments
  • request - No description provided.
  • parent - Required. The resource name of the location associated with the KeyRings, in the format projects/*/locations/*.
source

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

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.
source

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

Create a builder to help you perform the following task:

Get information about a location.

§Arguments
  • name - Resource name for the location.

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