Class: AWSCDK::CloudFormation::CfnGuardHook::S3LocationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_formation/cfn_guard_hook.rb

Overview

Specifies the S3 location where your Guard rules or input parameters are located.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri:, version_id: nil) ⇒ S3LocationProperty

Returns a new instance of S3LocationProperty.

Parameters:

  • uri (String)

    Specifies the S3 path to the file that contains your Guard rules or input parameters (in the form s3://<bucket name>/<file name> ).

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

    For S3 buckets with versioning enabled, specifies the unique ID of the S3 object version to download your Guard rules or input parameters from.



716
717
718
719
720
721
# File 'cloud_formation/cfn_guard_hook.rb', line 716

def initialize(uri:, version_id: nil)
  @uri = uri
  Jsii::Type.check_type(@uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "uri")
  @version_id = version_id
  Jsii::Type.check_type(@version_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "versionId") unless @version_id.nil?
end

Instance Attribute Details

#uriString (readonly)

Specifies the S3 path to the file that contains your Guard rules or input parameters (in the form s3://<bucket name>/<file name> ).

For Guard rules, the object stored in S3 must have one of the following file extensions: .guard , .zip , or .tar.gz .

For input parameters, the object stored in S3 must have one of the following file extensions: .yaml , .json , .zip , or .tar.gz .



731
732
733
# File 'cloud_formation/cfn_guard_hook.rb', line 731

def uri
  @uri
end

#version_idString? (readonly)

For S3 buckets with versioning enabled, specifies the unique ID of the S3 object version to download your Guard rules or input parameters from.

The Guard Hook downloads files from S3 every time the Hook is invoked. To prevent accidental changes or deletions, we recommend using a version when configuring your Guard Hook.



738
739
740
# File 'cloud_formation/cfn_guard_hook.rb', line 738

def version_id
  @version_id
end

Class Method Details

.jsii_propertiesObject



740
741
742
743
744
745
# File 'cloud_formation/cfn_guard_hook.rb', line 740

def self.jsii_properties
  {
    :uri => "uri",
    :version_id => "versionId",
  }
end

Instance Method Details

#to_jsiiObject



747
748
749
750
751
752
753
754
# File 'cloud_formation/cfn_guard_hook.rb', line 747

def to_jsii
  result = {}
  result.merge!({
    "uri" => @uri,
    "versionId" => @version_id,
  })
  result.compact
end