Skip to content

get_deployment_configuration

get_deployment_configuration(
    catalog: Catalog,
    product_id: ResourceId,
    delivery_option_type: DeliveryOptionType,
    *,
    config_overrides: Optional[MarketplaceDeploymentClientConfig] = 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.

>>> 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.
>>> 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.
>>> 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/marketplace_deployment.py
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[MarketplaceDeploymentClientConfig] = 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.

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

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

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

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

        output, http_response = (
            capo_marketplace_deployment._operations.awsmp_deployment_parameters_service.get_deployment_configuration.get_deployment_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output