Struct aws_sdk_codedeploy::client::fluent_builders::CreateDeployment
source · [−]pub struct CreateDeployment { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateDeployment
.
Deploys an application revision through the specified deployment group.
Implementations
sourceimpl CreateDeployment
impl CreateDeployment
sourcepub async fn send(
self
) -> Result<CreateDeploymentOutput, SdkError<CreateDeploymentError>>
pub async fn send(
self
) -> Result<CreateDeploymentOutput, SdkError<CreateDeploymentError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn application_name(self, input: impl Into<String>) -> Self
pub fn application_name(self, input: impl Into<String>) -> Self
The name of an AWS CodeDeploy application associated with the IAM user or AWS account.
sourcepub fn set_application_name(self, input: Option<String>) -> Self
pub fn set_application_name(self, input: Option<String>) -> Self
The name of an AWS CodeDeploy application associated with the IAM user or AWS account.
sourcepub fn deployment_group_name(self, input: impl Into<String>) -> Self
pub fn deployment_group_name(self, input: impl Into<String>) -> Self
The name of the deployment group.
sourcepub fn set_deployment_group_name(self, input: Option<String>) -> Self
pub fn set_deployment_group_name(self, input: Option<String>) -> Self
The name of the deployment group.
sourcepub fn revision(self, input: RevisionLocation) -> Self
pub fn revision(self, input: RevisionLocation) -> Self
The type and location of the revision to deploy.
sourcepub fn set_revision(self, input: Option<RevisionLocation>) -> Self
pub fn set_revision(self, input: Option<RevisionLocation>) -> Self
The type and location of the revision to deploy.
sourcepub fn deployment_config_name(self, input: impl Into<String>) -> Self
pub fn deployment_config_name(self, input: impl Into<String>) -> Self
The name of a deployment configuration associated with the IAM user or AWS account.
If not specified, the value configured in the deployment group is used as the default. If the deployment group does not have a deployment configuration associated with it, CodeDeployDefault
.OneAtATime
is used by default.
sourcepub fn set_deployment_config_name(self, input: Option<String>) -> Self
pub fn set_deployment_config_name(self, input: Option<String>) -> Self
The name of a deployment configuration associated with the IAM user or AWS account.
If not specified, the value configured in the deployment group is used as the default. If the deployment group does not have a deployment configuration associated with it, CodeDeployDefault
.OneAtATime
is used by default.
sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A comment about the deployment.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A comment about the deployment.
sourcepub fn ignore_application_stop_failures(self, input: bool) -> Self
pub fn ignore_application_stop_failures(self, input: bool) -> Self
If true, then if an ApplicationStop
, BeforeBlockTraffic
, or AfterBlockTraffic
deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if ApplicationStop
fails, the deployment continues with DownloadBundle
. If BeforeBlockTraffic
fails, the deployment continues with BlockTraffic
. If AfterBlockTraffic
fails, the deployment continues with ApplicationStop
.
If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.
During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop
, BeforeBlockTraffic
, and AfterBlockTraffic
in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.
If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignoreApplicationStopFailures
to specify that the ApplicationStop
, BeforeBlockTraffic
, and AfterBlockTraffic
failures should be ignored.
sourcepub fn set_ignore_application_stop_failures(self, input: Option<bool>) -> Self
pub fn set_ignore_application_stop_failures(self, input: Option<bool>) -> Self
If true, then if an ApplicationStop
, BeforeBlockTraffic
, or AfterBlockTraffic
deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if ApplicationStop
fails, the deployment continues with DownloadBundle
. If BeforeBlockTraffic
fails, the deployment continues with BlockTraffic
. If AfterBlockTraffic
fails, the deployment continues with ApplicationStop
.
If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.
During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop
, BeforeBlockTraffic
, and AfterBlockTraffic
in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.
If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignoreApplicationStopFailures
to specify that the ApplicationStop
, BeforeBlockTraffic
, and AfterBlockTraffic
failures should be ignored.
sourcepub fn target_instances(self, input: TargetInstances) -> Self
pub fn target_instances(self, input: TargetInstances) -> Self
Information about the instances that belong to the replacement environment in a blue/green deployment.
sourcepub fn set_target_instances(self, input: Option<TargetInstances>) -> Self
pub fn set_target_instances(self, input: Option<TargetInstances>) -> Self
Information about the instances that belong to the replacement environment in a blue/green deployment.
sourcepub fn auto_rollback_configuration(
self,
input: AutoRollbackConfiguration
) -> Self
pub fn auto_rollback_configuration(
self,
input: AutoRollbackConfiguration
) -> Self
Configuration information for an automatic rollback that is added when a deployment is created.
sourcepub fn set_auto_rollback_configuration(
self,
input: Option<AutoRollbackConfiguration>
) -> Self
pub fn set_auto_rollback_configuration(
self,
input: Option<AutoRollbackConfiguration>
) -> Self
Configuration information for an automatic rollback that is added when a deployment is created.
sourcepub fn update_outdated_instances_only(self, input: bool) -> Self
pub fn update_outdated_instances_only(self, input: bool) -> Self
Indicates whether to deploy to all instances or only to instances that are not running the latest application revision.
sourcepub fn set_update_outdated_instances_only(self, input: Option<bool>) -> Self
pub fn set_update_outdated_instances_only(self, input: Option<bool>) -> Self
Indicates whether to deploy to all instances or only to instances that are not running the latest application revision.
sourcepub fn file_exists_behavior(self, input: FileExistsBehavior) -> Self
pub fn file_exists_behavior(self, input: FileExistsBehavior) -> Self
Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.
The fileExistsBehavior
parameter takes any of the following values:
-
DISALLOW: The deployment fails. This is also the default behavior if no option is specified.
-
OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.
-
RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.
sourcepub fn set_file_exists_behavior(self, input: Option<FileExistsBehavior>) -> Self
pub fn set_file_exists_behavior(self, input: Option<FileExistsBehavior>) -> Self
Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.
The fileExistsBehavior
parameter takes any of the following values:
-
DISALLOW: The deployment fails. This is also the default behavior if no option is specified.
-
OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.
-
RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.
Trait Implementations
sourceimpl Clone for CreateDeployment
impl Clone for CreateDeployment
sourcefn clone(&self) -> CreateDeployment
fn clone(&self) -> CreateDeployment
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CreateDeployment
impl Send for CreateDeployment
impl Sync for CreateDeployment
impl Unpin for CreateDeployment
impl !UnwindSafe for CreateDeployment
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more