Skip to content

get_deployment_configuration async

get_deployment_configuration(
    catalog: Catalog,
    product_id: ResourceId,
    delivery_option_type: DeliveryOptionType,
    *,
    config_overrides: Optional[AsyncMarketplaceDeploymentClientConfig] = None,
) -> GetDeploymentConfigurationResponse

Returns the active deployment configuration for a product and delivery option. The active deployment configuration is the configuration from the most recent successful deployment configuration job. The seller that owns the product and buyers entitled to the product can call this operation.

If the product and delivery option have no active deployment configuration, the operation returns a ResourceNotFoundException.

Parameters:

  • catalog (Catalog) –

    The catalog related to the request. Fixed value: AWSMarketplace

  • product_id (ResourceId) –

    The ID of the AWS Marketplace product, for example prod-1234567890abc.

  • delivery_option_type (DeliveryOptionType) –

    The delivery option type of the deployment configuration.

Raises:

Examples:

Get the active deployment configuration Returns only the current active configuration for the owning seller or an entitled buyer.

>>> await client.get_deployment_configuration(catalog='AWSMarketplace', product_id='product-1234', delivery_option_type='data-as-a-service')
Get active configuration fails when none exists
If the product and delivery option have no active deployment configuration, the operation returns a ResourceNotFoundException.
>>> await client.get_deployment_configuration(catalog='AWSMarketplace', product_id='product-1234', delivery_option_type='data-as-a-service')
Get active configuration fails for an unauthorized caller
If the caller is neither the seller of the product nor a buyer entitled to it, the operation returns an AccessDeniedException.
>>> await client.get_deployment_configuration(catalog='AWSMarketplace', product_id='product-1234', delivery_option_type='data-as-a-service')
Source code in docs_src/capo_marketplace_deployment/_services/async_marketplace_deployment.py
async def get_deployment_configuration(
    self,
    catalog: "capo_marketplace_deployment.types.catalog.Catalog",
    product_id: "capo_marketplace_deployment.types.resource_id.ResourceId",
    delivery_option_type: "capo_marketplace_deployment.types.delivery_option_type.DeliveryOptionType",
    *,
    config_overrides: Optional[AsyncMarketplaceDeploymentClientConfig] = None,
) -> "capo_marketplace_deployment.types.get_deployment_configuration_response.GetDeploymentConfigurationResponse":
    """<p>Returns the active deployment configuration for a product and delivery option. The active deployment configuration is the configuration from the most recent successful deployment configuration job. The seller that owns the product and buyers entitled to the product can call this operation.</p> <p>If the product and delivery option have no active deployment configuration, the operation returns a <code>ResourceNotFoundException</code>.</p>

    Args:
        catalog: <p>The catalog related to the request. Fixed value: <code>AWSMarketplace</code> </p>
        product_id: <p>The ID of the AWS Marketplace product, for example <code>prod-1234567890abc</code>.</p>
        delivery_option_type: <p>The delivery option type of the deployment configuration.</p>

    Raises:
        capo_marketplace_deployment.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_marketplace_deployment.errors.internal_server_exception.InternalServerException: <p>There was an internal service exception.</p>
        capo_marketplace_deployment.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource wasn't found.</p>
        capo_marketplace_deployment.errors.throttling_exception.ThrottlingException: <p>Too many requests.</p>
        capo_marketplace_deployment.errors.validation_exception.ValidationException: <p>An error occurred during validation.</p>
        capo_marketplace_deployment.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Get the active deployment configuration
        Returns only the current active configuration for the owning seller or an entitled buyer.

        >>> await client.get_deployment_configuration(catalog='AWSMarketplace', product_id='product-1234', delivery_option_type='data-as-a-service')
        Get active configuration fails when none exists
        If the product and delivery option have no active deployment configuration, the operation returns a ResourceNotFoundException.

        >>> await client.get_deployment_configuration(catalog='AWSMarketplace', product_id='product-1234', delivery_option_type='data-as-a-service')
        Get active configuration fails for an unauthorized caller
        If the caller is neither the seller of the product nor a buyer entitled to it, the operation returns an AccessDeniedException.

        >>> await client.get_deployment_configuration(catalog='AWSMarketplace', product_id='product-1234', delivery_option_type='data-as-a-service')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_marketplace_deployment.types.get_deployment_configuration_request.GetDeploymentConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_marketplace_deployment.types.get_deployment_configuration_response.GetDeploymentConfigurationResponse"
    ]:
        import capo_marketplace_deployment._operations.awsmp_deployment_parameters_service.get_deployment_configuration

        (
            output,
            http_response,
        ) = await capo_marketplace_deployment._operations.awsmp_deployment_parameters_service.get_deployment_configuration.async_get_deployment_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDeploymentConfiguration")
    )
    input_: capo_marketplace_deployment.types.get_deployment_configuration_request.GetDeploymentConfigurationRequest = {
        "catalog": catalog,
        "product_id": product_id,
        "delivery_option_type": delivery_option_type,
    }

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