Class: AWSCDK::AlexaAsk::CfnSkill::SkillPackageProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
alexa_ask/cfn_skill.rb

Overview

The SkillPackage property type contains configuration details for the skill package that contains the components of the Alexa skill.

Skill packages are retrieved from an Amazon S3 bucket and key and used to create and update the skill. More details about the skill package format are located in the .

SkillPackage is a property of the Alexa::ASK::Skill resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(s3_bucket:, s3_key:, overrides: nil, s3_bucket_role: nil, s3_object_version: nil) ⇒ SkillPackageProperty

Returns a new instance of SkillPackageProperty.

Parameters:

  • s3_bucket (String)

    The name of the Amazon S3 bucket where the .zip file that contains the skill package is stored.

  • s3_key (String)

    The location and name of the skill package .zip file.

  • overrides (AWSCDK::IResolvable, AWSCDK::AlexaAsk::CfnSkill::OverridesProperty, nil) (defaults to: nil)

    Overrides to the skill package to apply when creating or updating the skill.

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

    ARN of the IAM role that grants the Alexa service ( alexa-appkit.amazon.com ) permission to access the bucket and retrieve the skill package. This property is optional. If you do not provide it, the bucket must be publicly accessible or configured with a policy that allows this access. Otherwise, CloudFormation cannot create the skill.

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

    If you have S3 versioning enabled, the version ID of the skill package.zip file.



634
635
636
637
638
639
640
641
642
643
644
645
# File 'alexa_ask/cfn_skill.rb', line 634

def initialize(s3_bucket:, s3_key:, overrides: nil, s3_bucket_role: nil, s3_object_version: nil)
  @s3_bucket = s3_bucket
  Jsii::Type.check_type(@s3_bucket, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3Bucket")
  @s3_key = s3_key
  Jsii::Type.check_type(@s3_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3Key")
  @overrides = overrides.is_a?(Hash) ? ::AWSCDK::AlexaAsk::CfnSkill::OverridesProperty.new(**overrides.transform_keys(&:to_sym)) : overrides
  Jsii::Type.check_type(@overrides, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmFsZXhhX2Fzay5DZm5Ta2lsbC5PdmVycmlkZXNQcm9wZXJ0eSJ9XX19")), "overrides") unless @overrides.nil?
  @s3_bucket_role = s3_bucket_role
  Jsii::Type.check_type(@s3_bucket_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3BucketRole") unless @s3_bucket_role.nil?
  @s3_object_version = s3_object_version
  Jsii::Type.check_type(@s3_object_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3ObjectVersion") unless @s3_object_version.nil?
end

Instance Attribute Details

#overridesAWSCDK::IResolvable, ... (readonly)

Overrides to the skill package to apply when creating or updating the skill.

Values provided here do not modify the contents of the original skill package. Currently, only overriding values inside of the skill manifest component of the package is supported.



663
664
665
# File 'alexa_ask/cfn_skill.rb', line 663

def overrides
  @overrides
end

#s3_bucketString (readonly)

The name of the Amazon S3 bucket where the .zip file that contains the skill package is stored.



651
652
653
# File 'alexa_ask/cfn_skill.rb', line 651

def s3_bucket
  @s3_bucket
end

#s3_bucket_roleString? (readonly)

ARN of the IAM role that grants the Alexa service ( alexa-appkit.amazon.com ) permission to access the bucket and retrieve the skill package. This property is optional. If you do not provide it, the bucket must be publicly accessible or configured with a policy that allows this access. Otherwise, CloudFormation cannot create the skill.



668
669
670
# File 'alexa_ask/cfn_skill.rb', line 668

def s3_bucket_role
  @s3_bucket_role
end

#s3_keyString (readonly)

The location and name of the skill package .zip file.



656
657
658
# File 'alexa_ask/cfn_skill.rb', line 656

def s3_key
  @s3_key
end

#s3_object_versionString? (readonly)

If you have S3 versioning enabled, the version ID of the skill package.zip file.



673
674
675
# File 'alexa_ask/cfn_skill.rb', line 673

def s3_object_version
  @s3_object_version
end

Class Method Details

.jsii_propertiesObject



675
676
677
678
679
680
681
682
683
# File 'alexa_ask/cfn_skill.rb', line 675

def self.jsii_properties
  {
    :s3_bucket => "s3Bucket",
    :s3_key => "s3Key",
    :overrides => "overrides",
    :s3_bucket_role => "s3BucketRole",
    :s3_object_version => "s3ObjectVersion",
  }
end

Instance Method Details

#to_jsiiObject



685
686
687
688
689
690
691
692
693
694
695
# File 'alexa_ask/cfn_skill.rb', line 685

def to_jsii
  result = {}
  result.merge!({
    "s3Bucket" => @s3_bucket,
    "s3Key" => @s3_key,
    "overrides" => @overrides,
    "s3BucketRole" => @s3_bucket_role,
    "s3ObjectVersion" => @s3_object_version,
  })
  result.compact
end