AwsAutoScalingGroup

Creates an opinionated AWS Auto Scaling Group backed by a launch-template component.

Remarks

Naming:

  • Root type ${namespace}:aws:AwsAutoScalingGroup has capability auto-scaling-group, raw identity args.identity, and target ${env}-${projectHash}-auto-scaling-group-${sanitiseNamePart(args.identity)}. The identity is logical-only.
  • aws:autoscaling/group:Group has parent AwsAutoScalingGroup, tuple [args.identity], and target ${env}-${projectHash}-${sanitiseNamePart(args.identity)}.
  • Provider name uses stackOnly through buildNameByStyleWithRuntimeContext, with target ${env}-${projectHash}. This purpose-less name satisfies the AWS Auto Scaling Group 255-character limit.

Example

CODE
const group = new AwsAutoScalingGroup({
  identity: 'api-workers',
  launchTemplate: workersTemplate,
  minSize: 2,
  maxSize: 6,
  network: { subnetIds: applicationSubnetIds },
});

Constructors

new AwsAutoScalingGroup( args: AwsAutoScalingGroupArgs, options?: ComponentResourceOptions, ): AwsAutoScalingGroup

Parameters

  • args (AwsAutoScalingGroupArgs) — Auto Scaling Group configuration with a stable identity, launch template, capacity, and subnet source.
  • options (ComponentResourceOptions, optional) — Optional Pulumi resource options, including the selected AWS provider.

Returns

AwsAutoScalingGroup

Hierarchy

  • ComponentResource
  • AwsAutoScalingGroup

Properties

autoScalingGroup: Group

readonly

Created Auto Scaling Group resource.

autoScalingGroupArn: Output<string>

readonly

Auto Scaling Group ARN.

autoScalingGroupId: Output<string>

readonly

Auto Scaling Group ID.

autoScalingGroupName: Output<string>

readonly

Resolved AWS Auto Scaling Group name.

predictedCapacity: OutputInstance<number>

readonly

Provider-predicted group capacity.

urn: Output<string>

readonly

Inherited from urn

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

warmPoolSize: OutputInstance<number>

readonly

Current warm-pool size.

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>