Class: AWSCDK::Logs::LogGroupGrants

Inherits:
Jsii::Object
  • Object
show all
Defined in:
logs/log_group_grants.rb

Overview

Collection of grant methods for a ILogGroupRef.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ LogGroupGrants

Returns a new instance of LogGroupGrants.

Raises:

  • (NoMethodError)


8
9
10
# File 'logs/log_group_grants.rb', line 8

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

Class Method Details

.from_log_group(resource) ⇒ AWSCDK::Logs::LogGroupGrants

Creates grants for LogGroupGrants.

Parameters:

Returns:

  • (AWSCDK::Logs::LogGroupGrants)


26
27
28
29
# File 'logs/log_group_grants.rb', line 26

def self.from_log_group(resource)
  Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sb2dzLklMb2dHcm91cFJlZiJ9")), "resource")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_logs.LogGroupGrants", "fromLogGroup", [resource])
end

.jsii_overridable_methodsObject



12
13
14
15
16
17
18
19
20
# File 'logs/log_group_grants.rb', line 12

def self.jsii_overridable_methods
  {
    :resource => { kind: :property, name: "resource", is_optional: false },
    :policy_resource => { kind: :property, name: "policyResource", is_optional: true },
    :actions => { kind: :method, name: "actions", is_optional: false },
    :read => { kind: :method, name: "read", is_optional: false },
    :write => { kind: :method, name: "write", is_optional: false },
  }
end

Instance Method Details

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

Grant the given identity custom permissions.

Parameters:

Returns:



47
48
49
50
51
52
53
# File 'logs/log_group_grants.rb', line 47

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

#policy_resourceAWSCDK::IAM::IResourceWithPolicyV2?



37
38
39
# File 'logs/log_group_grants.rb', line 37

def policy_resource()
  jsii_get_property("policyResource")
end

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

Give permissions to read and filter events from this log group.

Parameters:

Returns:



59
60
61
62
# File 'logs/log_group_grants.rb', line 59

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

#resourceAWSCDK::Interfaces::AWSLogs::ILogGroupRef



32
33
34
# File 'logs/log_group_grants.rb', line 32

def resource()
  jsii_get_property("resource")
end

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

Give permissions to create and write to streams in this log group.

Parameters:

Returns:



68
69
70
71
# File 'logs/log_group_grants.rb', line 68

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