Class: AWSCDK::Events::EventBusGrants

Inherits:
Jsii::Object
  • Object
show all
Defined in:
events/event_bus_grants.rb

Overview

Collection of grant methods for a IEventBusRef.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ EventBusGrants

Returns a new instance of EventBusGrants.

Raises:

  • (NoMethodError)


8
9
10
# File 'events/event_bus_grants.rb', line 8

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

Class Method Details

.from_event_bus(resource) ⇒ AWSCDK::Events::EventBusGrants

Creates grants for EventBusGrants.

Parameters:

Returns:

  • (AWSCDK::Events::EventBusGrants)


24
25
26
27
# File 'events/event_bus_grants.rb', line 24

def self.from_event_bus(resource)
  Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19ldmVudHMuSUV2ZW50QnVzUmVmIn0=")), "resource")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.EventBusGrants", "fromEventBus", [resource])
end

.jsii_overridable_methodsObject



12
13
14
15
16
17
18
# File 'events/event_bus_grants.rb', line 12

def self.jsii_overridable_methods
  {
    :resource => { kind: :property, name: "resource", is_optional: false },
    :actions => { kind: :method, name: "actions", is_optional: false },
    :all_put_events => { kind: :method, name: "allPutEvents", is_optional: false },
  }
end

Instance Method Details

#actions(grantee, actions, options = nil) ⇒ AWSCDK::IAM::Grant

Grant the given identity custom permissions.

Parameters:

Returns:



40
41
42
43
44
45
46
# File 'events/event_bus_grants.rb', line 40

def actions(grantee, actions, options = nil)
  Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee")
  Jsii::Type.check_type(actions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "actions")
  options = options.is_a?(Hash) ? ::AWSCDK::PermissionsOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5QZXJtaXNzaW9uc09wdGlvbnMifQ==")), "options") unless options.nil?
  jsii_call_method("actions", [grantee, actions, options])
end

#all_put_events(grantee) ⇒ AWSCDK::IAM::Grant

Permits an IAM Principal to send custom events to EventBridge so that they can be matched to rules.

Parameters:

Returns:



52
53
54
55
# File 'events/event_bus_grants.rb', line 52

def all_put_events(grantee)
  Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee")
  jsii_call_method("allPutEvents", [grantee])
end

#resourceAWSCDK::Interfaces::AWSEvents::IEventBusRef



30
31
32
# File 'events/event_bus_grants.rb', line 30

def resource()
  jsii_get_property("resource")
end