Skip to content

create_opportunity async

create_opportunity(
    catalog: CatalogIdentifier,
    client_token: ClientToken,
    *,
    config_overrides: Optional[AsyncPartnerCentralSellingClientConfig] = None,
    primary_needs_from_aws: Optional[PrimaryNeedsFromAws] = None,
    national_security: Optional[NationalSecurity] = None,
    partner_opportunity_identifier: Optional[str] = None,
    customer: Optional[Customer] = None,
    project: Optional[Project] = None,
    opportunity_type: Optional[OpportunityType] = None,
    marketing: Optional[Marketing] = None,
    software_revenue: Optional[SoftwareRevenue] = None,
    life_cycle: Optional[LifeCycle] = None,
    origin: Optional[OpportunityOrigin] = None,
    opportunity_team: Optional[PartnerOpportunityTeamMembersList] = None,
    tags: Optional[TagList] = None,
) -> CreateOpportunityResponse

Creates an Opportunity record in Partner Central. Use this operation to create a potential business opportunity for submission to Amazon Web Services. Creating an opportunity sets Lifecycle.ReviewStatus to Pending Submission.

To submit an opportunity, follow these steps:

  1. To create the opportunity, use CreateOpportunity.

  2. To associate a solution with the opportunity, use AssociateOpportunity.

  3. To start the engagement with AWS, use StartEngagementFromOpportunity.

After submission, you can't edit the opportunity until the review is complete. But opportunities in the Pending Submission state must have complete details. You can update the opportunity while it's in the Pending Submission state.

There's a set of mandatory fields to create opportunities, but consider providing optional fields to enrich the opportunity record.

Parameters:

  • catalog (CatalogIdentifier) –

    Specifies the catalog associated with the request. This field takes a string value from a predefined list: AWS or Sandbox. The catalog determines which environment the opportunity is created in. Use AWS to create opportunities in the Amazon Web Services catalog, and Sandbox for testing in secure, isolated environments.

  • primary_needs_from_aws (Optional[PrimaryNeedsFromAws], default: None ) –

    Identifies the type of support the partner needs from Amazon Web Services.

    Valid values:

    • Cosell—Architectural Validation: Confirmation from Amazon Web Services that the partner's proposed solution architecture is aligned with Amazon Web Services best practices and poses minimal architectural risks.

    • Cosell—Business Presentation: Request Amazon Web Services seller's participation in a joint customer presentation.

    • Cosell—Competitive Information: Access to Amazon Web Services competitive resources and support for the partner's proposed solution.

    • Cosell—Pricing Assistance: Connect with an Amazon Web Services seller for support situations where a partner may be receiving an upfront discount on a service (for example: EDP deals).

    • Cosell—Technical Consultation: Connect with an Amazon Web Services Solutions Architect to address the partner's questions about the proposed solution.

    • Cosell—Total Cost of Ownership Evaluation: Assistance with quoting different cost savings of proposed solutions on Amazon Web Services versus on-premises or a traditional hosting environment.

    • Cosell—Deal Support: Request Amazon Web Services seller's support to progress the opportunity (for example: joint customer call, strategic positioning).

    • Cosell—Support for Public Tender/RFx: Opportunity related to the public sector where the partner needs Amazon Web Services RFx support.

  • national_security (Optional[NationalSecurity], default: None ) –

    Indicates whether the Opportunity pertains to a national security project. This field must be set to true only when the customer's industry is Government. Additional privacy and security measures apply during the review and management process for opportunities marked as NationalSecurity.

  • partner_opportunity_identifier (Optional[str], default: None ) –

    Specifies the opportunity's unique identifier in the partner's CRM system. This value is essential to track and reconcile because it's included in the outbound payload to the partner.

    This field allows partners to link an opportunity to their CRM, which helps to ensure seamless integration and accurate synchronization between the Partner Central API and the partner's internal systems.

  • customer (Optional[Customer], default: None ) –

    Specifies customer details associated with the Opportunity.

  • project (Optional[Project], default: None ) –

    An object that contains project details for the Opportunity.

  • opportunity_type (Optional[OpportunityType], default: None ) –

    Specifies the opportunity type as a renewal, new, or expansion.

    Opportunity types:

    • New opportunity: Represents a new business opportunity with a potential customer that's not previously engaged with your solutions or services.

    • Renewal opportunity: Represents an opportunity to renew an existing contract or subscription with a current customer, ensuring continuity of service.

    • Expansion opportunity: Represents an opportunity to expand the scope of an existing contract or subscription, either by adding new services or increasing the volume of existing services for a current customer.

  • marketing (Optional[Marketing], default: None ) –

    This object contains marketing details and is optional for an opportunity.

  • software_revenue (Optional[SoftwareRevenue], default: None ) –

    Specifies details of a customer's procurement terms. This is required only for partners in eligible programs.

  • client_token (ClientToken) –

    Required to be unique, and should be unchanging, it can be randomly generated or a meaningful string.

    Default: None

    Best practice: To help ensure uniqueness and avoid conflicts, use a Universally Unique Identifier (UUID) as the ClientToken. You can use standard libraries from most programming languages to generate this. If you use the same client token, the API returns the following error: "Conflicting client token submitted for a new request body."

  • life_cycle (Optional[LifeCycle], default: None ) –

    An object that contains lifecycle details for the Opportunity.

  • origin (Optional[OpportunityOrigin], default: None ) –

    Specifies the origin of the opportunity, indicating if it was sourced from Amazon Web Services or the partner. For all opportunities created with Catalog: AWS, this field must only be Partner Referral. However, when using Catalog: Sandbox, you can set this field to AWS Referral to simulate Amazon Web Services referral creation. This allows Amazon Web Services-originated flows testing in the sandbox catalog.

  • opportunity_team (Optional[PartnerOpportunityTeamMembersList], default: None ) –

    Represents the internal team handling the opportunity. Specify collaborating members of this opportunity who are within the partner's organization.

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

    A map of the key-value pairs of the tag or tags to assign.

