pub struct OrganizationClient { /* private fields */ }Expand description
Calls OrganizationService.
Organizations: the account a company’s projects, members and billing
belong to. Every project is in exactly one organization, and access to an
organization is granted with roles in the IAM API (iam.origincloudapis.eu).
Implementations§
Source§impl OrganizationClient
impl OrganizationClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of OrganizationService that sends its calls through client.
Sourcepub fn service(&self) -> &Service
pub fn service(&self) -> &Service
The endpoint the client sends its calls to, which also serves the operations its methods answer with.
Sourcepub async fn get_organization(
&self,
request: GetOrganizationRequest,
) -> Result<Organization, Error>
pub async fn get_organization( &self, request: GetOrganizationRequest, ) -> Result<Organization, Error>
Returns an organization.
Sourcepub async fn list_organizations(
&self,
request: ListOrganizationsRequest,
) -> Result<ListOrganizationsResponse, Error>
pub async fn list_organizations( &self, request: ListOrganizationsRequest, ) -> Result<ListOrganizationsResponse, Error>
Lists the organizations the caller holds a role in, oldest first.
Sourcepub fn all_organizations(
&self,
request: ListOrganizationsRequest,
) -> Pages<Organization>
pub fn all_organizations( &self, request: ListOrganizationsRequest, ) -> Pages<Organization>
Returns everything list_organizations lists from request’s page on, fetching the next page as the stream reaches it. A page that fails ends the stream with its error.
Sourcepub async fn create_organization(
&self,
request: CreateOrganizationRequest,
) -> Result<Organization, Error>
pub async fn create_organization( &self, request: CreateOrganizationRequest, ) -> Result<Organization, Error>
Creates an organization. Any signed-in user can create one, and becomes
its owner and the administrator of its default billing account, which
is created with it without billing details: the organization can’t be
invoiced until they are set with the billing API
(billing.origincloudapis.eu). A new organization is either organization::State::Active
at once or organization::State::PendingReview, depending on the platform’s free capacity.
Sourcepub async fn update_organization(
&self,
request: UpdateOrganizationRequest,
) -> Result<Organization, Error>
pub async fn update_organization( &self, request: UpdateOrganizationRequest, ) -> Result<Organization, Error>
Renames an organization.
Sourcepub async fn delete_organization(
&self,
request: DeleteOrganizationRequest,
) -> Result<Empty, Error>
pub async fn delete_organization( &self, request: DeleteOrganizationRequest, ) -> Result<Empty, Error>
Deletes an organization. Refused as a CONFLICT while it
still has a project: delete its projects first. Its quota and every
role granted in it go with it. Its billing accounts stay, with their
spend limits, so the last period can still be invoiced.
Sourcepub async fn get_organization_quota(
&self,
request: GetOrganizationQuotaRequest,
) -> Result<OrganizationQuota, Error>
pub async fn get_organization_quota( &self, request: GetOrganizationQuotaRequest, ) -> Result<OrganizationQuota, Error>
Returns an organization’s quota: the most of each kind of resource its projects may hold together, and how much of it they use. The limits are set by the platform; ask support to raise one.