Skip to content

get_deployment_strategy async

get_deployment_strategy(
    deployment_strategy_id: DeploymentStrategyId,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
) -> DeploymentStrategy

Retrieves information about a deployment strategy. A deployment strategy defines important criteria for rolling out your configuration to the designated targets. A deployment strategy includes the overall duration required, a percentage of targets to receive the deployment during each interval, an algorithm that defines how percentage grows, and bake time.

Parameters:

Raises:

Examples:

To retrieve details of a deployment strategy The following get-deployment-strategy example lists the details of the specified deployment strategy.

>>> await client.get_deployment_strategy(deployment_strategy_id='1225qzk')
Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def get_deployment_strategy(
    self,
    deployment_strategy_id: "capo_appconfig.types.deployment_strategy_id.DeploymentStrategyId",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
) -> "capo_appconfig.types.deployment_strategy.DeploymentStrategy":
    """<p>Retrieves information about a deployment strategy. A deployment strategy defines important criteria for rolling out your configuration to the designated targets. A deployment strategy includes the overall duration required, a percentage of targets to receive the deployment during each interval, an algorithm that defines how percentage grows, and bake time.</p>

    Args:
        deployment_strategy_id: <p>The ID of the deployment strategy to get.</p>

    Raises:
        capo_appconfig.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_appconfig.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the AppConfig service.</p>
        capo_appconfig.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To retrieve details of a deployment strategy
        The following get-deployment-strategy example lists the details of the specified deployment strategy.

        >>> await client.get_deployment_strategy(deployment_strategy_id='1225qzk')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appconfig.types.get_deployment_strategy_request.GetDeploymentStrategyRequest]",
    ) -> AsyncOperationResponse[
        "capo_appconfig.types.deployment_strategy.DeploymentStrategy"
    ]:
        import capo_appconfig._operations.amazon_app_config.get_deployment_strategy

        (
            output,
            http_response,
        ) = await capo_appconfig._operations.amazon_app_config.get_deployment_strategy.async_get_deployment_strategy(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDeploymentStrategy")
    )
    input_: capo_appconfig.types.get_deployment_strategy_request.GetDeploymentStrategyRequest = {
        "deployment_strategy_id": deployment_strategy_id
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output