Creates a CloudFormation parameter which references the bucket used to store code artifacts. By default, the bucket name is stored in an SSM Parameter called /account/services/artifact.bucket.

Hierarchy (View Summary)

Properties

id: string
logicalId: string

The logical ID for this CloudFormation stack element. The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

the logical ID as a stringified token. This value will only get resolved during synthesis.

node: Node

The tree node.

stack: Stack

The stack in which this element is defined. CfnElements must be defined within a stack scope (directly or indirectly).

Accessors

  • get allowedPattern(): undefined | string
  • A regular expression that represents the patterns to allow for String types.

    Returns undefined | string

    - No constraints on patterns allowed for parameter.
    
  • set allowedPattern(pattern: undefined | string): void
  • Parameters

    • pattern: undefined | string

    Returns void

  • get allowedValues(): undefined | string[]
  • An array containing the list of values allowed for the parameter.

    Returns undefined | string[]

    - No constraints on values allowed for parameter.
    
  • set allowedValues(values: undefined | string[]): void
  • Parameters

    • values: undefined | string[]

    Returns void

  • get constraintDescription(): undefined | string
  • A string that explains a constraint when the constraint is violated. For example, without a constraint description, a parameter that has an allowed pattern of [A-Za-z0-9]+ displays the following error message when the user specifies an invalid value:

    Returns undefined | string

    - No description with customized error message when user specifies invalid values.
    
  • set constraintDescription(desc: undefined | string): void
  • Parameters

    • desc: undefined | string

    Returns void

  • get creationStack(): string[]
  • Returns string[]

    the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

  • get default(): any
  • A value of the appropriate type for the template to use if no value is specified when a stack is created. If you define constraints for the parameter, you must specify a value that adheres to those constraints.

    Returns any

    - No default value for parameter.
    
  • set default(value: any): void
  • Parameters

    • value: any

    Returns void

  • get description(): undefined | string
  • A string of up to 4000 characters that describes the parameter.

    Returns undefined | string

    - No description for the parameter.
    
  • set description(desc: undefined | string): void
  • Parameters

    • desc: undefined | string

    Returns void

  • get maxLength(): undefined | number
  • An integer value that determines the largest number of characters you want to allow for String types.

    Returns undefined | number

    - None.
    
  • set maxLength(len: undefined | number): void
  • Parameters

    • len: undefined | number

    Returns void

  • get maxValue(): undefined | number
  • A numeric value that determines the largest numeric value you want to allow for Number types.

    Returns undefined | number

    - None.
    
  • set maxValue(len: undefined | number): void
  • Parameters

    • len: undefined | number

    Returns void

  • get minLength(): undefined | number
  • An integer value that determines the smallest number of characters you want to allow for String types.

    Returns undefined | number

    - None.
    
  • set minLength(len: undefined | number): void
  • Parameters

    • len: undefined | number

    Returns void

  • get minValue(): undefined | number
  • A numeric value that determines the smallest numeric value you want to allow for Number types.

    Returns undefined | number

    - None.
    
  • set minValue(len: undefined | number): void
  • Parameters

    • len: undefined | number

    Returns void

  • get noEcho(): boolean
  • Indicates if this parameter is configured with "NoEcho" enabled.

    Returns boolean

  • set noEcho(echo: boolean): void
  • Parameters

    • echo: boolean

    Returns void

  • get type(): string
  • The data type for the parameter (DataType).

    Returns string

    String
    
  • set type(type: string): void
  • Parameters

    • type: string

    Returns void

  • get value(): IResolvable
  • The parameter value as a Token

    Returns IResolvable

  • get valueAsList(): string[]
  • The parameter value, if it represents a string list.

    Returns string[]

  • get valueAsNumber(): number
  • The parameter value, if it represents a number.

    Returns number

  • get valueAsString(): string
  • The parameter value, if it represents a string.

    Returns string

Methods

  • Internal

    Lock the logicalId of the element and do not allow any updates (e.g. via overrideLogicalId)

    This is needed in cases where you are consuming the LogicalID of an element prior to synthesis and you need to not allow future changes to the id since doing so would cause the value you just consumed to differ from the synth time value of the logicalId.

    For example:

    const bucket = new Bucket(stack, 'Bucket'); stack.exportValue(bucket.bucketArn) <--- consuming the logicalId bucket.overrideLogicalId('NewLogicalId') <--- updating logicalId

    You should most likely never need to use this method, and if you are implementing a feature that requires this, make sure you actually require it.

    Returns void

  • Overrides the auto-generated logical ID with a specific ID.

    Parameters

    • newLogicalId: string

      The new logical ID to use for this stack element.

    Returns void

  • Parameters

    • _context: IResolveContext

    Returns any

  • Returns a string representation of this construct.

    Returns string

  • Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

    Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

    Parameters

    • x: any

    Returns x is CfnElement

    The construct as a stack element or undefined if it is not a stack element.

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

    Parameters

    • x: any

      Any object

    Returns x is Construct

    true if x is an object created from a class which extends Construct.