Class: Google::Apis::AccesscontextmanagerV1::EgressFrom

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 based on information about the source of the request. 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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EgressFrom

Returns a new instance of EgressFrom.



811
812
813
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 811

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

Instance Attribute Details

#identitiesArray<String>

A list of identities that are allowed access through [EgressPolicy]. Identities can be an individual user, service account, Google group, or third- party identity. For third-party identity, only single identities are supported and other identity types are not supported. The v1 identities that have the prefix user, group, serviceAccount, and principal in https://cloud. google.com/iam/docs/principal-identifiers#v1 are supported. Corresponds to the JSON property identities

Returns:

  • (Array<String>)


789
790
791
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 789

def identities
  @identities
end

#identity_typeString

Specifies the type of identities that are allowed access to outside the perimeter. If left unspecified, then members of identities field will be allowed access. Corresponds to the JSON property identityType

Returns:

  • (String)


796
797
798
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 796

def identity_type
  @identity_type
end

#source_restrictionString

Whether to enforce traffic restrictions based on sources field. If the sources fields is non-empty, then this field must be set to SOURCE_RESTRICTION_ENABLED. Corresponds to the JSON property sourceRestriction

Returns:

  • (String)


803
804
805
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 803

def source_restriction
  @source_restriction
end

#sourcesArray<Google::Apis::AccesscontextmanagerV1::EgressSource>

Sources that this EgressPolicy authorizes access from. If this field is not empty, then source_restriction must be set to SOURCE_RESTRICTION_ENABLED. Corresponds to the JSON property sources



809
810
811
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 809

def sources
  @sources
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



816
817
818
819
820
821
# File 'lib/google/apis/accesscontextmanager_v1/classes.rb', line 816

def update!(**args)
  @identities = args[:identities] if args.key?(:identities)
  @identity_type = args[:identity_type] if args.key?(:identity_type)
  @source_restriction = args[:source_restriction] if args.key?(:source_restriction)
  @sources = args[:sources] if args.key?(:sources)
end