Amazon.CodeDeploy.AmazonCodeDeployClient.CreateDeployment C# (CSharp) Method

CreateDeployment() public method

Deploys an application revision through the specified deployment group.
/// The application does not exist with the applicable IAM user or AWS account. /// /// The minimum number of required application names was not specified. /// /// The deployment configuration does not exist with the applicable IAM user or AWS account. /// /// The named deployment group does not exist with the applicable IAM user or AWS account. /// /// The deployment group name was not specified. /// /// The number of allowed deployments was exceeded. /// /// The description is too long. /// /// The application name was specified in an invalid format. /// /// The automatic rollback configuration was specified in an invalid format. For example, /// automatic rollback is enabled but an invalid triggering event type or no event types /// were listed. /// /// The deployment configuration name was specified in an invalid format. /// /// The deployment group name was specified in an invalid format. /// /// The revision was specified in an invalid format. /// /// The named revision does not exist with the applicable IAM user or AWS account. /// /// The revision ID was not specified. ///
public CreateDeployment ( CreateDeploymentRequest request ) : Amazon.CodeDeploy.Model.CreateDeploymentResponse
request Amazon.CodeDeploy.Model.CreateDeploymentRequest Container for the necessary parameters to execute the CreateDeployment service method.
return Amazon.CodeDeploy.Model.CreateDeploymentResponse
        public CreateDeploymentResponse CreateDeployment(CreateDeploymentRequest request)
        {
            var marshaller = new CreateDeploymentRequestMarshaller();
            var unmarshaller = CreateDeploymentResponseUnmarshaller.Instance;

            return Invoke<CreateDeploymentRequest,CreateDeploymentResponse>(request, marshaller, unmarshaller);
        }

Usage Example

Exemplo n.º 1
0
        public CreateDeploymentResponse DeployToStack(
            AmazonCodeDeployClient codeDeployClient,
            AmazonIdentityManagementServiceClient iamClient,
            AmazonAutoScalingClient autoScalingClient,
            Role role)
        {
            var deploymentGroupName = _stackName + "_" + BundleName;

            EnsureDeploymentGroupExistsForBundle(codeDeployClient, iamClient, autoScalingClient, role, deploymentGroupName);

            var deploymentResponse = codeDeployClient.CreateDeployment(new CreateDeploymentRequest
            {
                ApplicationName = CodeDeployApplicationName,
                DeploymentGroupName = deploymentGroupName,
                Revision = new RevisionLocation
                {
                    RevisionType = RevisionLocationType.S3,
                    S3Location = new S3Location
                    {
                        Bucket = Bucket,
                        Key = FileName,
                        BundleType = BundleType.Zip,
                        ETag = ETag
                    }
                }
            });

            return deploymentResponse;
        }
AmazonCodeDeployClient