Class: AWSCDK::Elasticsearch::DomainGrants
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Elasticsearch::DomainGrants
- Defined in:
- elasticsearch/domain_grants.rb
Overview
Collection of grant methods for a IDomainRef.
Class Method Summary collapse
-
.from_domain(resource) ⇒ AWSCDK::Elasticsearch::DomainGrants
Creates grants for DomainGrants.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#actions(grantee, actions, options = nil) ⇒ AWSCDK::IAM::Grant
Grant the given identity custom permissions.
-
#initialize(*args) ⇒ DomainGrants
constructor
A new instance of DomainGrants.
-
#read(grantee) ⇒ AWSCDK::IAM::Grant
Grant read permissions for this domain and its contents to an IAM principal (Role/Group/User).
-
#read_write(grantee) ⇒ AWSCDK::IAM::Grant
Grant read/write permissions for this domain and its contents to an IAM principal (Role/Group/User).
- #resource ⇒ AWSCDK::Interfaces::AWSElasticsearch::IDomainRef
-
#write(grantee) ⇒ AWSCDK::IAM::Grant
Grant write permissions for this domain and its contents to an IAM principal (Role/Group/User).
Constructor Details
#initialize(*args) ⇒ DomainGrants
Returns a new instance of DomainGrants.
8 9 10 |
# File 'elasticsearch/domain_grants.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_elasticsearch.DomainGrants does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.from_domain(resource) ⇒ AWSCDK::Elasticsearch::DomainGrants
Creates grants for DomainGrants.
26 27 28 29 |
# File 'elasticsearch/domain_grants.rb', line 26 def self.from_domain(resource) Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lbGFzdGljc2VhcmNoLklEb21haW5SZWYifQ==")), "resource") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_elasticsearch.DomainGrants", "fromDomain", [resource]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'elasticsearch/domain_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 }, :read => { kind: :method, name: "read", is_optional: false }, :read_write => { kind: :method, name: "readWrite", 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.
42 43 44 45 46 47 48 |
# File 'elasticsearch/domain_grants.rb', line 42 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 |
#read(grantee) ⇒ AWSCDK::IAM::Grant
Grant read permissions for this domain and its contents to an IAM principal (Role/Group/User).
54 55 56 57 |
# File 'elasticsearch/domain_grants.rb', line 54 def read(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("read", [grantee]) end |
#read_write(grantee) ⇒ AWSCDK::IAM::Grant
Grant read/write permissions for this domain and its contents to an IAM principal (Role/Group/User).
63 64 65 66 |
# File 'elasticsearch/domain_grants.rb', line 63 def read_write(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("readWrite", [grantee]) end |
#resource ⇒ AWSCDK::Interfaces::AWSElasticsearch::IDomainRef
32 33 34 |
# File 'elasticsearch/domain_grants.rb', line 32 def resource() jsii_get_property("resource") end |
#write(grantee) ⇒ AWSCDK::IAM::Grant
Grant write permissions for this domain and its contents to an IAM principal (Role/Group/User).
72 73 74 75 |
# File 'elasticsearch/domain_grants.rb', line 72 def write(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("write", [grantee]) end |