Class: Google::Apis::AccesscontextmanagerV1::EgressTo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/accesscontextmanager_v1/classes.rb,
lib/google/apis/accesscontextmanager_v1/representations.rb,
lib/google/apis/accesscontextmanager_v1/representations.rb

Overview

Defines the conditions under which an EgressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the resources specified. Note that if the destination of the request is also protected by a ServicePerimeter, then that ServicePerimeter must have an IngressPolicy which allows access in order for this request to succeed. The request must match operations AND resources fields in order to be allowed egress out of the perimeter.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EgressTo

Returns a new instance of EgressTo.



956
957
958
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 956

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#external_resourcesArray<String>

A list of external resources that are allowed to be accessed. Only AWS and Azure resources are supported. For Amazon S3, the supported formats are s3:// BUCKET_NAME, s3a://BUCKET_NAME, and s3n://BUCKET_NAME. For Azure Storage, the supported format is azure://myaccount.blob.core.windows.net/CONTAINER_NAME. A request matches if it contains an external resource in this list (Example: s3:/ /bucket/path). Currently '*' is not allowed. Corresponds to the JSON property externalResources

Returns:

  • (Array<String>)


932
933
934
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 932

def external_resources
  @external_resources
end

#operationsArray<Google::Apis::AccesscontextmanagerV1::ApiOperation>

A list of ApiOperations allowed to be performed by the sources specified in the corresponding EgressFrom. A request matches if it uses an operation/ service in this list. Corresponds to the JSON property operations



939
940
941
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 939

def operations
  @operations
end

#resourcesArray<String>

A list of resources, currently only projects in the form projects/, that are allowed to be accessed by sources defined in the corresponding EgressFrom. A request matches if it contains a resource in this list. If * is specified for resources, then this EgressTo rule will authorize access to all resources outside the perimeter. Corresponds to the JSON property resources

Returns:

  • (Array<String>)


948
949
950
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 948

def resources
  @resources
end

#rolesArray<String>

IAM roles that represent the set of operations that the sources specified in the corresponding EgressFrom. are allowed to perform in this ServicePerimeter. Corresponds to the JSON property roles

Returns:

  • (Array<String>)


954
955
956
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 954

def roles
  @roles
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



961
962
963
964
965
966
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 961

def update!(**args)
  @external_resources = args[:external_resources] if args.key?(:external_resources)
  @operations = args[:operations] if args.key?(:operations)
  @resources = args[:resources] if args.key?(:resources)
  @roles = args[:roles] if args.key?(:roles)
end