Skip to content

Latest commit

 

History

History
694 lines (420 loc) · 21.9 KB

File metadata and controls

694 lines (420 loc) · 21.9 KB

API Reference

Structs

NamedEnv

Initializer

import { NamedEnv } from '@time-loop/cdk-named-environments'

const namedEnv: NamedEnv = { ... }

Properties

Name Type Description
account string The AWS account ID for this environment.
region string The AWS region for this environment.
defaultRegion string If a region isn't specified, where should we default to.
name string The proper name of the environment.
organizationalUnit string What kind of an account is this?
zoneName string The DNS zone into which services should be deployed.
ssoRegion string In which region does SSO live in?
ssoStartUrl string Is this an SSO accessible account?
shard IShard The shard within a region.

accountOptional
public readonly account: string;
  • Type: string
  • Default: Aws.accountId which means that the stack will be account-agnostic.

The AWS account ID for this environment.

This can be either a concrete value such as 585191031104 or Aws.accountId which indicates that account ID will only be determined during deployment (it will resolve to the CloudFormation intrinsic {"Ref":"AWS::AccountId"}). Note that certain features, such as cross-stack references and environmental context providers require concerete region information and will cause this stack to emit synthesis errors.


regionOptional
public readonly region: string;
  • Type: string
  • Default: Aws.region which means that the stack will be region-agnostic.

The AWS region for this environment.

This can be either a concrete value such as eu-west-2 or Aws.region which indicates that account ID will only be determined during deployment (it will resolve to the CloudFormation intrinsic {"Ref":"AWS::Region"}). Note that certain features, such as cross-stack references and environmental context providers require concerete region information and will cause this stack to emit synthesis errors.


defaultRegionRequired
public readonly defaultRegion: string;
  • Type: string

If a region isn't specified, where should we default to.

Also considered for centralized resources.


nameRequired
public readonly name: string;
  • Type: string

The proper name of the environment.


organizationalUnitRequired
public readonly organizationalUnit: string;
  • Type: string

What kind of an account is this?


zoneNameRequired
public readonly zoneName: string;
  • Type: string

The DNS zone into which services should be deployed.


ssoRegionOptional
public readonly ssoRegion: string;
  • Type: string

In which region does SSO live in?


ssoStartUrlOptional
public readonly ssoStartUrl: string;
  • Type: string

Is this an SSO accessible account?

If so, what's the start url?


shardRequired
public readonly shard: IShard;

The shard within a region.


NamedEnvCommonProps

Initializer

import { NamedEnvCommonProps } from '@time-loop/cdk-named-environments'

const namedEnvCommonProps: NamedEnvCommonProps = { ... }

Properties

Name Type Description
defaultRegion string If a region isn't specified, where should we default to.
name string The proper name of the environment.
organizationalUnit string What kind of an account is this?
zoneName string The DNS zone into which services should be deployed.
ssoRegion string In which region does SSO live in?
ssoStartUrl string Is this an SSO accessible account?

defaultRegionRequired
public readonly defaultRegion: string;
  • Type: string

If a region isn't specified, where should we default to.

Also considered for centralized resources.


nameRequired
public readonly name: string;
  • Type: string

The proper name of the environment.


organizationalUnitRequired
public readonly organizationalUnit: string;
  • Type: string

What kind of an account is this?


zoneNameRequired
public readonly zoneName: string;
  • Type: string

The DNS zone into which services should be deployed.


ssoRegionOptional
public readonly ssoRegion: string;
  • Type: string

In which region does SSO live in?


ssoStartUrlOptional
public readonly ssoStartUrl: string;
  • Type: string

Is this an SSO accessible account?

If so, what's the start url?


NamedEnvFactory

Generator of NamedEnv objects.

Initializer

import { NamedEnvFactory } from '@time-loop/cdk-named-environments'

const namedEnvFactory: NamedEnvFactory = { ... }

Properties

Name Type Description
account string The numeric account id as used by cdk.Environment.account.
environmentName string The proper name of the environment.
shards IShard[] Enumerates all existing shards grouped in the NamedEnv.

