Class: AWSCDK::AppSync::IAMResource
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::AppSync::IAMResource
- Defined in:
- app_sync/iam_resource.rb
Overview
A class used to generate resource arns for AppSync.
Class Method Summary collapse
-
.all ⇒ AWSCDK::AppSync::IAMResource
Generate the resource names that accepts all types:
*. -
.custom(*arns) ⇒ AWSCDK::AppSync::IAMResource
Generate the resource names given custom arns.
- .jsii_overridable_methods ⇒ Object
-
.of_type(type, *fields) ⇒ AWSCDK::AppSync::IAMResource
Generate the resource names given a type and fields.
Instance Method Summary collapse
-
#initialize(*args) ⇒ IAMResource
constructor
A new instance of IAMResource.
-
#resource_arns(api) ⇒ Array<String>
Return the Resource ARN.
Constructor Details
#initialize(*args) ⇒ IAMResource
Returns a new instance of IAMResource.
8 9 10 |
# File 'app_sync/iam_resource.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_appsync.IamResource does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.all ⇒ AWSCDK::AppSync::IAMResource
Generate the resource names that accepts all types: *.
21 22 23 |
# File 'app_sync/iam_resource.rb', line 21 def self.all() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appsync.IamResource", "all", []) end |
.custom(*arns) ⇒ AWSCDK::AppSync::IAMResource
Generate the resource names given custom arns.
29 30 31 32 33 34 |
# File 'app_sync/iam_resource.rb', line 29 def self.custom(*arns) arns.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arns[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appsync.IamResource", "custom", [*arns]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'app_sync/iam_resource.rb', line 12 def self.jsii_overridable_methods { :resource_arns => { kind: :method, name: "resourceArns", is_optional: false }, } end |
.of_type(type, *fields) ⇒ AWSCDK::AppSync::IAMResource
Generate the resource names given a type and fields.
41 42 43 44 45 46 47 |
# File 'app_sync/iam_resource.rb', line 41 def self.of_type(type, *fields) Jsii::Type.check_type(type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") fields.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fields[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appsync.IamResource", "ofType", [type, *fields]) end |
Instance Method Details
#resource_arns(api) ⇒ Array<String>
Return the Resource ARN.
53 54 55 56 |
# File 'app_sync/iam_resource.rb', line 53 def resource_arns(api) Jsii::Type.check_type(api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5HcmFwaHFsQXBpQmFzZSJ9")), "api") jsii_call_method("resourceArns", [api]) end |