Class: AWSCDK::S3::CfnAccessGrantProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::CfnAccessGrantProps
- Defined in:
- s3/cfn_access_grant_props.rb
Overview
Properties for defining a CfnAccessGrant.
Instance Attribute Summary collapse
-
#access_grants_location_configuration ⇒ AWSCDK::IResolvable, ...
readonly
The configuration options of the grant location.
-
#access_grants_location_id ⇒ String
readonly
The ID of the registered location to which you are granting access.
-
#application_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of an AWS IAM Identity Center application associated with your Identity Center instance.
-
#grantee ⇒ AWSCDK::IResolvable, AWSCDK::S3::CfnAccessGrant::GranteeProperty
readonly
The user, group, or role to which you are granting access.
-
#permission ⇒ String
readonly
The type of access that you are granting to your S3 data, which can be set to one of the following values: -
READ– Grant read-only access to the S3 data. -
#s3_prefix_type ⇒ String?
readonly
The type of
S3SubPrefix. -
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The AWS resource tags that you are adding to the access grant.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(access_grants_location_id:, grantee:, permission:, access_grants_location_configuration: nil, application_arn: nil, s3_prefix_type: nil, tags: nil) ⇒ CfnAccessGrantProps
constructor
A new instance of CfnAccessGrantProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(access_grants_location_id:, grantee:, permission:, access_grants_location_configuration: nil, application_arn: nil, s3_prefix_type: nil, tags: nil) ⇒ CfnAccessGrantProps
Returns a new instance of CfnAccessGrantProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 's3/cfn_access_grant_props.rb', line 16 def initialize(access_grants_location_id:, grantee:, permission:, access_grants_location_configuration: nil, application_arn: nil, s3_prefix_type: nil, tags: nil) @access_grants_location_id = access_grants_location_id Jsii::Type.check_type(@access_grants_location_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessGrantsLocationId") @grantee = grantee.is_a?(Hash) ? ::AWSCDK::S3::CfnAccessGrant::GranteeProperty.new(**grantee.transform_keys(&:to_sym)) : grantee Jsii::Type.check_type(@grantee, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5BY2Nlc3NHcmFudC5HcmFudGVlUHJvcGVydHkifV19fQ==")), "grantee") @permission = Jsii::Type.check_type(@permission, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "permission") @access_grants_location_configuration = access_grants_location_configuration.is_a?(Hash) ? ::AWSCDK::S3::CfnAccessGrant::AccessGrantsLocationConfigurationProperty.new(**access_grants_location_configuration.transform_keys(&:to_sym)) : access_grants_location_configuration Jsii::Type.check_type(@access_grants_location_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5BY2Nlc3NHcmFudC5BY2Nlc3NHcmFudHNMb2NhdGlvbkNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "accessGrantsLocationConfiguration") unless @access_grants_location_configuration.nil? @application_arn = application_arn Jsii::Type.check_type(@application_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "applicationArn") unless @application_arn.nil? @s3_prefix_type = s3_prefix_type Jsii::Type.check_type(@s3_prefix_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3PrefixType") unless @s3_prefix_type.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#access_grants_location_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
The configuration options of the grant location.
The grant location is the S3 path to the data to which you are granting access. It contains the S3SubPrefix field. The grant scope is the result of appending the subprefix to the location scope of the registered location.
61 62 63 |
# File 's3/cfn_access_grant_props.rb', line 61 def access_grants_location_configuration @access_grants_location_configuration end |
#access_grants_location_id ⇒ String (readonly)
The ID of the registered location to which you are granting access.
S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID default to the default location s3:// and assigns an auto-generated ID to other locations that you register.
39 40 41 |
# File 's3/cfn_access_grant_props.rb', line 39 def access_grants_location_id @access_grants_location_id end |
#application_arn ⇒ String? (readonly)
The Amazon Resource Name (ARN) of an AWS IAM Identity Center application associated with your Identity Center instance.
If the grant includes an application ARN, the grantee can only access the S3 data through this application.
68 69 70 |
# File 's3/cfn_access_grant_props.rb', line 68 def application_arn @application_arn end |
#grantee ⇒ AWSCDK::IResolvable, AWSCDK::S3::CfnAccessGrant::GranteeProperty (readonly)
The user, group, or role to which you are granting access.
You can grant access to an IAM user or role. If you have added your corporate directory to AWS IAM Identity Center and associated your Identity Center instance with your S3 Access Grants instance, the grantee can also be a corporate directory user or group.
46 47 48 |
# File 's3/cfn_access_grant_props.rb', line 46 def grantee @grantee end |
#permission ⇒ String (readonly)
The type of access that you are granting to your S3 data, which can be set to one of the following values: - READ – Grant read-only access to the S3 data.
WRITE– Grant write-only access to the S3 data.READWRITE– Grant both read and write access to the S3 data.
54 55 56 |
# File 's3/cfn_access_grant_props.rb', line 54 def @permission end |
#s3_prefix_type ⇒ String? (readonly)
The type of S3SubPrefix .
The only possible value is Object . Pass this value if the access grant scope is an object. Do not pass this value if the access grant scope is a bucket or a bucket and a prefix.
75 76 77 |
# File 's3/cfn_access_grant_props.rb', line 75 def s3_prefix_type @s3_prefix_type end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The AWS resource tags that you are adding to the access grant.
Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
82 83 84 |
# File 's3/cfn_access_grant_props.rb', line 82 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 |
# File 's3/cfn_access_grant_props.rb', line 84 def self.jsii_properties { :access_grants_location_id => "accessGrantsLocationId", :grantee => "grantee", :permission => "permission", :access_grants_location_configuration => "accessGrantsLocationConfiguration", :application_arn => "applicationArn", :s3_prefix_type => "s3PrefixType", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 's3/cfn_access_grant_props.rb', line 96 def to_jsii result = {} result.merge!({ "accessGrantsLocationId" => @access_grants_location_id, "grantee" => @grantee, "permission" => @permission, "accessGrantsLocationConfiguration" => @access_grants_location_configuration, "applicationArn" => @application_arn, "s3PrefixType" => @s3_prefix_type, "tags" => @tags, }) result.compact end |