Skip to content

update_deployment

update_deployment(
    deployment_id: DeploymentId,
    specifications: DeploymentSpecifications,
    *,
    config_overrides: Optional[LaunchWizardClientConfig] = None,
    workload_version_name: Optional[WorkloadVersionName] = None,
    deployment_pattern_version_name: Optional[DeploymentPatternVersionName] = None,
    dry_run: Optional[bool] = None,
    force: Optional[bool] = None,
) -> UpdateDeploymentOutput

Updates a deployment.

Parameters:

  • deployment_id (DeploymentId) –

    The ID of the deployment.

  • specifications (DeploymentSpecifications) –

    The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see SAP deployment specifications. To retrieve the specifications required to create a deployment for other workloads, use the GetWorkloadDeploymentPattern operation.

  • workload_version_name (Optional[WorkloadVersionName], default: None ) –

    The name of the workload version.

  • deployment_pattern_version_name (Optional[DeploymentPatternVersionName], default: None ) –

    The name of the deployment pattern version.

  • dry_run (Optional[bool], default: None ) –

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • force (Optional[bool], default: None ) –

    Forces the update even if validation warnings are present.

Raises:

  • InternalServerException –

    An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on re:Post.

  • ResourceLimitException –

    You have exceeded an Launch Wizard resource limit. For example, you might have too many deployments in progress.

  • ResourceNotFoundException –

    The specified workload or deployment resource can't be found.

  • ValidationException –

    The input fails to satisfy the constraints specified by an Amazon Web Services service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

Edit deployment specifications.