Raises:

  • AccessDeniedException –

    This error occurs when you don't have permission to perform the requested action.

    You don’t have access to this action or resource. Review IAM policies or contact your AWS administrator for assistance.

  • ConflictException –

    This error occurs when the request can’t be processed due to a conflict with the target resource's current state, which could result from updating or deleting the resource.

    Suggested action: Fetch the latest state of the resource, verify the state, and retry the request.

  • InternalServerException –

    This error occurs when the specified resource can’t be found or doesn't exist. Resource ID and type might be incorrect.

    Suggested action: This is usually a transient error. Retry after the provided retry delay or a short interval. If the problem persists, contact AWS support.

  • ResourceNotFoundException –

    This error occurs when the specified resource can't be found. The resource might not exist, or isn't visible with the current credentials.

    Suggested action: Verify that the resource ID is correct and the resource is in the expected AWS region. Check IAM permissions for accessing the resource.

  • ThrottlingException –

    This error occurs when there are too many requests sent. Review the provided quotas and adapt your usage to avoid throttling.

    This error occurs when there are too many requests sent. Review the provided Quotas and retry after the provided delay.

  • ValidationException –

    The input fails to satisfy the constraints specified by the service or business validation rules.

    Suggested action: Review the error message, including the failed fields and reasons, to correct the request payload.

  • UnknownServiceError –

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

