pub struct Organizations { /* private fields */ }Expand description
Implements a client for the Cloud Resource Manager API.
§Example
let client = Organizations::builder().build().await?;
// use `client` to make requests to the Cloud Resource Manager API.§Service Description
Allows users to manage their organization resources.
§Configuration
To configure Organizations use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://cloudresourcemanager.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
Organizations holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap Organizations in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl Organizations
impl Organizations
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for Organizations.
let client = Organizations::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: Organizations + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: Organizations + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn get_organization(&self) -> GetOrganization
pub fn get_organization(&self) -> GetOrganization
Fetches an organization resource identified by the specified resource name.
Sourcepub fn search_organizations(&self) -> SearchOrganizations
pub fn search_organizations(&self) -> SearchOrganizations
Searches organization resources that are visible to the user and satisfy the specified filter. This method returns organizations in an unspecified order. New organizations do not necessarily appear at the end of the results, and may take a small amount of time to appear.
Search will only return organizations on which the user has the permission
resourcemanager.organizations.get
Sourcepub fn get_iam_policy(&self) -> GetIamPolicy
pub fn get_iam_policy(&self) -> GetIamPolicy
Gets the access control policy for an organization resource. The policy may
be empty if no such policy or resource exists. The resource field should
be the organization’s resource name, for example: “organizations/123”.
Authorization requires the IAM permission
resourcemanager.organizations.getIamPolicy on the specified organization.
Sourcepub fn set_iam_policy(&self) -> SetIamPolicy
pub fn set_iam_policy(&self) -> SetIamPolicy
Sets the access control policy on an organization resource. Replaces any
existing policy. The resource field should be the organization’s resource
name, for example: “organizations/123”.
Authorization requires the IAM permission
resourcemanager.organizations.setIamPolicy on the specified organization.
Sourcepub fn test_iam_permissions(&self) -> TestIamPermissions
pub fn test_iam_permissions(&self) -> TestIamPermissions
Returns the permissions that a caller has on the specified organization.
The resource field should be the organization’s resource name,
for example: “organizations/123”.
There are no permissions required for making this API call.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for Organizations
impl Clone for Organizations
Source§fn clone(&self) -> Organizations
fn clone(&self) -> Organizations
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more