AwsOpensearch
Service-level AWS OpenSearch domain component.
Remarks
This component provisions one OpenSearch domain with a constrained, security-focused API.
Snapshot repositories and snapshot management policies configured through direct OpenSearch plugin HTTP APIs are intentionally out of scope for this component.
Naming:
- Root type
${namespace}:aws:AwsOpensearchuses literal capabilityopensearchand shared logical/providerargs.namethroughbuildComponentLogicalName(...):${env}-${projectHash}-opensearch-${sanitised args.name}. - Under parent type
${namespace}:aws:AwsOpensearch, qualified child typeaws:opensearch/domain:Domainuses tuple[args.name], producing${env}-${projectHash}-${sanitised args.name}. - The OpenSearch domain AWS name uses
stackAndPurposewith lower-casedargs.nameand remains${env}-${projectHash}-${lowerCase args.name}. It validates a camelCase alphanumeric purpose with a maximum length of 15 (OpenSearch domain names are limited to 28 characters).
Example
const search = new AwsOpensearch({
name: 'ordersSearch',
engineVersion: 'OpenSearch_2.17',
clusterConfig: {
instanceType: 't3.small.search',
instanceCount: 1,
},
ebsOptions: {
ebsEnabled: true,
volumeType: 'gp3',
volumeSize: 20,
},
accessPolicy: {
path: './policy/opensearch-access-policy.json',
variables: {
principalArn: readerRole.arn,
},
},
});Constructors
new AwsOpensearch(
args: AwsOpensearchArgs,
options?: ComponentResourceOptions,
): AwsOpensearch
Parameters
args(AwsOpensearchArgs) — Service-level OpenSearch domain inputs.The component logical name is derived fromargs.name.options(ComponentResourceOptions, optional) — Optional settings controlling resource behaviour.
Returns
AwsOpensearch
Hierarchy
ComponentResourceAwsOpensearch
Properties
dashboardEndpoint: Output<string>
OpenSearch Dashboards endpoint hostname.
domain: Domain
Underlying OpenSearch domain resource.
domainArn: Output<string>
OpenSearch domain ARN.
domainEndpoint: Output<string>
OpenSearch domain endpoint hostname.
domainName: Output<string>
OpenSearch domain name.
urn: Output<string>
Inherited from urn
The stable logical URN used to distinctly address a resource, both before and after deployments.
Methods
getData(): Promise<any>
Inherited from getData
Retrieves the data produces by initialize. The data is immediately available in a derived class's constructor after the super(...) call to ComponentResource.
Returns
Promise<any>
getProvider(moduleMember: string): ProviderResource | undefined
Inherited from getProvider
Returns the provider for the given module member, if one exists.
Parameters
moduleMember(string)
Returns
ProviderResource | undefined
initialize(
args: Inputs,
opts?: ComponentResourceOptions,
name?: string,
type?: string,
): Promise<any>
Inherited from initialize
Can be overridden by a subclass to asynchronously initialize data for this component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use getData.
Parameters
args(Inputs)opts(ComponentResourceOptions, optional)name(string, optional)type(string, optional)
Returns
Promise<any>
registerOutputs(
outputs?: Inputs | Promise<Inputs> | Output<Inputs>,
): void
Inherited from registerOutputs
Registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
Component resources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.
Parameters
outputs(Inputs | Promise<Inputs> | Output<Inputs>, optional)
Returns
void
Static Methods
isInstance(obj: any): obj is ComponentResource<any>
Inherited from isInstance
Returns true if the given object is a CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
Parameters
obj(any)
Returns
obj is ComponentResource<any>