accountRequired
public readonly account: string;
  • Type: string

The numeric account id as used by cdk.Environment.account.


environmentNameRequired
public readonly environmentName: string;
  • Type: string

The proper name of the environment.


shardsRequired
public readonly shards: IShard[];

Enumerates all existing shards grouped in the NamedEnv.


NamedEnvFactoryProps

Used by newNamedEnvFactory.

Is it used elsewhere?

Initializer

import { NamedEnvFactoryProps } from '@time-loop/cdk-named-environments'

const namedEnvFactoryProps: NamedEnvFactoryProps = { ... }

Properties

Name Type Description
defaultRegion string If a region isn't specified, where should we default to.
name string The proper name of the environment.
organizationalUnit string What kind of an account is this?
zoneName string The DNS zone into which services should be deployed.
ssoRegion string In which region does SSO live in?
ssoStartUrl string Is this an SSO accessible account?
account string The numeric account id as used by cdk.Environment.account.
shards IShard[] Enumerates all existing shards grouped in the NamedEnv.

defaultRegionRequired
public readonly defaultRegion: string;
  • Type: string

If a region isn't specified, where should we default to.

Also considered for centralized resources.


nameRequired
public readonly name: string;
  • Type: string

The proper name of the environment.


organizationalUnitRequired
public readonly organizationalUnit: string;
  • Type: string

What kind of an account is this?


zoneNameRequired
public readonly zoneName: string;
  • Type: string

The DNS zone into which services should be deployed.


ssoRegionOptional
public readonly ssoRegion: string;
  • Type: string

In which region does SSO live in?


ssoStartUrlOptional
public readonly ssoStartUrl: string;
  • Type: string

Is this an SSO accessible account?

If so, what's the start url?


accountRequired
public readonly account: string;
  • Type: string

The numeric account id as used by cdk.Environment.account.


shardsRequired
public readonly shards: IShard[];

Enumerates all existing shards grouped in the NamedEnv.


Classes

Shard

Initializers

import { Shard } from '@time-loop/cdk-named-environments'

new Shard(props: IShardProps)
Name Type Description
props IShardProps No description.

propsRequired

Properties

Name Type Description
cidr string The CIDR block for a shard.
name string There are numerous different ways to name a shard.
number number The shard-number within the region.
region string The AWS region for a shard.
identifier string The shard-identifier.

cidrRequired
public readonly cidr: string;
  • Type: string

The CIDR block for a shard.


nameRequired
public readonly name: string;
  • Type: string

There are numerous different ways to name a shard.

Pick one and stick with it.


numberRequired
public readonly number: number;
  • Type: number

The shard-number within the region.


regionRequired
public readonly region: string;
  • Type: string

The AWS region for a shard.


identifierOptional
public readonly identifier: string;
  • Type: string

The shard-identifier.


Protocols

IShard

Properties

Name Type Description
cidr string The CIDR block for a shard.
number number The shard-number within the region.
region string The AWS region for a shard.
identifier string The shard-identifier.
name string The proper name for a shard (without numeric suffix).

cidrRequired
public readonly cidr: string;
  • Type: string

The CIDR block for a shard.


numberRequired
public readonly number: number;
  • Type: number

The shard-number within the region.


regionRequired
public readonly region: string;
  • Type: string

The AWS region for a shard.


identifierOptional
public readonly identifier: string;
  • Type: string

The shard-identifier.


nameRequired
public readonly name: string;
  • Type: string

The proper name for a shard (without numeric suffix).


IShardProps

Properties

Name Type Description
cidr string The CIDR block for a shard.
number number The shard-number within the region.
region string The AWS region for a shard.
identifier string The shard-identifier.

cidrRequired
public readonly cidr: string;
  • Type: string

The CIDR block for a shard.


numberRequired
public readonly number: number;
  • Type: number

The shard-number within the region.


regionRequired
public readonly region: string;
  • Type: string

The AWS region for a shard.


identifierOptional
public readonly identifier: string;
  • Type: string

The shard-identifier.