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:AwsOpensearch uses literal capability opensearch and shared logical/provider args.name through buildComponentLogicalName(...): ${env}-${projectHash}-opensearch-${sanitised args.name}.
  • Under parent type ${namespace}:aws:AwsOpensearch, qualified child type aws:opensearch/domain:Domain uses tuple [args.name], producing ${env}-${projectHash}-${sanitised args.name}.
  • The OpenSearch domain AWS name uses stackAndPurpose with lower-cased args.name and 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

CODE
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 from args.name.
  • options (ComponentResourceOptions, optional) — Optional settings controlling resource behaviour.

Returns

AwsOpensearch

Hierarchy

  • ComponentResource
  • AwsOpensearch

Properties

dashboardEndpoint: Output<string>

readonly

OpenSearch Dashboards endpoint hostname.

domain: Domain

readonly

Underlying OpenSearch domain resource.

domainArn: Output<string>

readonly

OpenSearch domain ARN.

domainEndpoint: Output<string>

readonly

OpenSearch domain endpoint hostname.

domainName: Output<string>

readonly

OpenSearch domain name.

urn: Output<string>

readonly

Inherited from urn

The stable logical URN used to distinctly address a resource, both before and after deployments.

Methods

getData(): Promise<any>

protectedasync

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>

protectedasync

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

protected

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>

static

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>