All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.codepipeline.actions.EcsDeployActionProps Maven / Gradle / Ivy

package software.amazon.awscdk.services.codepipeline.actions;

/**
 * Construction properties of {@link EcsDeployAction}.
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.10.3 (build 6bbf743)", date = "2019-05-02T10:15:47.474Z")
public interface EcsDeployActionProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.codepipeline.CommonActionProps {
    /**
     * The ECS Service to deploy.
     */
    software.amazon.awscdk.services.ecs.BaseService getService();
    /**
     * The name of the JSON image definitions file to use for deployments. The JSON file is a list of objects, each with 2 keys: `name` is the name of the container in the Task Definition, and `imageUri` is the Docker image URI you want to update your service with. Use this property if you want to use a different name for this file than the default 'imagedefinitions.json'. If you use this property, you don't need to specify the `input` property.
     * 
     * Default: - one of this property, or `input`, is required
     * 
     * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions
     */
    software.amazon.awscdk.services.codepipeline.ArtifactPath getImageFile();
    /**
     * The input artifact that contains the JSON image definitions file to use for deployments. The JSON file is a list of objects, each with 2 keys: `name` is the name of the container in the Task Definition, and `imageUri` is the Docker image URI you want to update your service with. If you use this property, it's assumed the file is called 'imagedefinitions.json'. If your build uses a different file, leave this property empty, and use the `imageFile` property instead.
     * 
     * Default: - one of this property, or `imageFile`, is required
     * 
     * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions
     */
    software.amazon.awscdk.services.codepipeline.Artifact getInput();

    /**
     * @return a {@link Builder} of {@link EcsDeployActionProps}
     */
    static Builder builder() {
        return new Builder();
    }

    /**
     * A builder for {@link EcsDeployActionProps}
     */
    final class Builder {
        private software.amazon.awscdk.services.ecs.BaseService _service;
        @javax.annotation.Nullable
        private software.amazon.awscdk.services.codepipeline.ArtifactPath _imageFile;
        @javax.annotation.Nullable
        private software.amazon.awscdk.services.codepipeline.Artifact _input;
        private java.lang.String _actionName;
        @javax.annotation.Nullable
        private java.lang.Number _runOrder;

        /**
         * Sets the value of Service
         * @param value The ECS Service to deploy.
         * @return {@code this}
         */
        public Builder withService(final software.amazon.awscdk.services.ecs.BaseService value) {
            this._service = java.util.Objects.requireNonNull(value, "service is required");
            return this;
        }
        /**
         * Sets the value of ImageFile
         * @param value The name of the JSON image definitions file to use for deployments. The JSON file is a list of objects, each with 2 keys: `name` is the name of the container in the Task Definition, and `imageUri` is the Docker image URI you want to update your service with. Use this property if you want to use a different name for this file than the default 'imagedefinitions.json'. If you use this property, you don't need to specify the `input` property.
         * @return {@code this}
         */
        public Builder withImageFile(@javax.annotation.Nullable final software.amazon.awscdk.services.codepipeline.ArtifactPath value) {
            this._imageFile = value;
            return this;
        }
        /**
         * Sets the value of Input
         * @param value The input artifact that contains the JSON image definitions file to use for deployments. The JSON file is a list of objects, each with 2 keys: `name` is the name of the container in the Task Definition, and `imageUri` is the Docker image URI you want to update your service with. If you use this property, it's assumed the file is called 'imagedefinitions.json'. If your build uses a different file, leave this property empty, and use the `imageFile` property instead.
         * @return {@code this}
         */
        public Builder withInput(@javax.annotation.Nullable final software.amazon.awscdk.services.codepipeline.Artifact value) {
            this._input = 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 EcsDeployActionProps}
         * @throws NullPointerException if any required attribute was not provided
         */
        public EcsDeployActionProps build() {
            return new EcsDeployActionProps() {
                private final software.amazon.awscdk.services.ecs.BaseService $service = java.util.Objects.requireNonNull(_service, "service is required");
                @javax.annotation.Nullable
                private final software.amazon.awscdk.services.codepipeline.ArtifactPath $imageFile = _imageFile;
                @javax.annotation.Nullable
                private final software.amazon.awscdk.services.codepipeline.Artifact $input = _input;
                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 software.amazon.awscdk.services.ecs.BaseService getService() {
                    return this.$service;
                }

                @Override
                public software.amazon.awscdk.services.codepipeline.ArtifactPath getImageFile() {
                    return this.$imageFile;
                }

                @Override
                public software.amazon.awscdk.services.codepipeline.Artifact getInput() {
                    return this.$input;
                }

                @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("service", om.valueToTree(this.getService()));
                    obj.set("imageFile", om.valueToTree(this.getImageFile()));
                    obj.set("input", om.valueToTree(this.getInput()));
                    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.EcsDeployActionProps {
        protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
            super(mode);
        }

        /**
         * The ECS Service to deploy.
         */
        @Override
        public software.amazon.awscdk.services.ecs.BaseService getService() {
            return this.jsiiGet("service", software.amazon.awscdk.services.ecs.BaseService.class);
        }

        /**
         * The name of the JSON image definitions file to use for deployments. The JSON file is a list of objects, each with 2 keys: `name` is the name of the container in the Task Definition, and `imageUri` is the Docker image URI you want to update your service with. Use this property if you want to use a different name for this file than the default 'imagedefinitions.json'. If you use this property, you don't need to specify the `input` property.
         * 
         * Default: - one of this property, or `input`, is required
         * 
         * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions
         */
        @Override
        @javax.annotation.Nullable
        public software.amazon.awscdk.services.codepipeline.ArtifactPath getImageFile() {
            return this.jsiiGet("imageFile", software.amazon.awscdk.services.codepipeline.ArtifactPath.class);
        }

        /**
         * The input artifact that contains the JSON image definitions file to use for deployments. The JSON file is a list of objects, each with 2 keys: `name` is the name of the container in the Task Definition, and `imageUri` is the Docker image URI you want to update your service with. If you use this property, it's assumed the file is called 'imagedefinitions.json'. If your build uses a different file, leave this property empty, and use the `imageFile` property instead.
         * 
         * Default: - one of this property, or `imageFile`, is required
         * 
         * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-image-definitions
         */
        @Override
        @javax.annotation.Nullable
        public software.amazon.awscdk.services.codepipeline.Artifact getInput() {
            return this.jsiiGet("input", software.amazon.awscdk.services.codepipeline.Artifact.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