Documentation ¶
Index ¶
- func CfnApp_CFN_RESOURCE_TYPE_NAME() *string
- func CfnApp_IsCfnElement(x interface{}) *bool
- func CfnApp_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnApp_IsConstruct(x interface{}) *bool
- func CfnBranch_CFN_RESOURCE_TYPE_NAME() *string
- func CfnBranch_IsCfnElement(x interface{}) *bool
- func CfnBranch_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnBranch_IsConstruct(x interface{}) *bool
- func CfnDomain_CFN_RESOURCE_TYPE_NAME() *string
- func CfnDomain_IsCfnElement(x interface{}) *bool
- func CfnDomain_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnDomain_IsConstruct(x interface{}) *bool
- func NewCfnApp_Override(c CfnApp, scope constructs.Construct, id *string, props *CfnAppProps)
- func NewCfnBranch_Override(c CfnBranch, scope constructs.Construct, id *string, props *CfnBranchProps)
- func NewCfnDomain_Override(c CfnDomain, scope constructs.Construct, id *string, props *CfnDomainProps)
- type CfnApp
- type CfnAppProps
- type CfnApp_AutoBranchCreationConfigProperty
- type CfnApp_BasicAuthConfigProperty
- type CfnApp_CustomRuleProperty
- type CfnApp_EnvironmentVariableProperty
- type CfnBranch
- type CfnBranchProps
- type CfnBranch_BasicAuthConfigProperty
- type CfnBranch_EnvironmentVariableProperty
- type CfnDomain
- type CfnDomainProps
- type CfnDomain_SubDomainSettingProperty
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CfnApp_CFN_RESOURCE_TYPE_NAME ¶
func CfnApp_CFN_RESOURCE_TYPE_NAME() *string
func CfnApp_IsCfnElement ¶
func CfnApp_IsCfnElement(x interface{}) *bool
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.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnApp_IsCfnResource ¶
func CfnApp_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnApp_IsConstruct ¶
func CfnApp_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnBranch_CFN_RESOURCE_TYPE_NAME ¶
func CfnBranch_CFN_RESOURCE_TYPE_NAME() *string
func CfnBranch_IsCfnElement ¶
func CfnBranch_IsCfnElement(x interface{}) *bool
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.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnBranch_IsCfnResource ¶
func CfnBranch_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnBranch_IsConstruct ¶
func CfnBranch_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnDomain_CFN_RESOURCE_TYPE_NAME ¶
func CfnDomain_CFN_RESOURCE_TYPE_NAME() *string
func CfnDomain_IsCfnElement ¶
func CfnDomain_IsCfnElement(x interface{}) *bool
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.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnDomain_IsCfnResource ¶
func CfnDomain_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnDomain_IsConstruct ¶
func CfnDomain_IsConstruct(x interface{}) *bool
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.
Returns: true if `x` is an object created from a class which extends `Construct`.
func NewCfnApp_Override ¶
func NewCfnApp_Override(c CfnApp, scope constructs.Construct, id *string, props *CfnAppProps)
Create a new `AWS::Amplify::App`.
func NewCfnBranch_Override ¶
func NewCfnBranch_Override(c CfnBranch, scope constructs.Construct, id *string, props *CfnBranchProps)
Create a new `AWS::Amplify::Branch`.
func NewCfnDomain_Override ¶
func NewCfnDomain_Override(c CfnDomain, scope constructs.Construct, id *string, props *CfnDomainProps)
Create a new `AWS::Amplify::Domain`.
Types ¶
type CfnApp ¶
type CfnApp interface { awscdk.CfnResource awscdk.IInspectable // The personal access token for a GitHub repository for an Amplify app. // // The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored. // // Use `AccessToken` for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use `OauthToken` . // // You must specify either `AccessToken` or `OauthToken` when you create a new app. // // Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see [Migrating an existing OAuth app to the Amplify GitHub App](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* . // // *Length Constraints:* Minimum length of 1. Maximum length of 255. AccessToken() *string SetAccessToken(val *string) // Unique Id for the Amplify App. AttrAppId() *string // Name for the Amplify App. AttrAppName() *string // ARN for the Amplify App. AttrArn() *string // Default domain for the Amplify App. AttrDefaultDomain() *string // Sets the configuration for your automatic branch creation. AutoBranchCreationConfig() interface{} SetAutoBranchCreationConfig(val interface{}) // The credentials for basic authorization for an Amplify app. // // You must base64-encode the authorization credentials and provide them in the format `user:password` . BasicAuthConfig() interface{} SetBasicAuthConfig(val interface{}) // The build specification (build spec) for an Amplify app. // // *Length Constraints:* Minimum length of 1. Maximum length of 25000. // // *Pattern:* (?s).+ BuildSpec() *string SetBuildSpec(val *string) // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: 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. CreationStack() *[]*string // The custom HTTP headers for an Amplify app. // // *Length Constraints:* Minimum length of 0. Maximum length of 25000. // // *Pattern:* (?s).* CustomHeaders() *string SetCustomHeaders(val *string) // The custom rewrite and redirect rules for an Amplify app. CustomRules() interface{} SetCustomRules(val interface{}) // The description for an Amplify app. // // *Length Constraints:* Maximum length of 1000. // // *Pattern:* (?s).* Description() *string SetDescription(val *string) // Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository. EnableBranchAutoDeletion() interface{} SetEnableBranchAutoDeletion(val interface{}) // The environment variables map for an Amplify app. EnvironmentVariables() interface{} SetEnvironmentVariables(val interface{}) // The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app. // // *Length Constraints:* Minimum length of 0. Maximum length of 1000. // // *Pattern:* (?s).* IamServiceRole() *string SetIamServiceRole(val *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)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The name for an Amplify app. // // *Length Constraints:* Minimum length of 1. Maximum length of 255. // // *Pattern:* (?s).+ Name() *string SetName(val *string) // The tree node. Node() constructs.Node // The OAuth token for a third-party source control system for an Amplify app. // // The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored. // // Use `OauthToken` for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use `AccessToken` . // // You must specify either `OauthToken` or `AccessToken` when you create a new app. // // Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see [Migrating an existing OAuth app to the Amplify GitHub App](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* . // // *Length Constraints:* Maximum length of 1000. // // *Pattern:* (?s).* OauthToken() *string SetOauthToken(val *string) // The platform for the Amplify app. // // For a static app, set the platform type to `WEB` . For a dynamic server-side rendered (SSR) app, set the platform type to `WEB_COMPUTE` . For an app requiring Amplify Hosting's original SSR support only, set the platform type to `WEB_DYNAMIC` . Platform() *string SetPlatform(val *string) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The repository for an Amplify app. // // *Pattern:* (?s).* Repository() *string SetRepository(val *string) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // The tag for an Amplify app. Tags() awscdk.TagManager // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Amplify::App`.
The AWS::Amplify::App resource specifies Apps in Amplify Hosting. An App is a collection of branches.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnApp := awscdk.Aws_amplify.NewCfnApp(this, jsii.String("MyCfnApp"), &cfnAppProps{ name: jsii.String("name"), // the properties below are optional accessToken: jsii.String("accessToken"), autoBranchCreationConfig: &autoBranchCreationConfigProperty{ autoBranchCreationPatterns: []*string{ jsii.String("autoBranchCreationPatterns"), }, basicAuthConfig: &basicAuthConfigProperty{ enableBasicAuth: jsii.Boolean(false), password: jsii.String("password"), username: jsii.String("username"), }, buildSpec: jsii.String("buildSpec"), enableAutoBranchCreation: jsii.Boolean(false), enableAutoBuild: jsii.Boolean(false), enablePerformanceMode: jsii.Boolean(false), enablePullRequestPreview: jsii.Boolean(false), environmentVariables: []interface{}{ &environmentVariableProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, framework: jsii.String("framework"), pullRequestEnvironmentName: jsii.String("pullRequestEnvironmentName"), stage: jsii.String("stage"), }, basicAuthConfig: &basicAuthConfigProperty{ enableBasicAuth: jsii.Boolean(false), password: jsii.String("password"), username: jsii.String("username"), }, buildSpec: jsii.String("buildSpec"), customHeaders: jsii.String("customHeaders"), customRules: []interface{}{ &customRuleProperty{ source: jsii.String("source"), target: jsii.String("target"), // the properties below are optional condition: jsii.String("condition"), status: jsii.String("status"), }, }, description: jsii.String("description"), enableBranchAutoDeletion: jsii.Boolean(false), environmentVariables: []interface{}{ &environmentVariableProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, iamServiceRole: jsii.String("iamServiceRole"), oauthToken: jsii.String("oauthToken"), platform: jsii.String("platform"), repository: jsii.String("repository"), tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, })
func NewCfnApp ¶
func NewCfnApp(scope constructs.Construct, id *string, props *CfnAppProps) CfnApp
Create a new `AWS::Amplify::App`.
type CfnAppProps ¶
type CfnAppProps struct { // The name for an Amplify app. // // *Length Constraints:* Minimum length of 1. Maximum length of 255. // // *Pattern:* (?s).+ Name *string `field:"required" json:"name" yaml:"name"` // The personal access token for a GitHub repository for an Amplify app. // // The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored. // // Use `AccessToken` for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use `OauthToken` . // // You must specify either `AccessToken` or `OauthToken` when you create a new app. // // Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see [Migrating an existing OAuth app to the Amplify GitHub App](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* . // // *Length Constraints:* Minimum length of 1. Maximum length of 255. AccessToken *string `field:"optional" json:"accessToken" yaml:"accessToken"` // Sets the configuration for your automatic branch creation. AutoBranchCreationConfig interface{} `field:"optional" json:"autoBranchCreationConfig" yaml:"autoBranchCreationConfig"` // The credentials for basic authorization for an Amplify app. // // You must base64-encode the authorization credentials and provide them in the format `user:password` . BasicAuthConfig interface{} `field:"optional" json:"basicAuthConfig" yaml:"basicAuthConfig"` // The build specification (build spec) for an Amplify app. // // *Length Constraints:* Minimum length of 1. Maximum length of 25000. // // *Pattern:* (?s).+ BuildSpec *string `field:"optional" json:"buildSpec" yaml:"buildSpec"` // The custom HTTP headers for an Amplify app. // // *Length Constraints:* Minimum length of 0. Maximum length of 25000. // // *Pattern:* (?s).* CustomHeaders *string `field:"optional" json:"customHeaders" yaml:"customHeaders"` // The custom rewrite and redirect rules for an Amplify app. CustomRules interface{} `field:"optional" json:"customRules" yaml:"customRules"` // The description for an Amplify app. // // *Length Constraints:* Maximum length of 1000. // // *Pattern:* (?s).* Description *string `field:"optional" json:"description" yaml:"description"` // Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository. EnableBranchAutoDeletion interface{} `field:"optional" json:"enableBranchAutoDeletion" yaml:"enableBranchAutoDeletion"` // The environment variables map for an Amplify app. EnvironmentVariables interface{} `field:"optional" json:"environmentVariables" yaml:"environmentVariables"` // The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app. // // *Length Constraints:* Minimum length of 0. Maximum length of 1000. // // *Pattern:* (?s).* IamServiceRole *string `field:"optional" json:"iamServiceRole" yaml:"iamServiceRole"` // The OAuth token for a third-party source control system for an Amplify app. // // The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored. // // Use `OauthToken` for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use `AccessToken` . // // You must specify either `OauthToken` or `AccessToken` when you create a new app. // // Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see [Migrating an existing OAuth app to the Amplify GitHub App](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* . // // *Length Constraints:* Maximum length of 1000. // // *Pattern:* (?s).* OauthToken *string `field:"optional" json:"oauthToken" yaml:"oauthToken"` // The platform for the Amplify app. // // For a static app, set the platform type to `WEB` . For a dynamic server-side rendered (SSR) app, set the platform type to `WEB_COMPUTE` . For an app requiring Amplify Hosting's original SSR support only, set the platform type to `WEB_DYNAMIC` . Platform *string `field:"optional" json:"platform" yaml:"platform"` // The repository for an Amplify app. // // *Pattern:* (?s).* Repository *string `field:"optional" json:"repository" yaml:"repository"` // The tag for an Amplify app. Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnApp`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnAppProps := &cfnAppProps{ name: jsii.String("name"), // the properties below are optional accessToken: jsii.String("accessToken"), autoBranchCreationConfig: &autoBranchCreationConfigProperty{ autoBranchCreationPatterns: []*string{ jsii.String("autoBranchCreationPatterns"), }, basicAuthConfig: &basicAuthConfigProperty{ enableBasicAuth: jsii.Boolean(false), password: jsii.String("password"), username: jsii.String("username"), }, buildSpec: jsii.String("buildSpec"), enableAutoBranchCreation: jsii.Boolean(false), enableAutoBuild: jsii.Boolean(false), enablePerformanceMode: jsii.Boolean(false), enablePullRequestPreview: jsii.Boolean(false), environmentVariables: []interface{}{ &environmentVariableProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, framework: jsii.String("framework"), pullRequestEnvironmentName: jsii.String("pullRequestEnvironmentName"), stage: jsii.String("stage"), }, basicAuthConfig: &basicAuthConfigProperty{ enableBasicAuth: jsii.Boolean(false), password: jsii.String("password"), username: jsii.String("username"), }, buildSpec: jsii.String("buildSpec"), customHeaders: jsii.String("customHeaders"), customRules: []interface{}{ &customRuleProperty{ source: jsii.String("source"), target: jsii.String("target"), // the properties below are optional condition: jsii.String("condition"), status: jsii.String("status"), }, }, description: jsii.String("description"), enableBranchAutoDeletion: jsii.Boolean(false), environmentVariables: []interface{}{ &environmentVariableProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, iamServiceRole: jsii.String("iamServiceRole"), oauthToken: jsii.String("oauthToken"), platform: jsii.String("platform"), repository: jsii.String("repository"), tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, }
type CfnApp_AutoBranchCreationConfigProperty ¶
type CfnApp_AutoBranchCreationConfigProperty struct { // Automated branch creation glob patterns for the Amplify app. AutoBranchCreationPatterns *[]*string `field:"optional" json:"autoBranchCreationPatterns" yaml:"autoBranchCreationPatterns"` // Sets password protection for your auto created branch. BasicAuthConfig interface{} `field:"optional" json:"basicAuthConfig" yaml:"basicAuthConfig"` // The build specification (build spec) for the autocreated branch. // // *Length Constraints:* Minimum length of 1. Maximum length of 25000. BuildSpec *string `field:"optional" json:"buildSpec" yaml:"buildSpec"` // Enables automated branch creation for the Amplify app. EnableAutoBranchCreation interface{} `field:"optional" json:"enableAutoBranchCreation" yaml:"enableAutoBranchCreation"` // Enables auto building for the auto created branch. EnableAutoBuild interface{} `field:"optional" json:"enableAutoBuild" yaml:"enableAutoBuild"` // Enables performance mode for the branch. // // Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out. EnablePerformanceMode interface{} `field:"optional" json:"enablePerformanceMode" yaml:"enablePerformanceMode"` // Sets whether pull request previews are enabled for each branch that Amplify Hosting automatically creates for your app. // // Amplify creates previews by deploying your app to a unique URL whenever a pull request is opened for the branch. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch. // // To provide backend support for your preview, Amplify Hosting automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the `PullRequestEnvironmentName` property. // // For more information, see [Web Previews](https://docs.aws.amazon.com/amplify/latest/userguide/pr-previews.html) in the *AWS Amplify Hosting User Guide* . EnablePullRequestPreview interface{} `field:"optional" json:"enablePullRequestPreview" yaml:"enablePullRequestPreview"` // Environment variables for the auto created branch. EnvironmentVariables interface{} `field:"optional" json:"environmentVariables" yaml:"environmentVariables"` // The framework for the autocreated branch. Framework *string `field:"optional" json:"framework" yaml:"framework"` // If pull request previews are enabled, you can use this property to specify a dedicated backend environment for your previews. // // For example, you could specify an environment named `prod` , `test` , or `dev` that you initialized with the Amplify CLI. // // To enable pull request previews, set the `EnablePullRequestPreview` property to `true` . // // If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify deletes this environment when the pull request is closed. // // For more information about creating backend environments, see [Feature Branch Deployments and Team Workflows](https://docs.aws.amazon.com/amplify/latest/userguide/multi-environments.html) in the *AWS Amplify Hosting User Guide* . // // *Length Constraints:* Maximum length of 20. // // *Pattern:* (?s).* PullRequestEnvironmentName *string `field:"optional" json:"pullRequestEnvironmentName" yaml:"pullRequestEnvironmentName"` // Stage for the auto created branch. Stage *string `field:"optional" json:"stage" yaml:"stage"` }
Use the AutoBranchCreationConfig property type to automatically create branches that match a certain pattern.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" autoBranchCreationConfigProperty := &autoBranchCreationConfigProperty{ autoBranchCreationPatterns: []*string{ jsii.String("autoBranchCreationPatterns"), }, basicAuthConfig: &basicAuthConfigProperty{ enableBasicAuth: jsii.Boolean(false), password: jsii.String("password"), username: jsii.String("username"), }, buildSpec: jsii.String("buildSpec"), enableAutoBranchCreation: jsii.Boolean(false), enableAutoBuild: jsii.Boolean(false), enablePerformanceMode: jsii.Boolean(false), enablePullRequestPreview: jsii.Boolean(false), environmentVariables: []interface{}{ &environmentVariableProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, framework: jsii.String("framework"), pullRequestEnvironmentName: jsii.String("pullRequestEnvironmentName"), stage: jsii.String("stage"), }
type CfnApp_BasicAuthConfigProperty ¶
type CfnApp_BasicAuthConfigProperty struct { // Enables basic authorization for the Amplify app's branches. EnableBasicAuth interface{} `field:"optional" json:"enableBasicAuth" yaml:"enableBasicAuth"` // The password for basic authorization. // // *Length Constraints:* Minimum length of 1. Maximum length of 255. Password *string `field:"optional" json:"password" yaml:"password"` // The user name for basic authorization. // // *Length Constraints:* Minimum length of 1. Maximum length of 255. Username *string `field:"optional" json:"username" yaml:"username"` }
Use the BasicAuthConfig property type to set password protection at an app level to all your branches.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" basicAuthConfigProperty := &basicAuthConfigProperty{ enableBasicAuth: jsii.Boolean(false), password: jsii.String("password"), username: jsii.String("username"), }
type CfnApp_CustomRuleProperty ¶
type CfnApp_CustomRuleProperty struct { // The source pattern for a URL rewrite or redirect rule. // // *Length Constraints:* Minimum length of 1. Maximum length of 2048. // // *Pattern:* (?s).+ Source *string `field:"required" json:"source" yaml:"source"` // The target pattern for a URL rewrite or redirect rule. // // *Length Constraints:* Minimum length of 1. Maximum length of 2048. // // *Pattern:* (?s).+ Target *string `field:"required" json:"target" yaml:"target"` // The condition for a URL rewrite or redirect rule, such as a country code. // // *Length Constraints:* Minimum length of 0. Maximum length of 2048. // // *Pattern:* (?s).* Condition *string `field:"optional" json:"condition" yaml:"condition"` // The status code for a URL rewrite or redirect rule. // // - **200** - Represents a 200 rewrite rule. // - **301** - Represents a 301 (moved pemanently) redirect rule. This and all future requests should be directed to the target URL. // - **302** - Represents a 302 temporary redirect rule. // - **404** - Represents a 404 redirect rule. // - **404-200** - Represents a 404 rewrite rule. // // *Length Constraints:* Minimum length of 3. Maximum length of 7. // // *Pattern:* .{3,7} Status *string `field:"optional" json:"status" yaml:"status"` }
The CustomRule property type allows you to specify redirects, rewrites, and reverse proxies.
Redirects enable a web app to reroute navigation from one URL to another.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" customRuleProperty := &customRuleProperty{ source: jsii.String("source"), target: jsii.String("target"), // the properties below are optional condition: jsii.String("condition"), status: jsii.String("status"), }
type CfnApp_EnvironmentVariableProperty ¶
type CfnApp_EnvironmentVariableProperty struct { // The environment variable name. // // *Length Constraints:* Maximum length of 255. // // *Pattern:* (?s).* Name *string `field:"required" json:"name" yaml:"name"` // The environment variable value. // // *Length Constraints:* Maximum length of 5500. // // *Pattern:* (?s).* Value *string `field:"required" json:"value" yaml:"value"` }
Environment variables are key-value pairs that are available at build time.
Set environment variables for all branches in your app.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" environmentVariableProperty := &environmentVariableProperty{ name: jsii.String("name"), value: jsii.String("value"), }
type CfnBranch ¶
type CfnBranch interface { awscdk.CfnResource awscdk.IInspectable // The unique ID for an Amplify app. // // *Length Constraints:* Minimum length of 1. Maximum length of 20. // // *Pattern:* d[a-z0-9]+. AppId() *string SetAppId(val *string) // ARN for a branch, part of an Amplify App. AttrArn() *string // Name for a branch, part of an Amplify App. AttrBranchName() *string // The basic authorization credentials for a branch of an Amplify app. // // You must base64-encode the authorization credentials and provide them in the format `user:password` . BasicAuthConfig() interface{} SetBasicAuthConfig(val interface{}) // The name for the branch. // // *Length Constraints:* Minimum length of 1. Maximum length of 255. // // *Pattern:* (?s).+ BranchName() *string SetBranchName(val *string) // The build specification (build spec) for the branch. // // *Length Constraints:* Minimum length of 1. Maximum length of 25000. // // *Pattern:* (?s).+ BuildSpec() *string SetBuildSpec(val *string) // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: 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. CreationStack() *[]*string // The description for the branch that is part of an Amplify app. // // *Length Constraints:* Maximum length of 1000. // // *Pattern:* (?s).* Description() *string SetDescription(val *string) // Enables auto building for the branch. EnableAutoBuild() interface{} SetEnableAutoBuild(val interface{}) // Enables performance mode for the branch. // // Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out. EnablePerformanceMode() interface{} SetEnablePerformanceMode(val interface{}) // Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. // // If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch. // // To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the `PullRequestEnvironmentName` property. // // For more information, see [Web Previews](https://docs.aws.amazon.com/amplify/latest/userguide/pr-previews.html) in the *AWS Amplify Hosting User Guide* . EnablePullRequestPreview() interface{} SetEnablePullRequestPreview(val interface{}) // The environment variables for the branch. EnvironmentVariables() interface{} SetEnvironmentVariables(val interface{}) // The framework for the branch. Framework() *string SetFramework(val *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)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The tree node. Node() constructs.Node // If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. // // For example, you could specify an environment named `prod` , `test` , or `dev` that you initialized with the Amplify CLI and mapped to this branch. // // To enable pull request previews, set the `EnablePullRequestPreview` property to `true` . // // If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed. // // For more information about creating backend environments, see [Feature Branch Deployments and Team Workflows](https://docs.aws.amazon.com/amplify/latest/userguide/multi-environments.html) in the *AWS Amplify Hosting User Guide* . // // *Length Constraints:* Maximum length of 20. // // *Pattern:* (?s).* PullRequestEnvironmentName() *string SetPullRequestEnvironmentName(val *string) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Describes the current stage for the branch. // // *Valid Values:* PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST. Stage() *string SetStage(val *string) // The tag for the branch. Tags() awscdk.TagManager // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Amplify::Branch`.
The AWS::Amplify::Branch resource specifies a new branch within an app.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnBranch := awscdk.Aws_amplify.NewCfnBranch(this, jsii.String("MyCfnBranch"), &cfnBranchProps{ appId: jsii.String("appId"), branchName: jsii.String("branchName"), // the properties below are optional basicAuthConfig: &basicAuthConfigProperty{ password: jsii.String("password"), username: jsii.String("username"), // the properties below are optional enableBasicAuth: jsii.Boolean(false), }, buildSpec: jsii.String("buildSpec"), description: jsii.String("description"), enableAutoBuild: jsii.Boolean(false), enablePerformanceMode: jsii.Boolean(false), enablePullRequestPreview: jsii.Boolean(false), environmentVariables: []interface{}{ &environmentVariableProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, framework: jsii.String("framework"), pullRequestEnvironmentName: jsii.String("pullRequestEnvironmentName"), stage: jsii.String("stage"), tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, })
func NewCfnBranch ¶
func NewCfnBranch(scope constructs.Construct, id *string, props *CfnBranchProps) CfnBranch
Create a new `AWS::Amplify::Branch`.
type CfnBranchProps ¶
type CfnBranchProps struct { // The unique ID for an Amplify app. // // *Length Constraints:* Minimum length of 1. Maximum length of 20. // // *Pattern:* d[a-z0-9]+. AppId *string `field:"required" json:"appId" yaml:"appId"` // The name for the branch. // // *Length Constraints:* Minimum length of 1. Maximum length of 255. // // *Pattern:* (?s).+ BranchName *string `field:"required" json:"branchName" yaml:"branchName"` // The basic authorization credentials for a branch of an Amplify app. // // You must base64-encode the authorization credentials and provide them in the format `user:password` . BasicAuthConfig interface{} `field:"optional" json:"basicAuthConfig" yaml:"basicAuthConfig"` // The build specification (build spec) for the branch. // // *Length Constraints:* Minimum length of 1. Maximum length of 25000. // // *Pattern:* (?s).+ BuildSpec *string `field:"optional" json:"buildSpec" yaml:"buildSpec"` // The description for the branch that is part of an Amplify app. // // *Length Constraints:* Maximum length of 1000. // // *Pattern:* (?s).* Description *string `field:"optional" json:"description" yaml:"description"` // Enables auto building for the branch. EnableAutoBuild interface{} `field:"optional" json:"enableAutoBuild" yaml:"enableAutoBuild"` // Enables performance mode for the branch. // // Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out. EnablePerformanceMode interface{} `field:"optional" json:"enablePerformanceMode" yaml:"enablePerformanceMode"` // Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. // // If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch. // // To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the `PullRequestEnvironmentName` property. // // For more information, see [Web Previews](https://docs.aws.amazon.com/amplify/latest/userguide/pr-previews.html) in the *AWS Amplify Hosting User Guide* . EnablePullRequestPreview interface{} `field:"optional" json:"enablePullRequestPreview" yaml:"enablePullRequestPreview"` // The environment variables for the branch. EnvironmentVariables interface{} `field:"optional" json:"environmentVariables" yaml:"environmentVariables"` // The framework for the branch. Framework *string `field:"optional" json:"framework" yaml:"framework"` // If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. // // For example, you could specify an environment named `prod` , `test` , or `dev` that you initialized with the Amplify CLI and mapped to this branch. // // To enable pull request previews, set the `EnablePullRequestPreview` property to `true` . // // If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed. // // For more information about creating backend environments, see [Feature Branch Deployments and Team Workflows](https://docs.aws.amazon.com/amplify/latest/userguide/multi-environments.html) in the *AWS Amplify Hosting User Guide* . // // *Length Constraints:* Maximum length of 20. // // *Pattern:* (?s).* PullRequestEnvironmentName *string `field:"optional" json:"pullRequestEnvironmentName" yaml:"pullRequestEnvironmentName"` // Describes the current stage for the branch. // // *Valid Values:* PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST. Stage *string `field:"optional" json:"stage" yaml:"stage"` // The tag for the branch. Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnBranch`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnBranchProps := &cfnBranchProps{ appId: jsii.String("appId"), branchName: jsii.String("branchName"), // the properties below are optional basicAuthConfig: &basicAuthConfigProperty{ password: jsii.String("password"), username: jsii.String("username"), // the properties below are optional enableBasicAuth: jsii.Boolean(false), }, buildSpec: jsii.String("buildSpec"), description: jsii.String("description"), enableAutoBuild: jsii.Boolean(false), enablePerformanceMode: jsii.Boolean(false), enablePullRequestPreview: jsii.Boolean(false), environmentVariables: []interface{}{ &environmentVariableProperty{ name: jsii.String("name"), value: jsii.String("value"), }, }, framework: jsii.String("framework"), pullRequestEnvironmentName: jsii.String("pullRequestEnvironmentName"), stage: jsii.String("stage"), tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, }
type CfnBranch_BasicAuthConfigProperty ¶
type CfnBranch_BasicAuthConfigProperty struct { // The password for basic authorization. // // *Length Constraints:* Minimum length of 1. Maximum length of 255. Password *string `field:"required" json:"password" yaml:"password"` // The user name for basic authorization. // // *Length Constraints:* Minimum length of 1. Maximum length of 255. Username *string `field:"required" json:"username" yaml:"username"` // Enables basic authorization for the branch. EnableBasicAuth interface{} `field:"optional" json:"enableBasicAuth" yaml:"enableBasicAuth"` }
Use the BasicAuthConfig property type to set password protection for a specific branch.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" basicAuthConfigProperty := &basicAuthConfigProperty{ password: jsii.String("password"), username: jsii.String("username"), // the properties below are optional enableBasicAuth: jsii.Boolean(false), }
type CfnBranch_EnvironmentVariableProperty ¶
type CfnBranch_EnvironmentVariableProperty struct { // The environment variable name. // // *Length Constraints:* Maximum length of 255. // // *Pattern:* (?s).* Name *string `field:"required" json:"name" yaml:"name"` // The environment variable value. // // *Length Constraints:* Maximum length of 5500. // // *Pattern:* (?s).* Value *string `field:"required" json:"value" yaml:"value"` }
The EnvironmentVariable property type sets environment variables for a specific branch.
Environment variables are key-value pairs that are available at build time.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" environmentVariableProperty := &environmentVariableProperty{ name: jsii.String("name"), value: jsii.String("value"), }
type CfnDomain ¶
type CfnDomain interface { awscdk.CfnResource awscdk.IInspectable // The unique ID for an Amplify app. // // *Length Constraints:* Minimum length of 1. Maximum length of 20. // // *Pattern:* d[a-z0-9]+. AppId() *string SetAppId(val *string) // ARN for the Domain Association. AttrArn() *string // Branch patterns for the automatically created subdomain. AttrAutoSubDomainCreationPatterns() *[]*string // The IAM service role for the subdomain. AttrAutoSubDomainIamRole() *string // DNS Record for certificate verification. AttrCertificateRecord() *string // Name of the domain. AttrDomainName() *string // Status for the Domain Association. AttrDomainStatus() *string // Specifies whether the automated creation of subdomains for branches is enabled. AttrEnableAutoSubDomain() awscdk.IResolvable // Reason for the current status of the domain. AttrStatusReason() *string // Sets the branch patterns for automatic subdomain creation. AutoSubDomainCreationPatterns() *[]*string SetAutoSubDomainCreationPatterns(val *[]*string) // The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for automatically creating subdomains. // // *Length Constraints:* Maximum length of 1000. // // *Pattern:* ^$|^arn:aws:iam::\d{12}:role.+ AutoSubDomainIamRole() *string SetAutoSubDomainIamRole(val *string) // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: 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. CreationStack() *[]*string // The domain name for the domain association. // // *Length Constraints:* Maximum length of 255. // // *Pattern:* ^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])(\.)?$ DomainName() *string SetDomainName(val *string) // Enables the automated creation of subdomains for branches. EnableAutoSubDomain() interface{} SetEnableAutoSubDomain(val interface{}) // 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)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // The setting for the subdomain. SubDomainSettings() interface{} SetSubDomainSettings(val interface{}) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Amplify::Domain`.
The AWS::Amplify::Domain resource allows you to connect a custom domain to your app.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnDomain := awscdk.Aws_amplify.NewCfnDomain(this, jsii.String("MyCfnDomain"), &cfnDomainProps{ appId: jsii.String("appId"), domainName: jsii.String("domainName"), subDomainSettings: []interface{}{ &subDomainSettingProperty{ branchName: jsii.String("branchName"), prefix: jsii.String("prefix"), }, }, // the properties below are optional autoSubDomainCreationPatterns: []*string{ jsii.String("autoSubDomainCreationPatterns"), }, autoSubDomainIamRole: jsii.String("autoSubDomainIamRole"), enableAutoSubDomain: jsii.Boolean(false), })
func NewCfnDomain ¶
func NewCfnDomain(scope constructs.Construct, id *string, props *CfnDomainProps) CfnDomain
Create a new `AWS::Amplify::Domain`.
type CfnDomainProps ¶
type CfnDomainProps struct { // The unique ID for an Amplify app. // // *Length Constraints:* Minimum length of 1. Maximum length of 20. // // *Pattern:* d[a-z0-9]+. AppId *string `field:"required" json:"appId" yaml:"appId"` // The domain name for the domain association. // // *Length Constraints:* Maximum length of 255. // // *Pattern:* ^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])(\.)?$ DomainName *string `field:"required" json:"domainName" yaml:"domainName"` // The setting for the subdomain. SubDomainSettings interface{} `field:"required" json:"subDomainSettings" yaml:"subDomainSettings"` // Sets the branch patterns for automatic subdomain creation. AutoSubDomainCreationPatterns *[]*string `field:"optional" json:"autoSubDomainCreationPatterns" yaml:"autoSubDomainCreationPatterns"` // The required AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) for automatically creating subdomains. // // *Length Constraints:* Maximum length of 1000. // // *Pattern:* ^$|^arn:aws:iam::\d{12}:role.+ AutoSubDomainIamRole *string `field:"optional" json:"autoSubDomainIamRole" yaml:"autoSubDomainIamRole"` // Enables the automated creation of subdomains for branches. EnableAutoSubDomain interface{} `field:"optional" json:"enableAutoSubDomain" yaml:"enableAutoSubDomain"` }
Properties for defining a `CfnDomain`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnDomainProps := &cfnDomainProps{ appId: jsii.String("appId"), domainName: jsii.String("domainName"), subDomainSettings: []interface{}{ &subDomainSettingProperty{ branchName: jsii.String("branchName"), prefix: jsii.String("prefix"), }, }, // the properties below are optional autoSubDomainCreationPatterns: []*string{ jsii.String("autoSubDomainCreationPatterns"), }, autoSubDomainIamRole: jsii.String("autoSubDomainIamRole"), enableAutoSubDomain: jsii.Boolean(false), }
type CfnDomain_SubDomainSettingProperty ¶
type CfnDomain_SubDomainSettingProperty struct { // The branch name setting for the subdomain. // // *Length Constraints:* Minimum length of 1. Maximum length of 255. // // *Pattern:* (?s).+ BranchName *string `field:"required" json:"branchName" yaml:"branchName"` // The prefix setting for the subdomain. // // *Length Constraints:* Maximum length of 255. // // *Pattern:* (?s).* Prefix *string `field:"required" json:"prefix" yaml:"prefix"` }
The SubDomainSetting property type enables you to connect a subdomain (for example, example.exampledomain.com) to a specific branch.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" subDomainSettingProperty := &subDomainSettingProperty{ branchName: jsii.String("branchName"), prefix: jsii.String("prefix"), }
Source Files ¶
- awsamplify.go
- awsamplify_CfnApp.go
- awsamplify_CfnAppProps.go
- awsamplify_CfnApp_AutoBranchCreationConfigProperty.go
- awsamplify_CfnApp_BasicAuthConfigProperty.go
- awsamplify_CfnApp_CustomRuleProperty.go
- awsamplify_CfnApp_EnvironmentVariableProperty.go
- awsamplify_CfnApp__runtime_type_checks.go
- awsamplify_CfnBranch.go
- awsamplify_CfnBranchProps.go
- awsamplify_CfnBranch_BasicAuthConfigProperty.go
- awsamplify_CfnBranch_EnvironmentVariableProperty.go
- awsamplify_CfnBranch__runtime_type_checks.go
- awsamplify_CfnDomain.go
- awsamplify_CfnDomainProps.go
- awsamplify_CfnDomain_SubDomainSettingProperty.go
- awsamplify_CfnDomain__runtime_type_checks.go