CfnBranchPropsMixin

class aws_cdk.mixins_preview.aws_amplify.mixins.CfnBranchPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::Amplify::Branch resource specifies a new branch within an app.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html

CloudformationResource:

AWS::Amplify::Branch

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_amplify import mixins as amplify_mixins

cfn_branch_props_mixin = amplify_mixins.CfnBranchPropsMixin(amplify_mixins.CfnBranchMixinProps(
    app_id="appId",
    backend=amplify_mixins.CfnBranchPropsMixin.BackendProperty(
        stack_arn="stackArn"
    ),
    basic_auth_config=amplify_mixins.CfnBranchPropsMixin.BasicAuthConfigProperty(
        enable_basic_auth=False,
        password="password",
        username="username"
    ),
    branch_name="branchName",
    build_spec="buildSpec",
    compute_role_arn="computeRoleArn",
    description="description",
    enable_auto_build=False,
    enable_performance_mode=False,
    enable_pull_request_preview=False,
    enable_skew_protection=False,
    environment_variables=[amplify_mixins.CfnBranchPropsMixin.EnvironmentVariableProperty(
        name="name",
        value="value"
    )],
    framework="framework",
    pull_request_environment_name="pullRequestEnvironmentName",
    stage="stage",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Amplify::Branch.

Parameters:
  • props (Union[CfnBranchMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['appId', 'backend', 'basicAuthConfig', 'branchName', 'buildSpec', 'computeRoleArn', 'description', 'enableAutoBuild', 'enablePerformanceMode', 'enablePullRequestPreview', 'enableSkewProtection', 'environmentVariables', 'framework', 'pullRequestEnvironmentName', 'stage', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

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

Stability:

experimental

BackendProperty

class CfnBranchPropsMixin.BackendProperty(*, stack_arn=None)

Bases: object

Describes the backend associated with an Amplify Branch .

This property is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app’s backend infrastructure using Typescript code.

Parameters:

stack_arn (Optional[str]) – The Amazon Resource Name (ARN) for the CloudFormation stack.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-backend.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_amplify import mixins as amplify_mixins

backend_property = amplify_mixins.CfnBranchPropsMixin.BackendProperty(
    stack_arn="stackArn"
)

Attributes

stack_arn

The Amazon Resource Name (ARN) for the CloudFormation stack.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-backend.html#cfn-amplify-branch-backend-stackarn

BasicAuthConfigProperty

class CfnBranchPropsMixin.BasicAuthConfigProperty(*, enable_basic_auth=None, password=None, username=None)

Bases: object

Use the BasicAuthConfig property type to set password protection for a specific branch.

Parameters:
  • enable_basic_auth (Union[bool, IResolvable, None]) – Enables basic authorization for the branch.

  • password (Optional[str]) – The password for basic authorization.

  • username (Optional[str])

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_amplify import mixins as amplify_mixins

basic_auth_config_property = amplify_mixins.CfnBranchPropsMixin.BasicAuthConfigProperty(
    enable_basic_auth=False,
    password="password",
    username="username"
)

Attributes

enable_basic_auth

Enables basic authorization for the branch.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html#cfn-amplify-branch-basicauthconfig-enablebasicauth

password

The password for basic authorization.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html#cfn-amplify-branch-basicauthconfig-password

username

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html#cfn-amplify-branch-basicauthconfig-username

Type:

see

EnvironmentVariableProperty

class CfnBranchPropsMixin.EnvironmentVariableProperty(*, name=None, value=None)

Bases: object

The EnvironmentVariable property type sets environment variables for a specific branch.

Environment variables are key-value pairs that are available at build time.

Parameters:
  • name (Optional[str]) – The environment variable name.

  • value (Optional[str]) – The environment variable value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-environmentvariable.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_amplify import mixins as amplify_mixins

environment_variable_property = amplify_mixins.CfnBranchPropsMixin.EnvironmentVariableProperty(
    name="name",
    value="value"
)

Attributes

name

The environment variable name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-environmentvariable.html#cfn-amplify-branch-environmentvariable-name

value

The environment variable value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-environmentvariable.html#cfn-amplify-branch-environmentvariable-value