>>> client.update_deployment(deployment_id='4c1b59c1-659c-467f-b6e9-6ef6f9d28e1d', specifications={'DisableDeploymentRollback': 'No', 'SaveDeploymentArtifacts': 'Yes', 'DeploymentArtifactsS3Uri': 'aws-bucket-name', 'KeyPairName': 'keyName', 'VpcId': 'vpc-1234567', 'CreateSecurityGroup': 'No', 'ProxyServerAddress': 'http://mno.abc.com:8080', 'Timezone': 'Pacific/Wake', 'EnableEbsVolumeEncryption': 'No', 'SapSysGroupId': '5003', 'SapVirtualIPOptIn': 'No', 'SnsTopicArn': 'arn:aws:sns:us-east-1:111111222222:snsNameUsEast1.fifo'}, dry_run=False)
Update deployment version.
>>> client.update_deployment(deployment_id='4c1b59c1-659c-467f-b6e9-6ef6f9d28e1d', deployment_pattern_version_name='2.0.0', specifications={'DisableDeploymentRollback': 'No', 'SaveDeploymentArtifacts': 'Yes', 'DeploymentArtifactsS3Uri': 'aws-bucket-name', 'KeyPairName': 'keyName', 'VpcId': 'vpc-1234567', 'CreateSecurityGroup': 'No', 'ProxyServerAddress': 'http://mno.abc.com:8080', 'Timezone': 'Pacific/Wake', 'EnableEbsVolumeEncryption': 'No', 'SapSysGroupId': '5003', 'SapVirtualIPOptIn': 'No', 'SnsTopicArn': 'arn:aws:sns:us-east-1:111111222222:snsNameUsEast1.fifo', 'NewParameter': 'Allow'}, dry_run=False)
Source code in docs_src/capo_launch_wizard/_services/launch_wizard.py
def update_deployment(
    self,
    deployment_id: "capo_launch_wizard.types.deployment_id.DeploymentId",
    specifications: "capo_launch_wizard.types.deployment_specifications.DeploymentSpecifications",
    *,
    config_overrides: Optional[LaunchWizardClientConfig] = None,
    workload_version_name: Optional[
        "capo_launch_wizard.types.workload_version_name.WorkloadVersionName"
    ] = None,
    deployment_pattern_version_name: Optional[
        "capo_launch_wizard.types.deployment_pattern_version_name.DeploymentPatternVersionName"
    ] = None,
    dry_run: Optional[bool] = None,
    force: Optional[bool] = None,
) -> "capo_launch_wizard.types.update_deployment_output.UpdateDeploymentOutput":
    """<p>Updates a deployment.</p>

    Args:
        deployment_id: <p>The ID of the deployment.</p>
        specifications: <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
        workload_version_name: <p>The name of the workload version.</p>
        deployment_pattern_version_name: <p>The name of the deployment pattern version.</p>
        dry_run: <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        force: <p>Forces the update even if validation warnings are present.</p>

    Raises:
        capo_launch_wizard.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on <a href="https://repost.aws/">re:Post</a>.</p>
        capo_launch_wizard.errors.resource_limit_exception.ResourceLimitException: <p>You have exceeded an Launch Wizard resource limit. For example, you might have too many deployments in progress.</p>
        capo_launch_wizard.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified workload or deployment resource can't be found.</p>
        capo_launch_wizard.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_launch_wizard.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Edit deployment specifications.

        >>> client.update_deployment(deployment_id='4c1b59c1-659c-467f-b6e9-6ef6f9d28e1d', specifications={'DisableDeploymentRollback': 'No', 'SaveDeploymentArtifacts': 'Yes', 'DeploymentArtifactsS3Uri': 'aws-bucket-name', 'KeyPairName': 'keyName', 'VpcId': 'vpc-1234567', 'CreateSecurityGroup': 'No', 'ProxyServerAddress': 'http://mno.abc.com:8080', 'Timezone': 'Pacific/Wake', 'EnableEbsVolumeEncryption': 'No', 'SapSysGroupId': '5003', 'SapVirtualIPOptIn': 'No', 'SnsTopicArn': 'arn:aws:sns:us-east-1:111111222222:snsNameUsEast1.fifo'}, dry_run=False)
        Update deployment version.

        >>> client.update_deployment(deployment_id='4c1b59c1-659c-467f-b6e9-6ef6f9d28e1d', deployment_pattern_version_name='2.0.0', specifications={'DisableDeploymentRollback': 'No', 'SaveDeploymentArtifacts': 'Yes', 'DeploymentArtifactsS3Uri': 'aws-bucket-name', 'KeyPairName': 'keyName', 'VpcId': 'vpc-1234567', 'CreateSecurityGroup': 'No', 'ProxyServerAddress': 'http://mno.abc.com:8080', 'Timezone': 'Pacific/Wake', 'EnableEbsVolumeEncryption': 'No', 'SapSysGroupId': '5003', 'SapVirtualIPOptIn': 'No', 'SnsTopicArn': 'arn:aws:sns:us-east-1:111111222222:snsNameUsEast1.fifo', 'NewParameter': 'Allow'}, dry_run=False)
    """

    def _handler(
        req: "OperationRequest[capo_launch_wizard.types.update_deployment_input.UpdateDeploymentInput]",
    ) -> OperationResponse[
        "capo_launch_wizard.types.update_deployment_output.UpdateDeploymentOutput"
    ]:
        import capo_launch_wizard._operations.launch_wizard.update_deployment

        output, http_response = (
            capo_launch_wizard._operations.launch_wizard.update_deployment.update_deployment(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_launch_wizard.types.update_deployment_input.UpdateDeploymentInput",
    ) -> dict[str, Any]:
        import capo_launch_wizard.types.update_deployment_input

        return capo_launch_wizard.types.update_deployment_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateDeployment", redact_input=_redact_input),
    )
    input_: capo_launch_wizard.types.update_deployment_input.UpdateDeploymentInput = {
        "deployment_id": deployment_id,
        "specifications": specifications,
    }
    if workload_version_name is not None:
        input_["workload_version_name"] = workload_version_name
    if deployment_pattern_version_name is not None:
        input_["deployment_pattern_version_name"] = deployment_pattern_version_name
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if force is not None:
        input_["force"] = force

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output