Class: AWSCDK::IAM::CfnServiceLinkedRoleProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
iam/cfn_service_linked_role_props.rb

Overview

Properties for defining a CfnServiceLinkedRole.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aws_service_name: nil, custom_suffix: nil, description: nil) ⇒ CfnServiceLinkedRoleProps

Returns a new instance of CfnServiceLinkedRoleProps.

Parameters:

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

    The service principal for the AWS service to which this role is attached.

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

    A string that you provide, which is combined with the service-provided prefix to form the complete role name.

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

    The description of the role.



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

def initialize(aws_service_name: nil, custom_suffix: nil, description: nil)
  @aws_service_name = aws_service_name
  Jsii::Type.check_type(@aws_service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "awsServiceName") unless @aws_service_name.nil?
  @custom_suffix = custom_suffix
  Jsii::Type.check_type(@custom_suffix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customSuffix") unless @custom_suffix.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
end

Instance Attribute Details

#aws_service_nameString? (readonly)

The service principal for the AWS service to which this role is attached.

You use a string similar to a URL but without the http:// in front. For example: elasticbeanstalk.amazonaws.com .

Service principals are unique and case-sensitive. To find the exact service principal for your service-linked role, see AWS services that work with IAM in the IAM User Guide . Look for the services that have Yes in the Service-Linked Role column. Choose the Yes link to view the service-linked role documentation for that service.



29
30
31
# File 'iam/cfn_service_linked_role_props.rb', line 29

def aws_service_name
  @aws_service_name
end

#custom_suffixString? (readonly)

A string that you provide, which is combined with the service-provided prefix to form the complete role name.

If you make multiple requests for the same service, then you must supply a different CustomSuffix for each request. Otherwise the request fails with a duplicate role name error. For example, you could add -1 or -debug to the suffix.

Some services do not support the CustomSuffix parameter. If you provide an optional suffix and the operation fails, try the operation again without the suffix.



38
39
40
# File 'iam/cfn_service_linked_role_props.rb', line 38

def custom_suffix
  @custom_suffix
end

#descriptionString? (readonly)

The description of the role.



43
44
45
# File 'iam/cfn_service_linked_role_props.rb', line 43

def description
  @description
end

Class Method Details

.jsii_propertiesObject



45
46
47
48
49
50
51
# File 'iam/cfn_service_linked_role_props.rb', line 45

def self.jsii_properties
  {
    :aws_service_name => "awsServiceName",
    :custom_suffix => "customSuffix",
    :description => "description",
  }
end

Instance Method Details

#to_jsiiObject



53
54
55
56
57
58
59
60
61
# File 'iam/cfn_service_linked_role_props.rb', line 53

def to_jsii
  result = {}
  result.merge!({
    "awsServiceName" => @aws_service_name,
    "customSuffix" => @custom_suffix,
    "description" => @description,
  })
  result.compact
end