Source code in docs_src/capo_partnercentral_selling/_services/async_partner_central_selling.py
async def create_opportunity(
    self,
    catalog: "capo_partnercentral_selling.types.catalog_identifier.CatalogIdentifier",
    client_token: "capo_partnercentral_selling.types.client_token.ClientToken",
    *,
    config_overrides: Optional[AsyncPartnerCentralSellingClientConfig] = None,
    primary_needs_from_aws: Optional[
        "capo_partnercentral_selling.types.primary_needs_from_aws.PrimaryNeedsFromAws"
    ] = None,
    national_security: Optional[
        "capo_partnercentral_selling.types.national_security.NationalSecurity"
    ] = None,
    partner_opportunity_identifier: Optional[str] = None,
    customer: Optional[
        "capo_partnercentral_selling.types.customer.Customer"
    ] = None,
    project: Optional["capo_partnercentral_selling.types.project.Project"] = None,
    opportunity_type: Optional[
        "capo_partnercentral_selling.types.opportunity_type.OpportunityType"
    ] = None,
    marketing: Optional[
        "capo_partnercentral_selling.types.marketing.Marketing"
    ] = None,
    software_revenue: Optional[
        "capo_partnercentral_selling.types.software_revenue.SoftwareRevenue"
    ] = None,
    life_cycle: Optional[
        "capo_partnercentral_selling.types.life_cycle.LifeCycle"
    ] = None,
    origin: Optional[
        "capo_partnercentral_selling.types.opportunity_origin.OpportunityOrigin"
    ] = None,
    opportunity_team: Optional[
        "capo_partnercentral_selling.types.partner_opportunity_team_members_list.PartnerOpportunityTeamMembersList"
    ] = None,
    tags: Optional["capo_partnercentral_selling.types.tag_list.TagList"] = None,
) -> "capo_partnercentral_selling.types.create_opportunity_response.CreateOpportunityResponse":
    """<p>Creates an <code>Opportunity</code> record in Partner Central. Use this operation to create a potential business opportunity for submission to Amazon Web Services. Creating an opportunity sets <code>Lifecycle.ReviewStatus</code> to <code>Pending Submission</code>.</p> <p>To submit an opportunity, follow these steps:</p> <ol> <li> <p>To create the opportunity, use <code>CreateOpportunity</code>.</p> </li> <li> <p>To associate a solution with the opportunity, use <code>AssociateOpportunity</code>.</p> </li> <li> <p>To start the engagement with AWS, use <code>StartEngagementFromOpportunity</code>.</p> </li> </ol> <p>After submission, you can't edit the opportunity until the review is complete. But opportunities in the <code>Pending Submission</code> state must have complete details. You can update the opportunity while it's in the <code>Pending Submission</code> state.</p> <p>There's a set of mandatory fields to create opportunities, but consider providing optional fields to enrich the opportunity record.</p>

    Args:
        catalog: <p>Specifies the catalog associated with the request. This field takes a string value from a predefined list: <code>AWS</code> or <code>Sandbox</code>. The catalog determines which environment the opportunity is created in. Use <code>AWS</code> to create opportunities in the Amazon Web Services catalog, and <code>Sandbox</code> for testing in secure, isolated environments.</p>
        primary_needs_from_aws: <p>Identifies the type of support the partner needs from Amazon Web Services.</p> <p>Valid values:</p> <ul> <li> <p>Cosell—Architectural Validation: Confirmation from Amazon Web Services that the partner's proposed solution architecture is aligned with Amazon Web Services best practices and poses minimal architectural risks.</p> </li> <li> <p>Cosell—Business Presentation: Request Amazon Web Services seller's participation in a joint customer presentation.</p> </li> <li> <p>Cosell—Competitive Information: Access to Amazon Web Services competitive resources and support for the partner's proposed solution.</p> </li> <li> <p>Cosell—Pricing Assistance: Connect with an Amazon Web Services seller for support situations where a partner may be receiving an upfront discount on a service (for example: EDP deals).</p> </li> <li> <p>Cosell—Technical Consultation: Connect with an Amazon Web Services Solutions Architect to address the partner's questions about the proposed solution.</p> </li> <li> <p>Cosell—Total Cost of Ownership Evaluation: Assistance with quoting different cost savings of proposed solutions on Amazon Web Services versus on-premises or a traditional hosting environment.</p> </li> <li> <p>Cosell—Deal Support: Request Amazon Web Services seller's support to progress the opportunity (for example: joint customer call, strategic positioning).</p> </li> <li> <p>Cosell—Support for Public Tender/RFx: Opportunity related to the public sector where the partner needs Amazon Web Services RFx support.</p> </li> </ul>
        national_security: <p>Indicates whether the <code>Opportunity</code> pertains to a national security project. This field must be set to <code>true</code> only when the customer's industry is <i>Government</i>. Additional privacy and security measures apply during the review and management process for opportunities marked as <code>NationalSecurity</code>.</p>
        partner_opportunity_identifier: <p>Specifies the opportunity's unique identifier in the partner's CRM system. This value is essential to track and reconcile because it's included in the outbound payload to the partner.</p> <p>This field allows partners to link an opportunity to their CRM, which helps to ensure seamless integration and accurate synchronization between the Partner Central API and the partner's internal systems.</p>
        customer: <p>Specifies customer details associated with the <code>Opportunity</code>.</p>
        project: <p>An object that contains project details for the <code>Opportunity</code>.</p>
        opportunity_type: <p>Specifies the opportunity type as a renewal, new, or expansion.</p> <p>Opportunity types:</p> <ul> <li> <p>New opportunity: Represents a new business opportunity with a potential customer that's not previously engaged with your solutions or services.</p> </li> <li> <p>Renewal opportunity: Represents an opportunity to renew an existing contract or subscription with a current customer, ensuring continuity of service.</p> </li> <li> <p>Expansion opportunity: Represents an opportunity to expand the scope of an existing contract or subscription, either by adding new services or increasing the volume of existing services for a current customer.</p> </li> </ul>
        marketing: <p>This object contains marketing details and is optional for an opportunity.</p>
        software_revenue: <p>Specifies details of a customer's procurement terms. This is required only for partners in eligible programs.</p>
        client_token: <p>Required to be unique, and should be unchanging, it can be randomly generated or a meaningful string.</p> <p>Default: None</p> <p>Best practice: To help ensure uniqueness and avoid conflicts, use a Universally Unique Identifier (UUID) as the <code>ClientToken</code>. You can use standard libraries from most programming languages to generate this. If you use the same client token, the API returns the following error: "Conflicting client token submitted for a new request body."</p>
        life_cycle: <p>An object that contains lifecycle details for the <code>Opportunity</code>.</p>
        origin: <p>Specifies the origin of the opportunity, indicating if it was sourced from Amazon Web Services or the partner. For all opportunities created with <code>Catalog: AWS</code>, this field must only be <code>Partner Referral</code>. However, when using <code>Catalog: Sandbox</code>, you can set this field to <code>AWS Referral</code> to simulate Amazon Web Services referral creation. This allows Amazon Web Services-originated flows testing in the sandbox catalog.</p>
        opportunity_team: <p>Represents the internal team handling the opportunity. Specify collaborating members of this opportunity who are within the partner's organization.</p>
        tags: <p>A map of the key-value pairs of the tag or tags to assign.</p>

    Raises:
        capo_partnercentral_selling.errors.access_denied_exception.AccessDeniedException: <p>This error occurs when you don't have permission to perform the requested action.</p> <p>You don’t have access to this action or resource. Review IAM policies or contact your AWS administrator for assistance.</p>
        capo_partnercentral_selling.errors.conflict_exception.ConflictException: <p>This error occurs when the request can’t be processed due to a conflict with the target resource's current state, which could result from updating or deleting the resource.</p> <p>Suggested action: Fetch the latest state of the resource, verify the state, and retry the request.</p>
        capo_partnercentral_selling.errors.internal_server_exception.InternalServerException: <p>This error occurs when the specified resource can’t be found or doesn't exist. Resource ID and type might be incorrect.</p> <p>Suggested action: This is usually a transient error. Retry after the provided retry delay or a short interval. If the problem persists, contact AWS support.</p>
        capo_partnercentral_selling.errors.resource_not_found_exception.ResourceNotFoundException: <p>This error occurs when the specified resource can't be found. The resource might not exist, or isn't visible with the current credentials.</p> <p>Suggested action: Verify that the resource ID is correct and the resource is in the expected AWS region. Check IAM permissions for accessing the resource.</p>
        capo_partnercentral_selling.errors.throttling_exception.ThrottlingException: <p>This error occurs when there are too many requests sent. Review the provided quotas and adapt your usage to avoid throttling.</p> <p>This error occurs when there are too many requests sent. Review the provided <a href="https://docs.aws.amazon.com/partner-central/latest/selling-api/quotas.html">Quotas</a> and retry after the provided delay.</p>
        capo_partnercentral_selling.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service or business validation rules.</p> <p>Suggested action: Review the error message, including the failed fields and reasons, to correct the request payload.</p>
        capo_partnercentral_selling.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_partnercentral_selling.types.create_opportunity_request.CreateOpportunityRequest]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_selling.types.create_opportunity_response.CreateOpportunityResponse"
    ]:
        import capo_partnercentral_selling._operations.aws_partner_central_selling.create_opportunity

        (
            output,
            http_response,
        ) = await capo_partnercentral_selling._operations.aws_partner_central_selling.create_opportunity.async_create_opportunity(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_partnercentral_selling.types.create_opportunity_request.CreateOpportunityRequest",
    ) -> dict[str, Any]:
        import capo_partnercentral_selling.types.create_opportunity_request

        return capo_partnercentral_selling.types.create_opportunity_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateOpportunity", redact_input=_redact_input),
    )
    input_: capo_partnercentral_selling.types.create_opportunity_request.CreateOpportunityRequest = {
        "catalog": catalog,
        "client_token": client_token,
    }
    if primary_needs_from_aws is not None:
        input_["primary_needs_from_aws"] = primary_needs_from_aws
    if national_security is not None:
        input_["national_security"] = national_security
    if partner_opportunity_identifier is not None:
        input_["partner_opportunity_identifier"] = partner_opportunity_identifier
    if customer is not None:
        input_["customer"] = customer
    if project is not None:
        input_["project"] = project
    if opportunity_type is not None:
        input_["opportunity_type"] = opportunity_type
    if marketing is not None:
        input_["marketing"] = marketing
    if software_revenue is not None:
        input_["software_revenue"] = software_revenue
    if life_cycle is not None:
        input_["life_cycle"] = life_cycle
    if origin is not None:
        input_["origin"] = origin
    if opportunity_team is not None:
        input_["opportunity_team"] = opportunity_team
    if tags is not None:
        input_["tags"] = tags

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