Reference documentation and code samples for the Access Context Manager V1 API class Google::Identity::AccessContextManager::V1::AccessContextManager::Client.
Client for the AccessContextManager service.
API for setting [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for Google Cloud Projects. Each organization has one [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] containing the [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] and [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter]. This [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] is applicable to all resources in the organization. AccessPolicies
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the AccessContextManager Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all AccessContextManager clients ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.configure do |config| config.timeout = 10.0 end
#commit_service_perimeters
def commit_service_perimeters(request, options = nil) -> ::Gapic::Operation
def commit_service_perimeters(parent: nil, etag: nil) -> ::Gapic::Operation
Commit the dry-run spec for all the [Service Perimeters]
[google.identity.accesscontextmanager.v1.ServicePerimeter] in an
Access Policy.
A commit operation on a Service Perimeter involves copying its spec
field
to that Service Perimeter's status
field. Only [Service Perimeters]
[google.identity.accesscontextmanager.v1.ServicePerimeter] with
use_explicit_dry_run_spec
field set to true are affected by a commit
operation. The longrunning operation from this RPC will have a successful
status once the dry-run specs for all the [Service Perimeters]
[google.identity.accesscontextmanager.v1.ServicePerimeter] have been
committed. If a commit fails, it will cause the longrunning operation to
return an error response and the entire commit operation will be cancelled.
When successful, Operation.response field will contain
CommitServicePerimetersResponse. The dry_run
and the spec
fields will
be cleared after a successful commit operation.
def commit_service_perimeters(request, options = nil) -> ::Gapic::Operation
commit_service_perimeters
via a request object, either of type
CommitServicePerimetersRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest, ::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 commit_service_perimeters(parent: nil, etag: nil) -> ::Gapic::Operation
commit_service_perimeters
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. Resource name for the parent [Access Policy]
[google.identity.accesscontextmanager.v1.AccessPolicy] which owns all
[Service Perimeters]
[google.identity.accesscontextmanager.v1.ServicePerimeter] in scope for
the commit operation.
Format:
accessPolicies/{policy_id}
- etag (::String) — Optional. The etag for the version of the [Access Policy] [google.identity.accesscontextmanager.v1alpha.AccessPolicy] that this commit operation is to be performed on. If, at the time of commit, the etag for the Access Policy stored in Access Context Manager is different from the specified etag, then the commit operation will not be performed and the call will fail. This field is not required. If etag is not provided, the operation will be performed as if a valid etag is provided.
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new # Call the commit_service_perimeters method. result = client.commit_service_perimeters request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the AccessContextManager 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_access_level
def create_access_level(request, options = nil) -> ::Gapic::Operation
def create_access_level(parent: nil, access_level: nil) -> ::Gapic::Operation
Create an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel]. The longrunning operation from this RPC will have a successful status once the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] has propagated to long-lasting storage. [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] containing errors will result in an error response for the first error encountered.
def create_access_level(request, options = nil) -> ::Gapic::Operation
create_access_level
via a request object, either of type
CreateAccessLevelRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest, ::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_access_level(parent: nil, access_level: nil) -> ::Gapic::Operation
create_access_level
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. Resource name for the access policy which owns this [Access
Level] [google.identity.accesscontextmanager.v1.AccessLevel].
Format:
accessPolicies/{policy_id}
- access_level (::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash) — Required. The [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] to create. Syntactic correctness of the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] is a precondition for creation.
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new # Call the create_access_level method. result = client.create_access_level request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#create_access_policy
def create_access_policy(request, options = nil) -> ::Gapic::Operation
def create_access_policy(name: nil, parent: nil, title: nil, create_time: nil, update_time: nil, etag: nil) -> ::Gapic::Operation
Create an AccessPolicy
. Fails if this organization already has a
AccessPolicy
. The longrunning Operation will have a successful status
once the AccessPolicy
has propagated to long-lasting storage.
Syntactic and basic semantic errors will be returned in metadata
as a
BadRequest proto.
def create_access_policy(request, options = nil) -> ::Gapic::Operation
create_access_policy
via a request object, either of type
Google::Identity::AccessContextManager::V1::AccessPolicy or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::AccessPolicy, ::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_access_policy(name: nil, parent: nil, title: nil, create_time: nil, update_time: nil, etag: nil) -> ::Gapic::Operation
create_access_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) — Output only. Resource name of the
AccessPolicy
. Format:accessPolicies/{access_policy}
-
parent (::String) — Required. The parent of this
AccessPolicy
in the Cloud Resource Hierarchy. Currently immutable once created. Format:organizations/{organization_id}
- title (::String) — Required. Human readable title. Does not affect behavior.
-
create_time (::Google::Protobuf::Timestamp, ::Hash) — Output only. Time the
AccessPolicy
was created in UTC. -
update_time (::Google::Protobuf::Timestamp, ::Hash) — Output only. Time the
AccessPolicy
was updated in UTC. -
etag (::String) — Output only. An opaque identifier for the current version of the
AccessPolicy
. This will always be a strongly validated etag, meaning that two Access Polices will be identical if and only if their etags are identical. Clients should not expect this to be in any specific format.
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::AccessPolicy.new # Call the create_access_policy method. result = client.create_access_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#create_gcp_user_access_binding
def create_gcp_user_access_binding(request, options = nil) -> ::Gapic::Operation
def create_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) -> ::Gapic::Operation
Creates a [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. If the client specifies a [name] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.name], the server will ignore it. Fails if a resource already exists with the same [group_key] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding.group_key]. Completion of this long-running operation does not necessarily signify that the new binding is deployed onto all affected users, which may take more time.
def create_gcp_user_access_binding(request, options = nil) -> ::Gapic::Operation
create_gcp_user_access_binding
via a request object, either of type
CreateGcpUserAccessBindingRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest, ::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_gcp_user_access_binding(parent: nil, gcp_user_access_binding: nil) -> ::Gapic::Operation
create_gcp_user_access_binding
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. Example: "organizations/256"
- gcp_user_access_binding (::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash) — Required. [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new # Call the create_gcp_user_access_binding method. result = client.create_gcp_user_access_binding request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#create_service_perimeter
def create_service_perimeter(request, options = nil) -> ::Gapic::Operation
def create_service_perimeter(parent: nil, service_perimeter: nil) -> ::Gapic::Operation
Create a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. The longrunning operation from this RPC will have a successful status once the [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] has propagated to long-lasting storage. [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] containing errors will result in an error response for the first error encountered.
def create_service_perimeter(request, options = nil) -> ::Gapic::Operation
create_service_perimeter
via a request object, either of type
CreateServicePerimeterRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest, ::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_service_perimeter(parent: nil, service_perimeter: nil) -> ::Gapic::Operation
create_service_perimeter
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. Resource name for the access policy which owns this [Service
Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter].
Format:
accessPolicies/{policy_id}
- service_perimeter (::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash) — Required. The [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] to create. Syntactic correctness of the [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] is a precondition for creation.
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new # Call the create_service_perimeter method. result = client.create_service_perimeter request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_access_level
def delete_access_level(request, options = nil) -> ::Gapic::Operation
def delete_access_level(name: nil) -> ::Gapic::Operation
Delete an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] by resource name. The longrunning operation from this RPC will have a successful status once the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] has been removed from long-lasting storage.
def delete_access_level(request, options = nil) -> ::Gapic::Operation
delete_access_level
via a request object, either of type
DeleteAccessLevelRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest, ::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_access_level(name: nil) -> ::Gapic::Operation
delete_access_level
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. Resource name for the [Access Level]
[google.identity.accesscontextmanager.v1.AccessLevel].
Format:
accessPolicies/{policy_id}/accessLevels/{access_level_id}
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new # Call the delete_access_level method. result = client.delete_access_level request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_access_policy
def delete_access_policy(request, options = nil) -> ::Gapic::Operation
def delete_access_policy(name: nil) -> ::Gapic::Operation
Delete an [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] by resource name. The longrunning Operation will have a successful status once the [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] has been removed from long-lasting storage.
def delete_access_policy(request, options = nil) -> ::Gapic::Operation
delete_access_policy
via a request object, either of type
DeleteAccessPolicyRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest, ::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_access_policy(name: nil) -> ::Gapic::Operation
delete_access_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. Resource name for the access policy to delete.
Format
accessPolicies/{policy_id}
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new # Call the delete_access_policy method. result = client.delete_access_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_gcp_user_access_binding
def delete_gcp_user_access_binding(request, options = nil) -> ::Gapic::Operation
def delete_gcp_user_access_binding(name: nil) -> ::Gapic::Operation
Deletes a [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. Completion of this long-running operation does not necessarily signify that the binding deletion is deployed onto all affected users, which may take more time.
def delete_gcp_user_access_binding(request, options = nil) -> ::Gapic::Operation
delete_gcp_user_access_binding
via a request object, either of type
DeleteGcpUserAccessBindingRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest, ::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_gcp_user_access_binding(name: nil) -> ::Gapic::Operation
delete_gcp_user_access_binding
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. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new # Call the delete_gcp_user_access_binding method. result = client.delete_gcp_user_access_binding request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_service_perimeter
def delete_service_perimeter(request, options = nil) -> ::Gapic::Operation
def delete_service_perimeter(name: nil) -> ::Gapic::Operation
Delete a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] by resource name. The longrunning operation from this RPC will have a successful status once the [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] has been removed from long-lasting storage.
def delete_service_perimeter(request, options = nil) -> ::Gapic::Operation
delete_service_perimeter
via a request object, either of type
DeleteServicePerimeterRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest, ::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_service_perimeter(name: nil) -> ::Gapic::Operation
delete_service_perimeter
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. Resource name for the [Service Perimeter]
[google.identity.accesscontextmanager.v1.ServicePerimeter].
Format:
accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new # Call the delete_service_perimeter method. result = client.delete_service_perimeter request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#get_access_level
def get_access_level(request, options = nil) -> ::Google::Identity::AccessContextManager::V1::AccessLevel
def get_access_level(name: nil, access_level_format: nil) -> ::Google::Identity::AccessContextManager::V1::AccessLevel
Get an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] by resource name.
def get_access_level(request, options = nil) -> ::Google::Identity::AccessContextManager::V1::AccessLevel
get_access_level
via a request object, either of type
GetAccessLevelRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::GetAccessLevelRequest, ::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_access_level(name: nil, access_level_format: nil) -> ::Google::Identity::AccessContextManager::V1::AccessLevel
get_access_level
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. Resource name for the [Access Level]
[google.identity.accesscontextmanager.v1.AccessLevel].
Format:
accessPolicies/{policy_id}/accessLevels/{access_level_id}
-
access_level_format (::Google::Identity::AccessContextManager::V1::LevelFormat) — Whether to return
BasicLevels
in the Cloud Common Expression Language rather than asBasicLevels
. Defaults to AS_DEFINED, where [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] are returned asBasicLevels
orCustomLevels
based on how they were created. If set to CEL, all [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] are returned asCustomLevels
. In the CEL case,BasicLevels
are translated to equivalentCustomLevels
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Identity::AccessContextManager::V1::AccessLevel)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new # Call the get_access_level method. result = client.get_access_level request # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel. p result
#get_access_policy
def get_access_policy(request, options = nil) -> ::Google::Identity::AccessContextManager::V1::AccessPolicy
def get_access_policy(name: nil) -> ::Google::Identity::AccessContextManager::V1::AccessPolicy
Get an [AccessPolicy] [google.identity.accesscontextmanager.v1.AccessPolicy] by name.
def get_access_policy(request, options = nil) -> ::Google::Identity::AccessContextManager::V1::AccessPolicy
get_access_policy
via a request object, either of type
GetAccessPolicyRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest, ::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_access_policy(name: nil) -> ::Google::Identity::AccessContextManager::V1::AccessPolicy
get_access_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. Resource name for the access policy to get.
Format
accessPolicies/{policy_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Identity::AccessContextManager::V1::AccessPolicy)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new # Call the get_access_policy method. result = client.get_access_policy request # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy. p result
#get_gcp_user_access_binding
def get_gcp_user_access_binding(request, options = nil) -> ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding
def get_gcp_user_access_binding(name: nil) -> ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding
Gets the [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] with the given name.
def get_gcp_user_access_binding(request, options = nil) -> ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding
get_gcp_user_access_binding
via a request object, either of type
GetGcpUserAccessBindingRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest, ::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_gcp_user_access_binding(name: nil) -> ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding
get_gcp_user_access_binding
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. Example: "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new # Call the get_gcp_user_access_binding method. result = client.get_gcp_user_access_binding request # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. p result
#get_service_perimeter
def get_service_perimeter(request, options = nil) -> ::Google::Identity::AccessContextManager::V1::ServicePerimeter
def get_service_perimeter(name: nil) -> ::Google::Identity::AccessContextManager::V1::ServicePerimeter
Get a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] by resource name.
def get_service_perimeter(request, options = nil) -> ::Google::Identity::AccessContextManager::V1::ServicePerimeter
get_service_perimeter
via a request object, either of type
GetServicePerimeterRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest, ::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_service_perimeter(name: nil) -> ::Google::Identity::AccessContextManager::V1::ServicePerimeter
get_service_perimeter
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. Resource name for the [Service Perimeter]
[google.identity.accesscontextmanager.v1.ServicePerimeter].
Format:
accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Identity::AccessContextManager::V1::ServicePerimeter)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new # Call the get_service_perimeter method. result = client.get_service_perimeter request # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new AccessContextManager client object.
- (config) — Configure the AccessContextManager client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a client using a custom configuration client = ::Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new do |config| config.timeout = 10.0 end
#list_access_levels
def list_access_levels(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>
def list_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>
List all [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] for an access policy.
def list_access_levels(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>
list_access_levels
via a request object, either of type
ListAccessLevelsRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest, ::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_access_levels(parent: nil, page_size: nil, page_token: nil, access_level_format: nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>
list_access_levels
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. Resource name for the access policy to list [Access Levels]
[google.identity.accesscontextmanager.v1.AccessLevel] from.
Format:
accessPolicies/{policy_id}
- page_size (::Integer) — Number of [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] to include in the list. Default 100.
- page_token (::String) — Next page token for the next batch of [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] instances. Defaults to the first page of results.
-
access_level_format (::Google::Identity::AccessContextManager::V1::LevelFormat) — Whether to return
BasicLevels
in the Cloud Common Expression language, asCustomLevels
, rather than asBasicLevels
. Defaults to returningAccessLevels
in the format they were defined.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessLevel>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new # Call the list_access_levels method. result = client.list_access_levels request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel. p response end
#list_access_policies
def list_access_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>
def list_access_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>
List all [AccessPolicies] [google.identity.accesscontextmanager.v1.AccessPolicy] under a container.
def list_access_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>
list_access_policies
via a request object, either of type
ListAccessPoliciesRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest, ::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_access_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>
list_access_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. Resource name for the container to list AccessPolicy instances
from.
Format:
organizations/{org_id}
- page_size (::Integer) — Number of AccessPolicy instances to include in the list. Default 100.
- page_token (::String) — Next page token for the next batch of AccessPolicy instances. Defaults to the first page of results.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::AccessPolicy>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new # Call the list_access_policies method. result = client.list_access_policies request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy. p response end
#list_gcp_user_access_bindings
def list_gcp_user_access_bindings(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>
def list_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>
Lists all [GcpUserAccessBindings] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding] for a Google Cloud organization.
def list_gcp_user_access_bindings(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>
list_gcp_user_access_bindings
via a request object, either of type
ListGcpUserAccessBindingsRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest, ::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_gcp_user_access_bindings(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>
list_gcp_user_access_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).
- parent (::String) — Required. Example: "organizations/256"
- page_size (::Integer) — Optional. Maximum number of items to return. The server may return fewer items. If left blank, the server may return any number of items.
- page_token (::String) — Optional. If left blank, returns the first page. To enumerate all items, use the [next_page_token] [google.identity.accesscontextmanager.v1.ListGcpUserAccessBindingsResponse.next_page_token] from your previous list operation.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new # Call the list_gcp_user_access_bindings method. result = client.list_gcp_user_access_bindings request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding. p response end
#list_service_perimeters
def list_service_perimeters(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>
def list_service_perimeters(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>
List all [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] for an access policy.
def list_service_perimeters(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>
list_service_perimeters
via a request object, either of type
ListServicePerimetersRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest, ::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_service_perimeters(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>
list_service_perimeters
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. Resource name for the access policy to list [Service Perimeters]
[google.identity.accesscontextmanager.v1.ServicePerimeter] from.
Format:
accessPolicies/{policy_id}
- page_size (::Integer) — Number of [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] to include in the list. Default 100.
- page_token (::String) — Next page token for the next batch of [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] instances. Defaults to the first page of results.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Identity::AccessContextManager::V1::ServicePerimeter>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new # Call the list_service_perimeters method. result = client.list_service_perimeters request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter. p response end
#operations_client
def operations_client() -> ::Google::Identity::AccessContextManager::V1::AccessContextManager::Operations
Get the associated client for long-running operations.
#replace_access_levels
def replace_access_levels(request, options = nil) -> ::Gapic::Operation
def replace_access_levels(parent: nil, access_levels: nil, etag: nil) -> ::Gapic::Operation
Replace all existing [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] in an [Access Policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] provided. This is done atomically. The longrunning operation from this RPC will have a successful status once all replacements have propagated to long-lasting storage. Replacements containing errors will result in an error response for the first error encountered. Replacement will be cancelled on error, existing [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] will not be affected. Operation.response field will contain ReplaceAccessLevelsResponse. Removing [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] contained in existing [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] will result in error.
def replace_access_levels(request, options = nil) -> ::Gapic::Operation
replace_access_levels
via a request object, either of type
ReplaceAccessLevelsRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest, ::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 replace_access_levels(parent: nil, access_levels: nil, etag: nil) -> ::Gapic::Operation
replace_access_levels
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. Resource name for the access policy which owns these
[Access Levels]
[google.identity.accesscontextmanager.v1.AccessLevel].
Format:
accessPolicies/{policy_id}
- access_levels (::Array<::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash>) — Required. The desired [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] that should replace all existing [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] in the [Access Policy] [google.identity.accesscontextmanager.v1.AccessPolicy].
- etag (::String) — Optional. The etag for the version of the [Access Policy] [google.identity.accesscontextmanager.v1.AccessPolicy] that this replace operation is to be performed on. If, at the time of replace, the etag for the Access Policy stored in Access Context Manager is different from the specified etag, then the replace operation will not be performed and the call will fail. This field is not required. If etag is not provided, the operation will be performed as if a valid etag is provided.
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new # Call the replace_access_levels method. result = client.replace_access_levels request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#replace_service_perimeters
def replace_service_perimeters(request, options = nil) -> ::Gapic::Operation
def replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) -> ::Gapic::Operation
Replace all existing [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] in an [Access Policy] [google.identity.accesscontextmanager.v1.AccessPolicy] with the [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] provided. This is done atomically. The longrunning operation from this RPC will have a successful status once all replacements have propagated to long-lasting storage. Replacements containing errors will result in an error response for the first error encountered. Replacement will be cancelled on error, existing [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] will not be affected. Operation.response field will contain ReplaceServicePerimetersResponse.
def replace_service_perimeters(request, options = nil) -> ::Gapic::Operation
replace_service_perimeters
via a request object, either of type
ReplaceServicePerimetersRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest, ::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 replace_service_perimeters(parent: nil, service_perimeters: nil, etag: nil) -> ::Gapic::Operation
replace_service_perimeters
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. Resource name for the access policy which owns these
[Service Perimeters]
[google.identity.accesscontextmanager.v1.ServicePerimeter].
Format:
accessPolicies/{policy_id}
- service_perimeters (::Array<::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash>) — Required. The desired [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] that should replace all existing [Service Perimeters] [google.identity.accesscontextmanager.v1.ServicePerimeter] in the [Access Policy] [google.identity.accesscontextmanager.v1.AccessPolicy].
- etag (::String) — Optional. The etag for the version of the [Access Policy] [google.identity.accesscontextmanager.v1.AccessPolicy] that this replace operation is to be performed on. If, at the time of replace, the etag for the Access Policy stored in Access Context Manager is different from the specified etag, then the replace operation will not be performed and the call will fail. This field is not required. If etag is not provided, the operation will be performed as if a valid etag is provided.
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new # Call the replace_service_perimeters method. result = client.replace_service_perimeters request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#update_access_level
def update_access_level(request, options = nil) -> ::Gapic::Operation
def update_access_level(access_level: nil, update_mask: nil) -> ::Gapic::Operation
Update an [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel]. The longrunning operation from this RPC will have a successful status once the changes to the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] have propagated to long-lasting storage. [Access Levels] [google.identity.accesscontextmanager.v1.AccessLevel] containing errors will result in an error response for the first error encountered.
def update_access_level(request, options = nil) -> ::Gapic::Operation
update_access_level
via a request object, either of type
UpdateAccessLevelRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest, ::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_access_level(access_level: nil, update_mask: nil) -> ::Gapic::Operation
update_access_level
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).
- access_level (::Google::Identity::AccessContextManager::V1::AccessLevel, ::Hash) — Required. The updated [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel]. Syntactic correctness of the [Access Level] [google.identity.accesscontextmanager.v1.AccessLevel] is a precondition for creation.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Mask to control which fields get updated. Must be non-empty.
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new # Call the update_access_level method. result = client.update_access_level request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#update_access_policy
def update_access_policy(request, options = nil) -> ::Gapic::Operation
def update_access_policy(policy: nil, update_mask: nil) -> ::Gapic::Operation
Update an [AccessPolicy]
[google.identity.accesscontextmanager.v1.AccessPolicy]. The
longrunning Operation from this RPC will have a successful status once the
changes to the [AccessPolicy]
[google.identity.accesscontextmanager.v1.AccessPolicy] have propagated
to long-lasting storage. Syntactic and basic semantic errors will be
returned in metadata
as a BadRequest proto.
def update_access_policy(request, options = nil) -> ::Gapic::Operation
update_access_policy
via a request object, either of type
UpdateAccessPolicyRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest, ::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_access_policy(policy: nil, update_mask: nil) -> ::Gapic::Operation
update_access_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).
- policy (::Google::Identity::AccessContextManager::V1::AccessPolicy, ::Hash) — Required. The updated AccessPolicy.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Mask to control which fields get updated. Must be non-empty.
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new # Call the update_access_policy method. result = client.update_access_policy request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#update_gcp_user_access_binding
def update_gcp_user_access_binding(request, options = nil) -> ::Gapic::Operation
def update_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) -> ::Gapic::Operation
Updates a [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]. Completion of this long-running operation does not necessarily signify that the changed binding is deployed onto all affected users, which may take more time.
def update_gcp_user_access_binding(request, options = nil) -> ::Gapic::Operation
update_gcp_user_access_binding
via a request object, either of type
UpdateGcpUserAccessBindingRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest, ::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_gcp_user_access_binding(gcp_user_access_binding: nil, update_mask: nil) -> ::Gapic::Operation
update_gcp_user_access_binding
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).
- gcp_user_access_binding (::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding, ::Hash) — Required. [GcpUserAccessBinding] [google.identity.accesscontextmanager.v1.GcpUserAccessBinding]
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Only the fields specified in this mask are updated. Because name and
group_key cannot be changed, update_mask is required and must always be:
update_mask { paths: "access_levels" }
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new # Call the update_gcp_user_access_binding method. result = client.update_gcp_user_access_binding request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#update_service_perimeter
def update_service_perimeter(request, options = nil) -> ::Gapic::Operation
def update_service_perimeter(service_perimeter: nil, update_mask: nil) -> ::Gapic::Operation
Update a [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter]. The longrunning operation from this RPC will have a successful status once the changes to the [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] have propagated to long-lasting storage. [Service Perimeter] [google.identity.accesscontextmanager.v1.ServicePerimeter] containing errors will result in an error response for the first error encountered.
def update_service_perimeter(request, options = nil) -> ::Gapic::Operation
update_service_perimeter
via a request object, either of type
UpdateServicePerimeterRequest or an equivalent Hash.
- request (::Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest, ::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_service_perimeter(service_perimeter: nil, update_mask: nil) -> ::Gapic::Operation
update_service_perimeter
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).
-
service_perimeter (::Google::Identity::AccessContextManager::V1::ServicePerimeter, ::Hash) — Required. The updated
ServicePerimeter
. Syntactic correctness of theServicePerimeter
is a precondition for creation. - update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Mask to control which fields get updated. Must be non-empty.
- (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/identity/access_context_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new # Call the update_service_perimeter method. result = client.update_service_perimeter request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end