Skip to content

create_deployment

create_deployment(
    workload_name: WorkloadName,
    deployment_pattern_name: DeploymentPatternName,
    name: DeploymentName,
    specifications: DeploymentSpecifications,
    *,
    config_overrides: Optional[LaunchWizardClientConfig] = None,
    dry_run: Optional[bool] = None,
    tags: Optional[Tags] = None,
) -> CreateDeploymentOutput

Creates a deployment for the given workload. Deployments created by this operation are not available in the Launch Wizard console to use the Clone deployment action on.

Parameters:

  • workload_name (WorkloadName) –

    The name of the workload. You can use the ListWorkloads operation to discover supported values for this parameter.

  • deployment_pattern_name (DeploymentPatternName) –

    The name of the deployment pattern supported by a given workload. You can use the ListWorkloadDeploymentPatterns operation to discover supported values for this parameter.

  • name (DeploymentName) –

    The name 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.

  • 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.

  • tags (Optional[Tags], default: None ) –

    The tags to add to the deployment.

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:

Deploy a given workload with given settings.

>>> client.create_deployment(workload_name='SAP', deployment_pattern_name='SapHanaSingle', name='TestDeployment1', dry_run=False, specifications={'DisableDeploymentRollback': 'Yes', 'SaveDeploymentArtifacts': 'No', 'KeyPairName': 'keyName', 'VpcId': 'vpc-1234566', 'CreateSecurityGroup': 'No', 'ProxyServerAddress': 'http://xyz.abc.com:8080', 'Timezone': 'Pacific/Wake', 'EnableEbsVolumeEncryption': 'Yes', 'SapSysGroupId': '5003', 'SapVirtualIPOptIn': 'No', 'SnsTopicArn': 'arn:aws:sns:us-east-1:111111222222:snsNameUsEast1.fifo'})
Deploy a given workload with given settings and passing tags for Launch Wizard deployment resource.
>>> client.create_deployment(workload_name='SAP', deployment_pattern_name='SapHanaSingle', name='TestDeployment2', dry_run=False, specifications={'DisableDeploymentRollback': 'Yes', 'SaveDeploymentArtifacts': 'No', 'KeyPairName': 'keyName', 'VpcId': 'vpc-1234566', 'CreateSecurityGroup': 'No', 'ProxyServerAddress': 'http://xyz.abc.com:8080', 'Timezone': 'Pacific/Wake', 'EnableEbsVolumeEncryption': 'Yes', 'SapSysGroupId': '5003', 'SapVirtualIPOptIn': 'No', 'SnsTopicArn': 'arn:aws:sns:us-east-1:111111222222:snsNameUsEast1.fifo'}, tags={'key1': 'val1', 'key2': 'val2'})
Source code in docs_src/capo_launch_wizard/_services/launch_wizard.py
def create_deployment(
    self,
    workload_name: "capo_launch_wizard.types.workload_name.WorkloadName",
    deployment_pattern_name: "capo_launch_wizard.types.deployment_pattern_name.DeploymentPatternName",
    name: "capo_launch_wizard.types.deployment_name.DeploymentName",
    specifications: "capo_launch_wizard.types.deployment_specifications.DeploymentSpecifications",
    *,
    config_overrides: Optional[LaunchWizardClientConfig] = None,
    dry_run: Optional[bool] = None,
    tags: Optional["capo_launch_wizard.types.tags.Tags"] = None,
) -> "capo_launch_wizard.types.create_deployment_output.CreateDeploymentOutput":
    """<p>Creates a deployment for the given workload. Deployments created by this operation are not available in the Launch Wizard console to use the <code>Clone deployment</code> action on.</p>

    Args:
        workload_name: <p>The name of the workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloads.html"> <code>ListWorkloads</code> </a> operation to discover supported values for this parameter.</p>
        deployment_pattern_name: <p>The name of the deployment pattern supported by a given workload. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloadDeploymentPatterns.html"> <code>ListWorkloadDeploymentPatterns</code> </a> operation to discover supported values for this parameter. </p>
        name: <p>The name 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>
        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>
        tags: <p>The tags to add to the deployment.</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:
        Deploy a given workload with given settings.

        >>> client.create_deployment(workload_name='SAP', deployment_pattern_name='SapHanaSingle', name='TestDeployment1', dry_run=False, specifications={'DisableDeploymentRollback': 'Yes', 'SaveDeploymentArtifacts': 'No', 'KeyPairName': 'keyName', 'VpcId': 'vpc-1234566', 'CreateSecurityGroup': 'No', 'ProxyServerAddress': 'http://xyz.abc.com:8080', 'Timezone': 'Pacific/Wake', 'EnableEbsVolumeEncryption': 'Yes', 'SapSysGroupId': '5003', 'SapVirtualIPOptIn': 'No', 'SnsTopicArn': 'arn:aws:sns:us-east-1:111111222222:snsNameUsEast1.fifo'})
        Deploy a given workload with given settings and passing tags for Launch Wizard deployment resource.

        >>> client.create_deployment(workload_name='SAP', deployment_pattern_name='SapHanaSingle', name='TestDeployment2', dry_run=False, specifications={'DisableDeploymentRollback': 'Yes', 'SaveDeploymentArtifacts': 'No', 'KeyPairName': 'keyName', 'VpcId': 'vpc-1234566', 'CreateSecurityGroup': 'No', 'ProxyServerAddress': 'http://xyz.abc.com:8080', 'Timezone': 'Pacific/Wake', 'EnableEbsVolumeEncryption': 'Yes', 'SapSysGroupId': '5003', 'SapVirtualIPOptIn': 'No', 'SnsTopicArn': 'arn:aws:sns:us-east-1:111111222222:snsNameUsEast1.fifo'}, tags={'key1': 'val1', 'key2': 'val2'})
    """

    def _handler(
        req: "OperationRequest[capo_launch_wizard.types.create_deployment_input.CreateDeploymentInput]",
    ) -> OperationResponse[
        "capo_launch_wizard.types.create_deployment_output.CreateDeploymentOutput"
    ]:
        import capo_launch_wizard._operations.launch_wizard.create_deployment

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

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

        return capo_launch_wizard.types.create_deployment_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateDeployment", redact_input=_redact_input),
    )
    input_: capo_launch_wizard.types.create_deployment_input.CreateDeploymentInput = {
        "workload_name": workload_name,
        "deployment_pattern_name": deployment_pattern_name,
        "name": name,
        "specifications": specifications,
    }
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if tags is not None:
        input_["tags"] = tags

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