Class: AWSCDK::CloudAssemblySchema::AmiContextQuery

Inherits:
ContextLookupRoleOptions
  • Object
show all
Defined in:
cloud_assembly_schema/ami_context_query.rb

Overview

Query to AMI context provider.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account:, region:, assume_role_additional_options: nil, lookup_role_arn: nil, lookup_role_external_id: nil, filters:, owners: nil) ⇒ AmiContextQuery

Returns a new instance of AmiContextQuery.

Parameters:

  • account (String)

    Query account.

  • region (String)

    Query region.

  • assume_role_additional_options (Hash{String => Object}, nil) (defaults to: nil)

    Additional options to pass to STS when assuming the lookup role.

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

    The ARN of the role that should be used to look up the missing values.

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

    The ExternalId that needs to be supplied while assuming this role.

  • filters (Hash{String => Array<String>})

    Filters to DescribeImages call.

  • owners (Array<String>, nil) (defaults to: nil)

    Owners to DescribeImages call.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'cloud_assembly_schema/ami_context_query.rb', line 14

def initialize(account:, region:, assume_role_additional_options: nil, lookup_role_arn: nil, lookup_role_external_id: nil, filters:, owners: nil)
  @account = 
  Jsii::Type.check_type(@account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "account")
  @region = region
  Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region")
  @assume_role_additional_options = assume_role_additional_options
  Jsii::Type.check_type(@assume_role_additional_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "assumeRoleAdditionalOptions") unless @assume_role_additional_options.nil?
  @lookup_role_arn = lookup_role_arn
  Jsii::Type.check_type(@lookup_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lookupRoleArn") unless @lookup_role_arn.nil?
  @lookup_role_external_id = lookup_role_external_id
  Jsii::Type.check_type(@lookup_role_external_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lookupRoleExternalId") unless @lookup_role_external_id.nil?
  @filters = filters
  Jsii::Type.check_type(@filters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJhcnJheSJ9fSwia2luZCI6Im1hcCJ9fQ==")), "filters")
  @owners = owners
  Jsii::Type.check_type(@owners, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "owners") unless @owners.nil?
end

Instance Attribute Details

#accountString (readonly)

Query account.

Returns:

  • (String)


34
35
36
# File 'cloud_assembly_schema/ami_context_query.rb', line 34

def 
  @account
end

#assume_role_additional_optionsHash{String => Object}? (readonly)

Note:

Default: - No additional options.

Additional options to pass to STS when assuming the lookup role.

  • RoleArn should not be used. Use the dedicated lookup_role_arn property instead.
  • ExternalId should not be used. Use the dedicated lookup_role_external_id instead.


47
48
49
# File 'cloud_assembly_schema/ami_context_query.rb', line 47

def assume_role_additional_options
  @assume_role_additional_options
end

#filtersHash{String => Array<String>} (readonly)

Filters to DescribeImages call.

Returns:

  • (Hash{String => Array<String>})


61
62
63
# File 'cloud_assembly_schema/ami_context_query.rb', line 61

def filters
  @filters
end

#lookup_role_arnString? (readonly)

Note:

Default: - None

The ARN of the role that should be used to look up the missing values.

Returns:

  • (String, nil)


52
53
54
# File 'cloud_assembly_schema/ami_context_query.rb', line 52

def lookup_role_arn
  @lookup_role_arn
end

#lookup_role_external_idString? (readonly)

Note:

Default: - No ExternalId will be supplied

The ExternalId that needs to be supplied while assuming this role.

Returns:

  • (String, nil)


57
58
59
# File 'cloud_assembly_schema/ami_context_query.rb', line 57

def lookup_role_external_id
  @lookup_role_external_id
end

#ownersArray<String>? (readonly)

Note:

Default: - All owners

Owners to DescribeImages call.

Returns:

  • (Array<String>, nil)


66
67
68
# File 'cloud_assembly_schema/ami_context_query.rb', line 66

def owners
  @owners
end

#regionString (readonly)

Query region.

Returns:

  • (String)


38
39
40
# File 'cloud_assembly_schema/ami_context_query.rb', line 38

def region
  @region
end

Class Method Details

.jsii_propertiesObject



68
69
70
71
72
73
74
75
76
77
78
# File 'cloud_assembly_schema/ami_context_query.rb', line 68

def self.jsii_properties
  {
    :account => "account",
    :region => "region",
    :assume_role_additional_options => "assumeRoleAdditionalOptions",
    :lookup_role_arn => "lookupRoleArn",
    :lookup_role_external_id => "lookupRoleExternalId",
    :filters => "filters",
    :owners => "owners",
  }
end

Instance Method Details

#to_jsiiObject



80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'cloud_assembly_schema/ami_context_query.rb', line 80

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "account" => @account,
    "region" => @region,
    "assumeRoleAdditionalOptions" => @assume_role_additional_options,
    "lookupRoleArn" => @lookup_role_arn,
    "lookupRoleExternalId" => @lookup_role_external_id,
    "filters" => @filters,
    "owners" => @owners,
  })
  result.compact
end