Class: AWSCDK::AppSync::AppSyncEventResource

Inherits:
Jsii::Object
  • Object
show all
Defined in:
app_sync/app_sync_event_resource.rb

Overview

A class used to generate resource arns for AppSync Event APIs.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ AppSyncEventResource

Returns a new instance of AppSyncEventResource.

Raises:

  • (NoMethodError)


8
9
10
# File 'app_sync/app_sync_event_resource.rb', line 8

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.aws_appsync.AppSyncEventResource does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.allAWSCDK::AppSync::AppSyncEventResource

Generate the resource names that accepts all types: *.

Returns:

  • (AWSCDK::AppSync::AppSyncEventResource)


21
22
23
# File 'app_sync/app_sync_event_resource.rb', line 21

def self.all()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appsync.AppSyncEventResource", "all", [])
end

.all_channel_namespacesAWSCDK::AppSync::AppSyncEventResource

Generate the resource names that accepts all channel namespaces: *.

Returns:

  • (AWSCDK::AppSync::AppSyncEventResource)


28
29
30
# File 'app_sync/app_sync_event_resource.rb', line 28

def self.all_channel_namespaces()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appsync.AppSyncEventResource", "allChannelNamespaces", [])
end

.for_apiAWSCDK::AppSync::AppSyncEventResource

Generate a resource for the calling API.

Returns:

  • (AWSCDK::AppSync::AppSyncEventResource)


35
36
37
# File 'app_sync/app_sync_event_resource.rb', line 35

def self.for_api()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appsync.AppSyncEventResource", "forAPI", [])
end

.jsii_overridable_methodsObject



12
13
14
15
16
# File 'app_sync/app_sync_event_resource.rb', line 12

def self.jsii_overridable_methods
  {
    :resource_arns => { kind: :method, name: "resourceArns", is_optional: false },
  }
end

.of_channel_namespace(channel_namespace) ⇒ AWSCDK::AppSync::AppSyncEventResource

Generate the resource names given a channel namespace.

Parameters:

  • channel_namespace (String)

    The channel namespace that needs to be allowed.

Returns:

  • (AWSCDK::AppSync::AppSyncEventResource)


43
44
45
46
# File 'app_sync/app_sync_event_resource.rb', line 43

def self.of_channel_namespace(channel_namespace)
  Jsii::Type.check_type(channel_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "channelNamespace")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_appsync.AppSyncEventResource", "ofChannelNamespace", [channel_namespace])
end

Instance Method Details

#resource_arns(api) ⇒ Array<String>

Return the Resource ARN.

Parameters:

Returns:

  • (Array<String>)


52
53
54
55
# File 'app_sync/app_sync_event_resource.rb', line 52

def resource_arns(api)
  Jsii::Type.check_type(api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5FdmVudEFwaUJhc2UifQ==")), "api")
  jsii_call_method("resourceArns", [api])
end