Skip to content

execute_provisioned_product_service_action

execute_provisioned_product_service_action(
    provisioned_product_id: Id,
    service_action_id: Id,
    execute_token: IdempotencyToken,
    *,
    config_overrides: Optional[ServiceCatalogClientConfig] = None,
    accept_language: Optional[AcceptLanguage] = None,
    parameters: Optional[ExecutionParameterMap] = None,
) -> ExecuteProvisionedProductServiceActionOutput

Executes a self-service action against a provisioned product.

Parameters:

  • provisioned_product_id (Id) –

    The identifier of the provisioned product.

  • service_action_id (Id) –

    The self-service action identifier. For example, act-fs7abcd89wxyz.

  • execute_token (IdempotencyToken) –

    An idempotency token that uniquely identifies the execute request.

  • accept_language (Optional[AcceptLanguage], default: None ) –

    The language code.

    • jp - Japanese

    • zh - Chinese

  • parameters (Optional[ExecutionParameterMap], default: None ) –

    A map of all self-service action parameters and their values. If a provided parameter is of a special type, such as TARGET, the provided value will override the default value generated by Service Catalog. If the parameters field is not provided, no additional parameters are passed and default values will be used for any special parameters such as TARGET.

Raises:

Source code in docs_src/capo_service_catalog/_services/service_catalog.py
def execute_provisioned_product_service_action(
    self,
    provisioned_product_id: "capo_service_catalog.types.id.Id",
    service_action_id: "capo_service_catalog.types.id.Id",
    execute_token: "capo_service_catalog.types.idempotency_token.IdempotencyToken",
    *,
    config_overrides: Optional[ServiceCatalogClientConfig] = None,
    accept_language: Optional[
        "capo_service_catalog.types.accept_language.AcceptLanguage"
    ] = None,
    parameters: Optional[
        "capo_service_catalog.types.execution_parameter_map.ExecutionParameterMap"
    ] = None,
) -> "capo_service_catalog.types.execute_provisioned_product_service_action_output.ExecuteProvisionedProductServiceActionOutput":
    """<p>Executes a self-service action against a provisioned product.</p>

    Args:
        provisioned_product_id: <p>The identifier of the provisioned product.</p>
        service_action_id: <p>The self-service action identifier. For example, <code>act-fs7abcd89wxyz</code>.</p>
        execute_token: <p>An idempotency token that uniquely identifies the execute request.</p>
        accept_language: <p>The language code.</p> <ul> <li> <p> <code>jp</code> - Japanese</p> </li> <li> <p> <code>zh</code> - Chinese</p> </li> </ul>
        parameters: <p>A map of all self-service action parameters and their values. If a provided parameter is of a special type, such as <code>TARGET</code>, the provided value will override the default value generated by Service Catalog. If the parameters field is not provided, no additional parameters are passed and default values will be used for any special parameters such as <code>TARGET</code>.</p>

    Raises:
        capo_service_catalog.errors.invalid_parameters_exception.InvalidParametersException: <p>One or more parameters provided to the operation are not valid.</p>
        capo_service_catalog.errors.invalid_state_exception.InvalidStateException: <p>An attempt was made to modify a resource that is in a state that is not valid. Check your resources to ensure that they are in valid states before retrying the operation.</p>
        capo_service_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_service_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_service_catalog.types.execute_provisioned_product_service_action_input.ExecuteProvisionedProductServiceActionInput]",
    ) -> OperationResponse[
        "capo_service_catalog.types.execute_provisioned_product_service_action_output.ExecuteProvisionedProductServiceActionOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.execute_provisioned_product_service_action

        output, http_response = (
            capo_service_catalog._operations.aws242_service_catalog_service.execute_provisioned_product_service_action.execute_provisioned_product_service_action(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ExecuteProvisionedProductServiceAction")
    )
    input_: capo_service_catalog.types.execute_provisioned_product_service_action_input.ExecuteProvisionedProductServiceActionInput = {
        "provisioned_product_id": provisioned_product_id,
        "service_action_id": service_action_id,
        "execute_token": execute_token,
    }
    if accept_language is not None:
        input_["accept_language"] = accept_language
    if parameters is not None:
        input_["parameters"] = parameters

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