
software.amazon.awscdk.services.codepipeline.actions.CloudFormationDeployActionProps Maven / Gradle / Ivy
package software.amazon.awscdk.services.codepipeline.actions;
/**
* Properties common to CloudFormation actions that stage deployments.
*/
@javax.annotation.Generated(value = "jsii-pacmak/0.10.3 (build 6bbf743)", date = "2019-05-02T10:15:47.468Z")
public interface CloudFormationDeployActionProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.codepipeline.actions.CloudFormationActionProps {
/**
* Whether to grant full permissions to CloudFormation while deploying this template.
*
* Setting this to `true` affects the defaults for `role` and `capabilities`, if you
* don't specify any alternatives.
*
* The default role that will be created for you will have full (i.e., `*`)
* permissions on all resources, and the deployment will have named IAM
* capabilities (i.e., able to create all IAM resources).
*
* This is a shorthand that you can use if you fully trust the templates that
* are deployed in this pipeline. If you want more fine-grained permissions,
* use `addToRolePolicy` and `capabilities` to control what the CloudFormation
* deployment is allowed to do.
*/
java.lang.Boolean getAdminPermissions();
/**
* Acknowledge certain changes made as part of deployment.
*
* For stacks that contain certain resources, explicit acknowledgement that AWS CloudFormation
* might create or update those resources. For example, you must specify `AnonymousIAM` or `NamedIAM`
* if your stack template contains AWS Identity and Access Management (IAM) resources. For more
* information see the link below.
*
* Default: None, unless `adminPermissions` is true
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities
*/
software.amazon.awscdk.services.cloudformation.CloudFormationCapabilities getCapabilities();
/**
* IAM role to assume when deploying changes.
*
* If not specified, a fresh role is created. The role is created with zero
* permissions unless `adminPermissions` is true, in which case the role will have
* full permissions.
*
* Default: A fresh role with full or no permissions (depending on the value of `adminPermissions`).
*/
software.amazon.awscdk.services.iam.IRole getDeploymentRole();
/**
* The list of additional input Artifacts for this Action. This is especially useful when used in conjunction with the `parameterOverrides` property. For example, if you have:.
*
* parameterOverrides: {
* 'Param1': action1.outputArtifact.bucketName,
* 'Param2': action2.outputArtifact.objectKey,
* }
*
* , if the output Artifacts of `action1` and `action2` were not used to
* set either the `templateConfiguration` or the `templatePath` properties,
* you need to make sure to include them in the `extraInputs` -
* otherwise, you'll get an "unrecognized Artifact" error during your Pipeline's execution.
*/
java.util.List getExtraInputs();
/**
* Additional template parameters.
*
* Template parameters specified here take precedence over template parameters
* found in the artifact specified by the `templateConfiguration` property.
*
* We recommend that you use the template configuration file to specify
* most of your parameter values. Use parameter overrides to specify only
* dynamic parameter values (values that are unknown until you run the
* pipeline).
*
* All parameter names must be present in the stack template.
*
* Note: the entire object cannot be more than 1kB.
*
* Default: No overrides
*/
java.util.Map getParameterOverrides();
/**
* Input artifact to use for template parameters values and stack policy.
*
* The template configuration file should contain a JSON object that should look like this:
* `{ "Parameters": {...}, "Tags": {...}, "StackPolicy": {... }}`. For more information,
* see [AWS CloudFormation Artifacts](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-cfn-artifacts.html).
*
* Note that if you include sensitive information, such as passwords, restrict access to this
* file.
*
* Default: No template configuration based on input artifacts
*/
software.amazon.awscdk.services.codepipeline.ArtifactPath getTemplateConfiguration();
/**
* @return a {@link Builder} of {@link CloudFormationDeployActionProps}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CloudFormationDeployActionProps}
*/
final class Builder {
private java.lang.Boolean _adminPermissions;
@javax.annotation.Nullable
private software.amazon.awscdk.services.cloudformation.CloudFormationCapabilities _capabilities;
@javax.annotation.Nullable
private software.amazon.awscdk.services.iam.IRole _deploymentRole;
@javax.annotation.Nullable
private java.util.List _extraInputs;
@javax.annotation.Nullable
private java.util.Map _parameterOverrides;
@javax.annotation.Nullable
private software.amazon.awscdk.services.codepipeline.ArtifactPath _templateConfiguration;
private java.lang.String _stackName;
@javax.annotation.Nullable
private software.amazon.awscdk.services.codepipeline.Artifact _output;
@javax.annotation.Nullable
private java.lang.String _outputFileName;
@javax.annotation.Nullable
private java.lang.String _region;
@javax.annotation.Nullable
private software.amazon.awscdk.services.iam.IRole _role;
private java.lang.String _actionName;
@javax.annotation.Nullable
private java.lang.Number _runOrder;
/**
* Sets the value of AdminPermissions
* @param value Whether to grant full permissions to CloudFormation while deploying this template.
* @return {@code this}
*/
public Builder withAdminPermissions(final java.lang.Boolean value) {
this._adminPermissions = java.util.Objects.requireNonNull(value, "adminPermissions is required");
return this;
}
/**
* Sets the value of Capabilities
* @param value Acknowledge certain changes made as part of deployment.
* @return {@code this}
*/
public Builder withCapabilities(@javax.annotation.Nullable final software.amazon.awscdk.services.cloudformation.CloudFormationCapabilities value) {
this._capabilities = value;
return this;
}
/**
* Sets the value of DeploymentRole
* @param value IAM role to assume when deploying changes.
* @return {@code this}
*/
public Builder withDeploymentRole(@javax.annotation.Nullable final software.amazon.awscdk.services.iam.IRole value) {
this._deploymentRole = value;
return this;
}
/**
* Sets the value of ExtraInputs
* @param value The list of additional input Artifacts for this Action. This is especially useful when used in conjunction with the `parameterOverrides` property. For example, if you have:.
* @return {@code this}
*/
public Builder withExtraInputs(@javax.annotation.Nullable final java.util.List value) {
this._extraInputs = value;
return this;
}
/**
* Sets the value of ParameterOverrides
* @param value Additional template parameters.
* @return {@code this}
*/
public Builder withParameterOverrides(@javax.annotation.Nullable final java.util.Map value) {
this._parameterOverrides = value;
return this;
}
/**
* Sets the value of TemplateConfiguration
* @param value Input artifact to use for template parameters values and stack policy.
* @return {@code this}
*/
public Builder withTemplateConfiguration(@javax.annotation.Nullable final software.amazon.awscdk.services.codepipeline.ArtifactPath value) {
this._templateConfiguration = value;
return this;
}
/**
* Sets the value of StackName
* @param value The name of the stack to apply this action to.
* @return {@code this}
*/
public Builder withStackName(final java.lang.String value) {
this._stackName = java.util.Objects.requireNonNull(value, "stackName is required");
return this;
}
/**
* Sets the value of Output
* @param value The name of the output artifact to generate.
* @return {@code this}
*/
public Builder withOutput(@javax.annotation.Nullable final software.amazon.awscdk.services.codepipeline.Artifact value) {
this._output = value;
return this;
}
/**
* Sets the value of OutputFileName
* @param value A name for the filename in the output artifact to store the AWS CloudFormation call's result.
* @return {@code this}
*/
public Builder withOutputFileName(@javax.annotation.Nullable final java.lang.String value) {
this._outputFileName = value;
return this;
}
/**
* Sets the value of Region
* @param value The AWS region the given Action resides in. Note that a cross-region Pipeline requires replication buckets to function correctly. You can provide their names with the {@link PipelineProps#crossRegionReplicationBuckets} property. If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need to `cdk deploy` before deploying the main, Pipeline-containing Stack.
* @return {@code this}
*/
public Builder withRegion(@javax.annotation.Nullable final java.lang.String value) {
this._region = value;
return this;
}
/**
* Sets the value of Role
* @param value The service role that is assumed during execution of action. This role is not mandatory, however more advanced configuration may require specifying it.
* @return {@code this}
*/
public Builder withRole(@javax.annotation.Nullable final software.amazon.awscdk.services.iam.IRole value) {
this._role = value;
return this;
}
/**
* Sets the value of ActionName
* @param value The physical, human-readable name of the Action. Not that Action names must be unique within a single Stage.
* @return {@code this}
*/
public Builder withActionName(final java.lang.String value) {
this._actionName = java.util.Objects.requireNonNull(value, "actionName is required");
return this;
}
/**
* Sets the value of RunOrder
* @param value The runOrder property for this Action. RunOrder determines the relative order in which multiple Actions in the same Stage execute.
* @return {@code this}
*/
public Builder withRunOrder(@javax.annotation.Nullable final java.lang.Number value) {
this._runOrder = value;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CloudFormationDeployActionProps}
* @throws NullPointerException if any required attribute was not provided
*/
public CloudFormationDeployActionProps build() {
return new CloudFormationDeployActionProps() {
private final java.lang.Boolean $adminPermissions = java.util.Objects.requireNonNull(_adminPermissions, "adminPermissions is required");
@javax.annotation.Nullable
private final software.amazon.awscdk.services.cloudformation.CloudFormationCapabilities $capabilities = _capabilities;
@javax.annotation.Nullable
private final software.amazon.awscdk.services.iam.IRole $deploymentRole = _deploymentRole;
@javax.annotation.Nullable
private final java.util.List $extraInputs = _extraInputs;
@javax.annotation.Nullable
private final java.util.Map $parameterOverrides = _parameterOverrides;
@javax.annotation.Nullable
private final software.amazon.awscdk.services.codepipeline.ArtifactPath $templateConfiguration = _templateConfiguration;
private final java.lang.String $stackName = java.util.Objects.requireNonNull(_stackName, "stackName is required");
@javax.annotation.Nullable
private final software.amazon.awscdk.services.codepipeline.Artifact $output = _output;
@javax.annotation.Nullable
private final java.lang.String $outputFileName = _outputFileName;
@javax.annotation.Nullable
private final java.lang.String $region = _region;
@javax.annotation.Nullable
private final software.amazon.awscdk.services.iam.IRole $role = _role;
private final java.lang.String $actionName = java.util.Objects.requireNonNull(_actionName, "actionName is required");
@javax.annotation.Nullable
private final java.lang.Number $runOrder = _runOrder;
@Override
public java.lang.Boolean getAdminPermissions() {
return this.$adminPermissions;
}
@Override
public software.amazon.awscdk.services.cloudformation.CloudFormationCapabilities getCapabilities() {
return this.$capabilities;
}
@Override
public software.amazon.awscdk.services.iam.IRole getDeploymentRole() {
return this.$deploymentRole;
}
@Override
public java.util.List getExtraInputs() {
return this.$extraInputs;
}
@Override
public java.util.Map getParameterOverrides() {
return this.$parameterOverrides;
}
@Override
public software.amazon.awscdk.services.codepipeline.ArtifactPath getTemplateConfiguration() {
return this.$templateConfiguration;
}
@Override
public java.lang.String getStackName() {
return this.$stackName;
}
@Override
public software.amazon.awscdk.services.codepipeline.Artifact getOutput() {
return this.$output;
}
@Override
public java.lang.String getOutputFileName() {
return this.$outputFileName;
}
@Override
public java.lang.String getRegion() {
return this.$region;
}
@Override
public software.amazon.awscdk.services.iam.IRole getRole() {
return this.$role;
}
@Override
public java.lang.String getActionName() {
return this.$actionName;
}
@Override
public java.lang.Number getRunOrder() {
return this.$runOrder;
}
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("adminPermissions", om.valueToTree(this.getAdminPermissions()));
obj.set("capabilities", om.valueToTree(this.getCapabilities()));
obj.set("deploymentRole", om.valueToTree(this.getDeploymentRole()));
obj.set("extraInputs", om.valueToTree(this.getExtraInputs()));
obj.set("parameterOverrides", om.valueToTree(this.getParameterOverrides()));
obj.set("templateConfiguration", om.valueToTree(this.getTemplateConfiguration()));
obj.set("stackName", om.valueToTree(this.getStackName()));
obj.set("output", om.valueToTree(this.getOutput()));
obj.set("outputFileName", om.valueToTree(this.getOutputFileName()));
obj.set("region", om.valueToTree(this.getRegion()));
obj.set("role", om.valueToTree(this.getRole()));
obj.set("actionName", om.valueToTree(this.getActionName()));
obj.set("runOrder", om.valueToTree(this.getRunOrder()));
return obj;
}
};
}
}
/**
* A proxy class which represents a concrete javascript instance of this type.
*/
final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.codepipeline.actions.CloudFormationDeployActionProps {
protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
super(mode);
}
/**
* Whether to grant full permissions to CloudFormation while deploying this template.
*
* Setting this to `true` affects the defaults for `role` and `capabilities`, if you
* don't specify any alternatives.
*
* The default role that will be created for you will have full (i.e., `*`)
* permissions on all resources, and the deployment will have named IAM
* capabilities (i.e., able to create all IAM resources).
*
* This is a shorthand that you can use if you fully trust the templates that
* are deployed in this pipeline. If you want more fine-grained permissions,
* use `addToRolePolicy` and `capabilities` to control what the CloudFormation
* deployment is allowed to do.
*/
@Override
public java.lang.Boolean getAdminPermissions() {
return this.jsiiGet("adminPermissions", java.lang.Boolean.class);
}
/**
* Acknowledge certain changes made as part of deployment.
*
* For stacks that contain certain resources, explicit acknowledgement that AWS CloudFormation
* might create or update those resources. For example, you must specify `AnonymousIAM` or `NamedIAM`
* if your stack template contains AWS Identity and Access Management (IAM) resources. For more
* information see the link below.
*
* Default: None, unless `adminPermissions` is true
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities
*/
@Override
@javax.annotation.Nullable
public software.amazon.awscdk.services.cloudformation.CloudFormationCapabilities getCapabilities() {
return this.jsiiGet("capabilities", software.amazon.awscdk.services.cloudformation.CloudFormationCapabilities.class);
}
/**
* IAM role to assume when deploying changes.
*
* If not specified, a fresh role is created. The role is created with zero
* permissions unless `adminPermissions` is true, in which case the role will have
* full permissions.
*
* Default: A fresh role with full or no permissions (depending on the value of `adminPermissions`).
*/
@Override
@javax.annotation.Nullable
public software.amazon.awscdk.services.iam.IRole getDeploymentRole() {
return this.jsiiGet("deploymentRole", software.amazon.awscdk.services.iam.IRole.class);
}
/**
* The list of additional input Artifacts for this Action. This is especially useful when used in conjunction with the `parameterOverrides` property. For example, if you have:.
*
* parameterOverrides: {
* 'Param1': action1.outputArtifact.bucketName,
* 'Param2': action2.outputArtifact.objectKey,
* }
*
* , if the output Artifacts of `action1` and `action2` were not used to
* set either the `templateConfiguration` or the `templatePath` properties,
* you need to make sure to include them in the `extraInputs` -
* otherwise, you'll get an "unrecognized Artifact" error during your Pipeline's execution.
*/
@Override
@javax.annotation.Nullable
public java.util.List getExtraInputs() {
return this.jsiiGet("extraInputs", java.util.List.class);
}
/**
* Additional template parameters.
*
* Template parameters specified here take precedence over template parameters
* found in the artifact specified by the `templateConfiguration` property.
*
* We recommend that you use the template configuration file to specify
* most of your parameter values. Use parameter overrides to specify only
* dynamic parameter values (values that are unknown until you run the
* pipeline).
*
* All parameter names must be present in the stack template.
*
* Note: the entire object cannot be more than 1kB.
*
* Default: No overrides
*/
@Override
@javax.annotation.Nullable
public java.util.Map getParameterOverrides() {
return this.jsiiGet("parameterOverrides", java.util.Map.class);
}
/**
* Input artifact to use for template parameters values and stack policy.
*
* The template configuration file should contain a JSON object that should look like this:
* `{ "Parameters": {...}, "Tags": {...}, "StackPolicy": {... }}`. For more information,
* see [AWS CloudFormation Artifacts](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-cfn-artifacts.html).
*
* Note that if you include sensitive information, such as passwords, restrict access to this
* file.
*
* Default: No template configuration based on input artifacts
*/
@Override
@javax.annotation.Nullable
public software.amazon.awscdk.services.codepipeline.ArtifactPath getTemplateConfiguration() {
return this.jsiiGet("templateConfiguration", software.amazon.awscdk.services.codepipeline.ArtifactPath.class);
}
/**
* The name of the stack to apply this action to.
*/
@Override
public java.lang.String getStackName() {
return this.jsiiGet("stackName", java.lang.String.class);
}
/**
* The name of the output artifact to generate.
*
* Only applied if `outputFileName` is set as well.
*
* Default: Automatically generated artifact name.
*/
@Override
@javax.annotation.Nullable
public software.amazon.awscdk.services.codepipeline.Artifact getOutput() {
return this.jsiiGet("output", software.amazon.awscdk.services.codepipeline.Artifact.class);
}
/**
* A name for the filename in the output artifact to store the AWS CloudFormation call's result.
*
* The file will contain the result of the call to AWS CloudFormation (for example
* the call to UpdateStack or CreateChangeSet).
*
* AWS CodePipeline adds the file to the output artifact after performing
* the specified action.
*
* Default: No output artifact generated
*/
@Override
@javax.annotation.Nullable
public java.lang.String getOutputFileName() {
return this.jsiiGet("outputFileName", java.lang.String.class);
}
/**
* The AWS region the given Action resides in. Note that a cross-region Pipeline requires replication buckets to function correctly. You can provide their names with the {@link PipelineProps#crossRegionReplicationBuckets} property. If you don't, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets, that you will need to `cdk deploy` before deploying the main, Pipeline-containing Stack.
*
* Default: the Action resides in the same region as the Pipeline
*/
@Override
@javax.annotation.Nullable
public java.lang.String getRegion() {
return this.jsiiGet("region", java.lang.String.class);
}
/**
* The service role that is assumed during execution of action. This role is not mandatory, however more advanced configuration may require specifying it.
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-stages-actions.html
*/
@Override
@javax.annotation.Nullable
public software.amazon.awscdk.services.iam.IRole getRole() {
return this.jsiiGet("role", software.amazon.awscdk.services.iam.IRole.class);
}
/**
* The physical, human-readable name of the Action. Not that Action names must be unique within a single Stage.
*/
@Override
public java.lang.String getActionName() {
return this.jsiiGet("actionName", java.lang.String.class);
}
/**
* The runOrder property for this Action. RunOrder determines the relative order in which multiple Actions in the same Stage execute.
*
* Default: 1
*
* @see https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
*/
@Override
@javax.annotation.Nullable
public java.lang.Number getRunOrder() {
return this.jsiiGet("runOrder", java.lang.Number.class);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy