Reference documentation and code samples for the Identity and Access Management (IAM) V3BETA API class Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.
Client for the PrincipalAccessBoundaryPolicies service.
Manages Identity and Access Management (IAM) principal access boundary policies.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the PrincipalAccessBoundaryPolicies Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all PrincipalAccessBoundaryPolicies clients ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the PrincipalAccessBoundaryPolicies Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_principal_access_boundary_policy
def create_principal_access_boundary_policy(request, options = nil) -> ::Gapic::Operation
def create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) -> ::Gapic::Operation
Creates a principal access boundary policy, and returns a long running operation.
def create_principal_access_boundary_policy(request, options = nil) -> ::Gapic::Operation
create_principal_access_boundary_policy
via a request object, either of type
CreatePrincipalAccessBoundaryPolicyRequest or an equivalent Hash.
- request (::Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_principal_access_boundary_policy(parent: nil, principal_access_boundary_policy_id: nil, principal_access_boundary_policy: nil, validate_only: nil) -> ::Gapic::Operation
create_principal_access_boundary_policy
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent resource where this principal access boundary policy
will be created. Only organizations are supported.
Format:
organizations/{organization_id}/locations/{location}
-
principal_access_boundary_policy_id (::String) — Required. The ID to use for the principal access boundary policy, which
will become the final component of the principal access boundary policy's
resource name.
This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-.]{2,62}/.
- principal_access_boundary_policy (::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash) — Required. The principal access boundary policy to create.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the creation, but do not actually post it.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/iam/v3beta" # Create a client object. The client can be reused for multiple calls. client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V3beta::CreatePrincipalAccessBoundaryPolicyRequest.new # Call the create_principal_access_boundary_policy method. result = client.create_principal_access_boundary_policy request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_principal_access_boundary_policy
def delete_principal_access_boundary_policy(request, options = nil) -> ::Gapic::Operation
def delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) -> ::Gapic::Operation
Deletes a principal access boundary policy.
def delete_principal_access_boundary_policy(request, options = nil) -> ::Gapic::Operation
delete_principal_access_boundary_policy
via a request object, either of type
DeletePrincipalAccessBoundaryPolicyRequest or an equivalent Hash.
- request (::Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_principal_access_boundary_policy(name: nil, etag: nil, validate_only: nil, force: nil) -> ::Gapic::Operation
delete_principal_access_boundary_policy
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the principal access boundary policy to delete.
Format:
organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}
- etag (::String) — Optional. The etag of the principal access boundary policy. If this is provided, it must match the server's etag.
- validate_only (::Boolean) — Optional. If set, validate the request and preview the deletion, but do not actually post it.
- force (::Boolean) — Optional. If set to true, the request will force the deletion of the policy even if the policy is referenced in policy bindings.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/iam/v3beta" # Create a client object. The client can be reused for multiple calls. client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V3beta::DeletePrincipalAccessBoundaryPolicyRequest.new # Call the delete_principal_access_boundary_policy method. result = client.delete_principal_access_boundary_policy request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_principal_access_boundary_policy
def get_principal_access_boundary_policy(request, options = nil) -> ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy
def get_principal_access_boundary_policy(name: nil) -> ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy
Gets a principal access boundary policy.
def get_principal_access_boundary_policy(request, options = nil) -> ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy
get_principal_access_boundary_policy
via a request object, either of type
GetPrincipalAccessBoundaryPolicyRequest or an equivalent Hash.
- request (::Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_principal_access_boundary_policy(name: nil) -> ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy
get_principal_access_boundary_policy
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the principal access boundary policy to retrieve.
Format:
organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/iam/v3beta" # Create a client object. The client can be reused for multiple calls. client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V3beta::GetPrincipalAccessBoundaryPolicyRequest.new # Call the get_principal_access_boundary_policy method. result = client.get_principal_access_boundary_policy request # The returned object is of type Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new PrincipalAccessBoundaryPolicies client object.
- (config) — Configure the PrincipalAccessBoundaryPolicies client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new # Create a client using a custom configuration client = ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new do |config| config.timeout = 10.0 end
#list_principal_access_boundary_policies
def list_principal_access_boundary_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>
def list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>
Lists principal access boundary policies.
def list_principal_access_boundary_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>
list_principal_access_boundary_policies
via a request object, either of type
ListPrincipalAccessBoundaryPoliciesRequest or an equivalent Hash.
- request (::Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_principal_access_boundary_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>
list_principal_access_boundary_policies
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent resource, which owns the collection of principal
access boundary policies.
Format:
organizations/{organization_id}/locations/{location}
-
page_size (::Integer) — Optional. The maximum number of principal access boundary policies to
return. The service may return fewer than this value.
If unspecified, at most 50 principal access boundary policies will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — Optional. A page token, received from a previous
ListPrincipalAccessBoundaryPolicies
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListPrincipalAccessBoundaryPolicies
must match the call that provided the page token.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/iam/v3beta" # Create a client object. The client can be reused for multiple calls. client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V3beta::ListPrincipalAccessBoundaryPoliciesRequest.new # Call the list_principal_access_boundary_policies method. result = client.list_principal_access_boundary_policies request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Operations
Get the associated client for long-running operations.
#search_principal_access_boundary_policy_bindings
def search_principal_access_boundary_policy_bindings(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>
def search_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>
Returns all policy bindings that bind a specific policy if a user has searchPolicyBindings permission on that policy.
def search_principal_access_boundary_policy_bindings(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>
search_principal_access_boundary_policy_bindings
via a request object, either of type
SearchPrincipalAccessBoundaryPolicyBindingsRequest or an equivalent Hash.
- request (::Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def search_principal_access_boundary_policy_bindings(name: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>
search_principal_access_boundary_policy_bindings
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the principal access boundary policy.
Format:
organizations/{organization_id}/locations/{location}/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}
-
page_size (::Integer) — Optional. The maximum number of policy bindings to return. The service may
return fewer than this value.
If unspecified, at most 50 policy bindings will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — Optional. A page token, received from a previous
SearchPrincipalAccessBoundaryPolicyBindingsRequest
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
SearchPrincipalAccessBoundaryPolicyBindingsRequest
must match the call that provided the page token.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Iam::V3beta::PolicyBinding>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/iam/v3beta" # Create a client object. The client can be reused for multiple calls. client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V3beta::SearchPrincipalAccessBoundaryPolicyBindingsRequest.new # Call the search_principal_access_boundary_policy_bindings method. result = client.search_principal_access_boundary_policy_bindings request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Iam::V3beta::PolicyBinding. p item end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_principal_access_boundary_policy
def update_principal_access_boundary_policy(request, options = nil) -> ::Gapic::Operation
def update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) -> ::Gapic::Operation
Updates a principal access boundary policy.
def update_principal_access_boundary_policy(request, options = nil) -> ::Gapic::Operation
update_principal_access_boundary_policy
via a request object, either of type
UpdatePrincipalAccessBoundaryPolicyRequest or an equivalent Hash.
- request (::Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_principal_access_boundary_policy(principal_access_boundary_policy: nil, validate_only: nil, update_mask: nil) -> ::Gapic::Operation
update_principal_access_boundary_policy
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
principal_access_boundary_policy (::Google::Iam::V3beta::PrincipalAccessBoundaryPolicy, ::Hash) — Required. The principal access boundary policy to update.
The principal access boundary policy's
name
field is used to identify the policy to update. - validate_only (::Boolean) — Optional. If set, validate the request and preview the update, but do not actually post it.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. The list of fields to update
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/iam/v3beta" # Create a client object. The client can be reused for multiple calls. client = Google::Iam::V3beta::PrincipalAccessBoundaryPolicies::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Iam::V3beta::UpdatePrincipalAccessBoundaryPolicyRequest.new # Call the update_principal_access_boundary_policy method. result = client.update_principal_access_boundary_policy request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end