import { OpenSearchCustomResource } from 'opensearch-rest-resources'
new OpenSearchCustomResource(scope: Construct, id: string, props: OpenSearchCustomResourceProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
OpenSearchCustomResourceProps |
No description. |
- Type: constructs.Construct
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
getStringAfterResourceCreation |
This function converts a string to a token that has an implicit dependency between this resource and a consumer of the string. |
public toString(): string
Returns a string representation of this construct.
public getStringAfterResourceCreation(str: string): string
This function converts a string to a token that has an implicit dependency between this resource and a consumer of the string.
- Type: string
any string.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { OpenSearchCustomResource } from 'opensearch-rest-resources'
OpenSearchCustomResource.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
import { OpenSearchRole } from 'opensearch-rest-resources'
new OpenSearchRole(scope: Construct, id: string, props: OpenSearchRoleProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
OpenSearchRoleProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: OpenSearchRoleProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { OpenSearchRole } from 'opensearch-rest-resources'
OpenSearchRole.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
roleName |
string |
The name of this role. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly roleName: string;
- Type: string
The name of this role.
import { OpenSearchRoleMapping } from 'opensearch-rest-resources'
new OpenSearchRoleMapping(scope: Construct, id: string, props: OpenSearchRoleMappingProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
OpenSearchRoleMappingProps |
No description. |
- Type: constructs.Construct
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { OpenSearchRoleMapping } from 'opensearch-rest-resources'
OpenSearchRoleMapping.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
roleName |
string |
The name of the OpenSearch role this mapping is created for. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly roleName: string;
- Type: string
The name of the OpenSearch role this mapping is created for.
import { OpenSearchUser } from 'opensearch-rest-resources'
new OpenSearchUser(scope: Construct, id: string, props: OpenSearchUserProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
OpenSearchUserProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: OpenSearchUserProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { OpenSearchUser } from 'opensearch-rest-resources'
OpenSearchUser.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
userName |
string |
The name of this user. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly userName: string;
- Type: string
The name of this user.
import { IndexPermissions } from 'opensearch-rest-resources'
const indexPermissions: IndexPermissions = { ... }
Name | Type | Description |
---|---|---|
allowedActions |
string[] |
https://opensearch.org/docs/latest/security/access-control/default-action-groups/. |
dls |
string |
No description. |
fls |
string[] |
No description. |
indexPatterns |
string[] |
No description. |
maskedFields |
string[] |
No description. |
public readonly allowedActions: string[];
- Type: string[]
https://opensearch.org/docs/latest/security/access-control/default-action-groups/.
public readonly dls: string;
- Type: string
public readonly fls: string[];
- Type: string[]
public readonly indexPatterns: string[];
- Type: string[]
public readonly maskedFields: string[];
- Type: string[]
import { OpenSearchCustomResourceProps } from 'opensearch-rest-resources'
const openSearchCustomResourceProps: OpenSearchCustomResourceProps = { ... }
Name | Type | Description |
---|---|---|
domain |
aws-cdk-lib.aws_opensearchservice.Domain |
The OpenSearch domain you want to create a resource in. |
payloadJson |
string |
A payload in JSON string to send with a request on create/update event. |
restEndpoint |
string |
A REST endpoint to call from the custom resource handler. |
removalPolicy |
aws-cdk-lib.RemovalPolicy |
Policy to apply when the resource is removed from the stack. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC your OpenSearch domain is in. |
public readonly domain: Domain;
- Type: aws-cdk-lib.aws_opensearchservice.Domain
The OpenSearch domain you want to create a resource in.
public readonly payloadJson: string;
- Type: string
A payload in JSON string to send with a request on create/update event.
public readonly restEndpoint: string;
- Type: string
A REST endpoint to call from the custom resource handler.
It sends PUT request on a create/update event and DELETE request on a delete event.
Example
_plugins/_security/api/roles/roleName
public readonly removalPolicy: RemovalPolicy;
- Type: aws-cdk-lib.RemovalPolicy
- Default: RemovalPolicy.DESTROY
Policy to apply when the resource is removed from the stack.
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
- Default: Assumes your Domain is not deployed within a VPC
The VPC your OpenSearch domain is in.
import { OpenSearchRoleMappingProps } from 'opensearch-rest-resources'
const openSearchRoleMappingProps: OpenSearchRoleMappingProps = { ... }
Name | Type | Description |
---|---|---|
domain |
aws-cdk-lib.aws_opensearchservice.Domain |
The OpenSearch domain you want to create a resource in. |
removalPolicy |
aws-cdk-lib.RemovalPolicy |
Policy to apply when the resource is removed from the stack. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC your OpenSearch domain is in. |
payload |
RoleMappingPayload |
See https://opensearch.org/docs/latest/security/access-control/api/#create-role-mapping for the details. |
roleName |
string |
The role you create a role mapping for. |
public readonly domain: Domain;
- Type: aws-cdk-lib.aws_opensearchservice.Domain
The OpenSearch domain you want to create a resource in.
public readonly removalPolicy: RemovalPolicy;
- Type: aws-cdk-lib.RemovalPolicy
- Default: RemovalPolicy.DESTROY
Policy to apply when the resource is removed from the stack.
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
- Default: Assumes your Domain is not deployed within a VPC
The VPC your OpenSearch domain is in.
public readonly payload: RoleMappingPayload;
- Type: RoleMappingPayload
See https://opensearch.org/docs/latest/security/access-control/api/#create-role-mapping for the details.
public readonly roleName: string;
- Type: string
The role you create a role mapping for.
Create a role by {@link OpenSearchRole} class, or use a predefined role.
import { OpenSearchRoleProps } from 'opensearch-rest-resources'
const openSearchRoleProps: OpenSearchRoleProps = { ... }
Name | Type | Description |
---|---|---|
domain |
aws-cdk-lib.aws_opensearchservice.Domain |
The OpenSearch domain you want to create a resource in. |
removalPolicy |
aws-cdk-lib.RemovalPolicy |
Policy to apply when the resource is removed from the stack. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC your OpenSearch domain is in. |
payload |
RolePayload |
See https://opensearch.org/docs/latest/security/access-control/api/#create-role for the details. |
roleName |
string |
The name of this role. |
public readonly domain: Domain;
- Type: aws-cdk-lib.aws_opensearchservice.Domain
The OpenSearch domain you want to create a resource in.
public readonly removalPolicy: RemovalPolicy;
- Type: aws-cdk-lib.RemovalPolicy
- Default: RemovalPolicy.DESTROY
Policy to apply when the resource is removed from the stack.
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
- Default: Assumes your Domain is not deployed within a VPC
The VPC your OpenSearch domain is in.
public readonly payload: RolePayload;
- Type: RolePayload
See https://opensearch.org/docs/latest/security/access-control/api/#create-role for the details.
public readonly roleName: string;
- Type: string
The name of this role.
import { OpenSearchUserProps } from 'opensearch-rest-resources'
const openSearchUserProps: OpenSearchUserProps = { ... }
Name | Type | Description |
---|---|---|
domain |
aws-cdk-lib.aws_opensearchservice.Domain |
The OpenSearch domain you want to create a resource in. |
removalPolicy |
aws-cdk-lib.RemovalPolicy |
Policy to apply when the resource is removed from the stack. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC your OpenSearch domain is in. |
payload |
UserPayload |
See https://opensearch.org/docs/latest/security/access-control/api/#create-user for the details. |
userName |
string |
The name of this user. |
public readonly domain: Domain;
- Type: aws-cdk-lib.aws_opensearchservice.Domain
The OpenSearch domain you want to create a resource in.
public readonly removalPolicy: RemovalPolicy;
- Type: aws-cdk-lib.RemovalPolicy
- Default: RemovalPolicy.DESTROY
Policy to apply when the resource is removed from the stack.
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
- Default: Assumes your Domain is not deployed within a VPC
The VPC your OpenSearch domain is in.
public readonly payload: UserPayload;
- Type: UserPayload
See https://opensearch.org/docs/latest/security/access-control/api/#create-user for the details.
public readonly userName: string;
- Type: string
The name of this user.
import { ResourcePropsBase } from 'opensearch-rest-resources'
const resourcePropsBase: ResourcePropsBase = { ... }
Name | Type | Description |
---|---|---|
domain |
aws-cdk-lib.aws_opensearchservice.Domain |
The OpenSearch domain you want to create a resource in. |
removalPolicy |
aws-cdk-lib.RemovalPolicy |
Policy to apply when the resource is removed from the stack. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC your OpenSearch domain is in. |
public readonly domain: Domain;
- Type: aws-cdk-lib.aws_opensearchservice.Domain
The OpenSearch domain you want to create a resource in.
public readonly removalPolicy: RemovalPolicy;
- Type: aws-cdk-lib.RemovalPolicy
- Default: RemovalPolicy.DESTROY
Policy to apply when the resource is removed from the stack.
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
- Default: Assumes your Domain is not deployed within a VPC
The VPC your OpenSearch domain is in.
import { RoleMappingPayload } from 'opensearch-rest-resources'
const roleMappingPayload: RoleMappingPayload = { ... }
Name | Type | Description |
---|---|---|
backendRoles |
string[] |
No description. |
hosts |
string[] |
No description. |
users |
string[] |
No description. |
public readonly backendRoles: string[];
- Type: string[]
public readonly hosts: string[];
- Type: string[]
public readonly users: string[];
- Type: string[]
import { RolePayload } from 'opensearch-rest-resources'
const rolePayload: RolePayload = { ... }
Name | Type | Description |
---|---|---|
clusterPermissions |
string[] |
No description. |
indexPermissions |
IndexPermissions[] |
No description. |
tenantPermissions |
TenantPermissions[] |
No description. |
public readonly clusterPermissions: string[];
- Type: string[]
public readonly indexPermissions: IndexPermissions[];
- Type: IndexPermissions[]
public readonly tenantPermissions: TenantPermissions[];
- Type: TenantPermissions[]
import { TenantPermissions } from 'opensearch-rest-resources'
const tenantPermissions: TenantPermissions = { ... }
Name | Type | Description |
---|---|---|
allowedActions |
string[] |
No description. |
tenantPatterns |
string[] |
No description. |
public readonly allowedActions: string[];
- Type: string[]
public readonly tenantPatterns: string[];
- Type: string[]
import { UserPayload } from 'opensearch-rest-resources'
const userPayload: UserPayload = { ... }
Name | Type | Description |
---|---|---|
attributes |
{[ key: string ]: string} |
No description. |
backendRoles |
string[] |
No description. |
hash |
string |
No description. |
opendistroSecurityRoles |
string[] |
No description. |
password |
string |
No description. |
public readonly attributes: {[ key: string ]: string};
- Type: {[ key: string ]: string}
public readonly backendRoles: string[];
- Type: string[]
public readonly hash: string;
- Type: string
public readonly opendistroSecurityRoles: string[];
- Type: string[]
public readonly password: string;
- Type: string