Class: AWSCDK::OpenSearchService::DomainGrants

Inherits:
Jsii::Object
  • Object
show all
Defined in:
open_search_service/domain_grants.rb

Overview

Collection of grant methods for a IDomainRef.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ DomainGrants

Returns a new instance of DomainGrants.

Raises:

  • (NoMethodError)


8
9
10
# File 'open_search_service/domain_grants.rb', line 8

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

Class Method Details

.from_domain(resource) ⇒ AWSCDK::OpenSearchService::DomainGrants

Creates grants for DomainGrants.

Parameters:

Returns:

  • (AWSCDK::OpenSearchService::DomainGrants)


26
27
28
29
# File 'open_search_service/domain_grants.rb', line 26

def self.from_domain(resource)
  Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19vcGVuc2VhcmNoc2VydmljZS5JRG9tYWluUmVmIn0=")), "resource")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_opensearchservice.DomainGrants", "fromDomain", [resource])
end

.jsii_overridable_methodsObject



12
13
14
15
16
17
18
19
20
# File 'open_search_service/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.

Parameters:

Returns:



42
43
44
45
46
47
48
# File 'open_search_service/domain_grants.rb', line 42

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

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

Grant read permissions for this domain and its contents to an IAM principal (Role/Group/User).

Parameters:

Returns:



54
55
56
57
# File 'open_search_service/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).

Parameters:

Returns:



63
64
65
66
# File 'open_search_service/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

#resourceAWSCDK::Interfaces::AWSOpensearchservice::IDomainRef



32
33
34
# File 'open_search_service/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).

Parameters:

Returns:



72
73
74
75
# File 'open_search_service/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