Skip to content

Latest commit

 

History

History
444 lines (271 loc) · 14.3 KB

File metadata and controls

444 lines (271 loc) · 14.3 KB

API Reference

Constructs

RemoteOutputs

Represents the RemoteOutputs of the remote CDK stack.

Initializers

import { RemoteOutputs } from '@doceight/cdk-remote-stack'

new RemoteOutputs(scope: Construct, id: string, props: RemoteOutputsProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props RemoteOutputsProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.
get Get the attribute value from the outputs.

toString
public toString(): string

Returns a string representation of this construct.

get
public get(key: string): string

Get the attribute value from the outputs.

keyRequired
  • Type: string

output key.


Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { RemoteOutputs } from '@doceight/cdk-remote-stack'

RemoteOutputs.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.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
outputs aws-cdk-lib.CustomResource The outputs from the remote stack.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


outputsRequired
public readonly outputs: CustomResource;
  • Type: aws-cdk-lib.CustomResource

The outputs from the remote stack.


RemoteParameters

Represents the RemoteParameters of the remote CDK stack.

Initializers

import { RemoteParameters } from '@doceight/cdk-remote-stack'

new RemoteParameters(scope: Construct, id: string, props: RemoteParametersProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props RemoteParametersProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.
get Get the parameter.

toString
public toString(): string

Returns a string representation of this construct.

get
public get(key: string): string

Get the parameter.

keyRequired
  • Type: string

output key.


Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { RemoteParameters } from '@doceight/cdk-remote-stack'

RemoteParameters.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.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
parameters aws-cdk-lib.CustomResource The parameters in the SSM parameter store for the remote stack.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


parametersRequired
public readonly parameters: CustomResource;
  • Type: aws-cdk-lib.CustomResource

The parameters in the SSM parameter store for the remote stack.


Structs

RemoteOutputsProps

Properties of the RemoteOutputs.

Initializer

import { RemoteOutputsProps } from '@doceight/cdk-remote-stack'

const remoteOutputsProps: RemoteOutputsProps = { ... }

Properties

Name Type Description
stack aws-cdk-lib.Stack The remote CDK stack to get the outputs from.
alwaysUpdate boolean Indicate whether always update the custom resource to get the new stack output.
timeout aws-cdk-lib.Duration timeout for custom resource handler.

stackRequired
public readonly stack: Stack;
  • Type: aws-cdk-lib.Stack

The remote CDK stack to get the outputs from.


alwaysUpdateOptional
public readonly alwaysUpdate: boolean;
  • Type: boolean
  • Default: true

Indicate whether always update the custom resource to get the new stack output.


timeoutOptional
public readonly timeout: Duration;
  • Type: aws-cdk-lib.Duration
  • Default: no timeout specified.

timeout for custom resource handler.


RemoteParametersProps

Properties of the RemoteParameters.

Initializer

import { RemoteParametersProps } from '@doceight/cdk-remote-stack'

const remoteParametersProps: RemoteParametersProps = { ... }

Properties

Name Type Description
path string The parameter path.
region string The region code of the remote stack.
alwaysUpdate boolean Indicate whether always update the custom resource to get the new stack output.
role aws-cdk-lib.aws_iam.IRole The assumed role used to get remote parameters.
timeout aws-cdk-lib.Duration timeout for custom resource handler.

pathRequired
public readonly path: string;
  • Type: string

The parameter path.


regionRequired
public readonly region: string;
  • Type: string

The region code of the remote stack.


alwaysUpdateOptional
public readonly alwaysUpdate: boolean;
  • Type: boolean
  • Default: true

Indicate whether always update the custom resource to get the new stack output.


roleOptional
public readonly role: IRole;
  • Type: aws-cdk-lib.aws_iam.IRole

The assumed role used to get remote parameters.


timeoutOptional
public readonly timeout: Duration;
  • Type: aws-cdk-lib.Duration
  • Default: no timeout specified.

timeout for custom resource handler.