Class: AWSCDK::Logs::LogGroupGrants
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Logs::LogGroupGrants
- Defined in:
- logs/log_group_grants.rb
Overview
Collection of grant methods for a ILogGroupRef.
Class Method Summary collapse
-
.from_log_group(resource) ⇒ AWSCDK::Logs::LogGroupGrants
Creates grants for LogGroupGrants.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#actions(grantee, actions, options = nil) ⇒ AWSCDK::IAM::Grant
Grant the given identity custom permissions.
-
#initialize(*args) ⇒ LogGroupGrants
constructor
A new instance of LogGroupGrants.
- #policy_resource ⇒ AWSCDK::IAM::IResourceWithPolicyV2?
-
#read(grantee) ⇒ AWSCDK::IAM::Grant
Give permissions to read and filter events from this log group.
- #resource ⇒ AWSCDK::Interfaces::AWSLogs::ILogGroupRef
-
#write(grantee) ⇒ AWSCDK::IAM::Grant
Give permissions to create and write to streams in this log group.
Constructor Details
#initialize(*args) ⇒ LogGroupGrants
Returns a new instance of LogGroupGrants.
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.
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_methods ⇒ Object
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.
47 48 49 50 51 52 53 |
# File 'logs/log_group_grants.rb', line 47 def actions(grantee, actions, = 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") = .is_a?(Hash) ? ::AWSCDK::PermissionsOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5QZXJtaXNzaW9uc09wdGlvbnMifQ==")), "options") unless .nil? jsii_call_method("actions", [grantee, actions, ]) end |
#policy_resource ⇒ AWSCDK::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.
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 |
#resource ⇒ AWSCDK::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.
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 |