Class: AWSCDK::GameLift::CfnScript::S3LocationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
game_lift/cfn_script.rb

Overview

The location in Amazon S3 where build or script files can be stored for access by Amazon GameLift.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, key:, role_arn:, object_version: nil) ⇒ S3LocationProperty

Returns a new instance of S3LocationProperty.

Parameters:

  • bucket (String)

    An Amazon S3 bucket identifier. Thename of the S3 bucket.

  • key (String)

    The name of the zip file that contains the build files or script files.

  • role_arn (String)

    The Amazon Resource Name ( ARN ) for an IAM role that allows Amazon GameLift Servers to access the S3 bucket.

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

    The version of the file, if object versioning is turned on for the bucket.



629
630
631
632
633
634
635
636
637
638
# File 'game_lift/cfn_script.rb', line 629

def initialize(bucket:, key:, role_arn:, object_version: nil)
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucket")
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @object_version = object_version
  Jsii::Type.check_type(@object_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectVersion") unless @object_version.nil?
end

Instance Attribute Details

#bucketString (readonly)

An Amazon S3 bucket identifier. Thename of the S3 bucket.

Amazon GameLift Servers doesn't support uploading from Amazon S3 buckets with names that contain a dot (.).



646
647
648
# File 'game_lift/cfn_script.rb', line 646

def bucket
  @bucket
end

#keyString (readonly)

The name of the zip file that contains the build files or script files.



651
652
653
# File 'game_lift/cfn_script.rb', line 651

def key
  @key
end

#object_versionString? (readonly)

The version of the file, if object versioning is turned on for the bucket.

Amazon GameLift Servers uses this information when retrieving files from an S3 bucket that you own. Use this parameter to specify a specific version of the file. If not set, the latest version of the file is retrieved.



663
664
665
# File 'game_lift/cfn_script.rb', line 663

def object_version
  @object_version
end

#role_arnString (readonly)

The Amazon Resource Name ( ARN ) for an IAM role that allows Amazon GameLift Servers to access the S3 bucket.



656
657
658
# File 'game_lift/cfn_script.rb', line 656

def role_arn
  @role_arn
end

Class Method Details

.jsii_propertiesObject



665
666
667
668
669
670
671
672
# File 'game_lift/cfn_script.rb', line 665

def self.jsii_properties
  {
    :bucket => "bucket",
    :key => "key",
    :role_arn => "roleArn",
    :object_version => "objectVersion",
  }
end

Instance Method Details

#to_jsiiObject



674
675
676
677
678
679
680
681
682
683
# File 'game_lift/cfn_script.rb', line 674

def to_jsii
  result = {}
  result.merge!({
    "bucket" => @bucket,
    "key" => @key,
    "roleArn" => @role_arn,
    "objectVersion" => @object_version,
  })
  result.compact
end