Class: AWSCDK::S3Vectors::CfnVectorBucketPolicyProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
s3_vectors/cfn_vector_bucket_policy_props.rb

Overview

Properties for defining a CfnVectorBucketPolicy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(policy:, vector_bucket_arn: nil, vector_bucket_name: nil) ⇒ CfnVectorBucketPolicyProps

Returns a new instance of CfnVectorBucketPolicyProps.

Parameters:

  • policy (Object)

    A policy document containing permissions to add to the specified vector bucket.

  • vector_bucket_arn (String, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) of the S3 vector bucket to which the policy applies.

  • vector_bucket_name (String, nil) (defaults to: nil)

    The name of the S3 vector bucket to which the policy applies.



12
13
14
15
16
17
18
19
# File 's3_vectors/cfn_vector_bucket_policy_props.rb', line 12

def initialize(policy:, vector_bucket_arn: nil, vector_bucket_name: nil)
  @policy = policy
  Jsii::Type.check_type(@policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policy")
  @vector_bucket_arn = vector_bucket_arn
  Jsii::Type.check_type(@vector_bucket_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vectorBucketArn") unless @vector_bucket_arn.nil?
  @vector_bucket_name = vector_bucket_name
  Jsii::Type.check_type(@vector_bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vectorBucketName") unless @vector_bucket_name.nil?
end

Instance Attribute Details

#policyObject (readonly)

A policy document containing permissions to add to the specified vector bucket.

In IAM , you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM .



27
28
29
# File 's3_vectors/cfn_vector_bucket_policy_props.rb', line 27

def policy
  @policy
end

#vector_bucket_arnString? (readonly)

The Amazon Resource Name (ARN) of the S3 vector bucket to which the policy applies.



32
33
34
# File 's3_vectors/cfn_vector_bucket_policy_props.rb', line 32

def vector_bucket_arn
  @vector_bucket_arn
end

#vector_bucket_nameString? (readonly)

The name of the S3 vector bucket to which the policy applies.



37
38
39
# File 's3_vectors/cfn_vector_bucket_policy_props.rb', line 37

def vector_bucket_name
  @vector_bucket_name
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 's3_vectors/cfn_vector_bucket_policy_props.rb', line 39

def self.jsii_properties
  {
    :policy => "policy",
    :vector_bucket_arn => "vectorBucketArn",
    :vector_bucket_name => "vectorBucketName",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 's3_vectors/cfn_vector_bucket_policy_props.rb', line 47

def to_jsii
  result = {}
  result.merge!({
    "policy" => @policy,
    "vectorBucketArn" => @vector_bucket_arn,
    "vectorBucketName" => @vector_bucket_name,
  })
  result.compact
end