Allows users to manage their organization resources.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
OrganizationsClient(OrganizationsClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
OrganizationsClient const &
|
OrganizationsClient(OrganizationsClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
OrganizationsClient &&
|
OrganizationsClient(std::shared_ptr< OrganizationsConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< OrganizationsConnection >
|
opts |
Options
|
Operators
operator=(OrganizationsClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
OrganizationsClient const &
|
Returns | |
---|---|
Type | Description |
OrganizationsClient & |
operator=(OrganizationsClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
OrganizationsClient &&
|
Returns | |
---|---|
Type | Description |
OrganizationsClient & |
Functions
GetOrganization(std::string const &, Options)
Fetches an organization resource identified by the specified resource name.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/[organizationId]". For example, "organizations/1234". |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::resourcemanager::v3::Organization > | the result of the RPC. The response message type (google.cloud.resourcemanager.v3.Organization) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetOrganization(google::cloud::resourcemanager::v3::GetOrganizationRequest const &, Options)
Fetches an organization resource identified by the specified resource name.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::resourcemanager::v3::GetOrganizationRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::resourcemanager::v3::Organization > | the result of the RPC. The response message type (google.cloud.resourcemanager.v3.Organization) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
SearchOrganizations(std::string const &, Options)
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
Parameters | |||||||||
---|---|---|---|---|---|---|---|---|---|
Name | Description | ||||||||
query |
std::string const &
Optional. An optional query string used to filter the Organizations to return in the response. Query rules are case-insensitive.
| ||||||||
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::resourcemanager::v3::Organization > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
SearchOrganizations(google::cloud::resourcemanager::v3::SearchOrganizationsRequest, Options)
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
Parameters | |
---|---|
Name | Description |
request |
google::cloud::resourcemanager::v3::SearchOrganizationsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::resourcemanager::v3::Organization > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
GetIamPolicy(std::string const &, Options)
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.
Parameters | |
---|---|
Name | Description |
resource |
std::string const &
REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::iam::v1::Policy > | the result of the RPC. The response message type (google.iam.v1.Policy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &, Options)
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.
Parameters | |
---|---|
Name | Description |
request |
google::iam::v1::GetIamPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::iam::v1::Policy > | the result of the RPC. The response message type (google.iam.v1.Policy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
SetIamPolicy(std::string const &, Options)
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.
Parameters | |
---|---|
Name | Description |
resource |
std::string const &
REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::iam::v1::Policy > | the result of the RPC. The response message type (google.iam.v1.Policy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &, Options)
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.
Parameters | |
---|---|
Name | Description |
request |
google::iam::v1::SetIamPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::iam::v1::Policy > | the result of the RPC. The response message type (google.iam.v1.Policy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
TestIamPermissions(std::string const &, std::vector< std::string > const &, Options)
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.
Parameters | |
---|---|
Name | Description |
resource |
std::string const &
REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions |
std::vector< std::string > const &
The set of permissions to check for the |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::iam::v1::TestIamPermissionsResponse > | the result of the RPC. The response message type (google.iam.v1.TestIamPermissionsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &, Options)
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.
Parameters | |
---|---|
Name | Description |
request |
google::iam::v1::TestIamPermissionsRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::iam::v1::TestIamPermissionsResponse > | the result of the RPC. The response message type (google.iam.v1.TestIamPermissionsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |