Skip to content

create_benefit_application

create_benefit_application(
    catalog: CatalogName,
    client_token: str,
    benefit_identifier: str,
    *,
    config_overrides: Optional[PartnerCentralBenefitsClientConfig] = None,
    name: Optional[BenefitApplicationName] = None,
    description: Optional[BenefitApplicationDescription] = None,
    fulfillment_types: Optional[FulfillmentTypes] = None,
    benefit_application_details: Optional[object] = None,
    tags: Optional[Tags] = None,
    associated_resources: Optional[Arns] = None,
    partner_contacts: Optional[Contacts] = None,
    file_details: Optional[FileInputDetails] = None,
) -> CreateBenefitApplicationOutput

Creates a new benefit application for a partner to request access to AWS benefits and programs.

Parameters:

  • catalog (CatalogName) –

    The catalog identifier that specifies which benefit catalog to create the application in.

  • client_token (str) –

    A unique, case-sensitive identifier to ensure idempotent processing of the creation request.

  • name (Optional[BenefitApplicationName], default: None ) –

    A human-readable name for the benefit application.

  • description (Optional[BenefitApplicationDescription], default: None ) –

    A detailed description of the benefit application and its intended use.

  • benefit_identifier (str) –

    The unique identifier of the benefit being requested in this application.

  • fulfillment_types (Optional[FulfillmentTypes], default: None ) –

    The types of fulfillment requested for this benefit application (e.g., credits, access, disbursement).

  • benefit_application_details (Optional[object], default: None ) –

    Detailed information and requirements specific to the benefit being requested.

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

    Key-value pairs to categorize and organize the benefit application.

  • associated_resources (Optional[Arns], default: None ) –

    AWS resources that are associated with this benefit application.

  • partner_contacts (Optional[Contacts], default: None ) –

    Contact information for partner representatives responsible for this benefit application.

  • file_details (Optional[FileInputDetails], default: None ) –

    Supporting documents and files attached to the benefit application.

Raises:

  • AccessDeniedException –

    Thrown when the caller does not have sufficient permissions to perform the requested operation.

  • ConflictException –

    Thrown when the request conflicts with the current state of the resource, such as attempting to modify a resource that has been changed by another process.

  • InternalServerException –

    Thrown when an unexpected error occurs on the server side during request processing.

  • ResourceNotFoundException –

    Thrown when the requested resource cannot be found or does not exist.

  • ThrottlingException –

    Thrown when the request rate exceeds the allowed limits and the request is being throttled.

  • ValidationException –

    Thrown when the request contains invalid parameters or fails input validation requirements.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_partnercentral_benefits/_services/partner_central_benefits.py
def create_benefit_application(
    self,
    catalog: "capo_partnercentral_benefits.types.catalog_name.CatalogName",
    client_token: str,
    benefit_identifier: str,
    *,
    config_overrides: Optional[PartnerCentralBenefitsClientConfig] = None,
    name: Optional[
        "capo_partnercentral_benefits.types.benefit_application_name.BenefitApplicationName"
    ] = None,
    description: Optional[
        "capo_partnercentral_benefits.types.benefit_application_description.BenefitApplicationDescription"
    ] = None,
    fulfillment_types: Optional[
        "capo_partnercentral_benefits.types.fulfillment_types.FulfillmentTypes"
    ] = None,
    benefit_application_details: Optional[object] = None,
    tags: Optional["capo_partnercentral_benefits.types.tags.Tags"] = None,
    associated_resources: Optional[
        "capo_partnercentral_benefits.types.arns.Arns"
    ] = None,
    partner_contacts: Optional[
        "capo_partnercentral_benefits.types.contacts.Contacts"
    ] = None,
    file_details: Optional[
        "capo_partnercentral_benefits.types.file_input_details.FileInputDetails"
    ] = None,
) -> "capo_partnercentral_benefits.types.create_benefit_application_output.CreateBenefitApplicationOutput":
    """<p>Creates a new benefit application for a partner to request access to AWS benefits and programs.</p>

    Args:
        catalog: <p>The catalog identifier that specifies which benefit catalog to create the application in.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure idempotent processing of the creation request.</p>
        name: <p>A human-readable name for the benefit application.</p>
        description: <p>A detailed description of the benefit application and its intended use.</p>
        benefit_identifier: <p>The unique identifier of the benefit being requested in this application.</p>
        fulfillment_types: <p>The types of fulfillment requested for this benefit application (e.g., credits, access, disbursement).</p>
        benefit_application_details: <p>Detailed information and requirements specific to the benefit being requested.</p>
        tags: <p>Key-value pairs to categorize and organize the benefit application.</p>
        associated_resources: <p>AWS resources that are associated with this benefit application.</p>
        partner_contacts: <p>Contact information for partner representatives responsible for this benefit application.</p>
        file_details: <p>Supporting documents and files attached to the benefit application.</p>

    Raises:
        capo_partnercentral_benefits.errors.access_denied_exception.AccessDeniedException: <p>Thrown when the caller does not have sufficient permissions to perform the requested operation.</p>
        capo_partnercentral_benefits.errors.conflict_exception.ConflictException: <p>Thrown when the request conflicts with the current state of the resource, such as attempting to modify a resource that has been changed by another process.</p>
        capo_partnercentral_benefits.errors.internal_server_exception.InternalServerException: <p>Thrown when an unexpected error occurs on the server side during request processing.</p>
        capo_partnercentral_benefits.errors.resource_not_found_exception.ResourceNotFoundException: <p>Thrown when the requested resource cannot be found or does not exist.</p>
        capo_partnercentral_benefits.errors.throttling_exception.ThrottlingException: <p>Thrown when the request rate exceeds the allowed limits and the request is being throttled.</p>
        capo_partnercentral_benefits.errors.validation_exception.ValidationException: <p>Thrown when the request contains invalid parameters or fails input validation requirements.</p>
        capo_partnercentral_benefits.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_partnercentral_benefits.types.create_benefit_application_input.CreateBenefitApplicationInput]",
    ) -> OperationResponse[
        "capo_partnercentral_benefits.types.create_benefit_application_output.CreateBenefitApplicationOutput"
    ]:
        import capo_partnercentral_benefits._operations.partner_central_benefits_service.create_benefit_application

        output, http_response = (
            capo_partnercentral_benefits._operations.partner_central_benefits_service.create_benefit_application.create_benefit_application(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_partnercentral_benefits.types.create_benefit_application_input.CreateBenefitApplicationInput",
    ) -> dict[str, Any]:
        import capo_partnercentral_benefits.types.create_benefit_application_input

        return capo_partnercentral_benefits.types.create_benefit_application_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateBenefitApplication", redact_input=_redact_input),
    )
    input_: capo_partnercentral_benefits.types.create_benefit_application_input.CreateBenefitApplicationInput = {
        "catalog": catalog,
        "client_token": client_token,
        "benefit_identifier": benefit_identifier,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if fulfillment_types is not None:
        input_["fulfillment_types"] = fulfillment_types
    if benefit_application_details is not None:
        input_["benefit_application_details"] = benefit_application_details
    if tags is not None:
        input_["tags"] = tags
    if associated_resources is not None:
        input_["associated_resources"] = associated_resources
    if partner_contacts is not None:
        input_["partner_contacts"] = partner_contacts
    if file_details is not None:
        input_["file_details"] = file_details

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