updateOpportunity method
- required String catalog,
- required String identifier,
- required DateTime lastModifiedDate,
- Customer? customer,
- LifeCycle? lifeCycle,
- Marketing? marketing,
- NationalSecurity? nationalSecurity,
- OpportunityType? opportunityType,
- String? partnerOpportunityIdentifier,
- List<
PrimaryNeedFromAws> ? primaryNeedsFromAws, - Project? project,
- SoftwareRevenue? softwareRevenue,
Updates the Opportunity record identified by a given
Identifier. This operation allows you to modify the details
of an existing opportunity to reflect the latest information and progress.
Use this action to keep the opportunity record up-to-date and accurate.
When you perform updates, include the entire payload with each request. If
any field is omitted, the API assumes that the field is set to
null. The best practice is to always perform a
GetOpportunity to retrieve the latest values, then send the
complete payload with the updated values to be changed.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter catalog :
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 updated in. Use AWS to update real
opportunities in the production environment, and Sandbox for
testing in secure, isolated environments. When you use the
Sandbox catalog, it allows you to simulate and validate your
interactions with Amazon Web Services services without affecting live data
or operations.
Parameter identifier :
Read-only, system generated Opportunity unique identifier.
Parameter lastModifiedDate :
DateTime when the opportunity was last modified.
Parameter customer :
Specifies details of the customer associated with the
Opportunity.
Parameter lifeCycle :
An object that contains lifecycle details for the
Opportunity.
Parameter marketing :
An object that contains marketing details for the
Opportunity.
Parameter nationalSecurity :
Specifies if the opportunity is associated with national security
concerns. This flag is only applicable when the industry is
Government. For national-security-related opportunities,
validation and compliance rules may apply, impacting the opportunity's
visibility and processing.
Parameter opportunityType :
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.
Parameter partnerOpportunityIdentifier :
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 sent back to the partner.
Parameter primaryNeedsFromAws :
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 AWS seller for support situations where a partner may be receiving an upfront discount on a service (for example: EDP deals).
- Cosell—Technical Consultation: Connection 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 RFx support from Amazon Web Services.
Parameter project :
An object that contains project details summary for the
Opportunity.
Parameter softwareRevenue :
Specifies details of a customer's procurement terms. Required only for
partners in eligible programs.
Implementation
Future<UpdateOpportunityResponse> updateOpportunity({
required String catalog,
required String identifier,
required DateTime lastModifiedDate,
Customer? customer,
LifeCycle? lifeCycle,
Marketing? marketing,
NationalSecurity? nationalSecurity,
OpportunityType? opportunityType,
String? partnerOpportunityIdentifier,
List<PrimaryNeedFromAws>? primaryNeedsFromAws,
Project? project,
SoftwareRevenue? softwareRevenue,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSPartnerCentralSelling.UpdateOpportunity'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Catalog': catalog,
'Identifier': identifier,
'LastModifiedDate': iso8601ToJson(lastModifiedDate),
if (customer != null) 'Customer': customer,
if (lifeCycle != null) 'LifeCycle': lifeCycle,
if (marketing != null) 'Marketing': marketing,
if (nationalSecurity != null)
'NationalSecurity': nationalSecurity.value,
if (opportunityType != null) 'OpportunityType': opportunityType.value,
if (partnerOpportunityIdentifier != null)
'PartnerOpportunityIdentifier': partnerOpportunityIdentifier,
if (primaryNeedsFromAws != null)
'PrimaryNeedsFromAws':
primaryNeedsFromAws.map((e) => e.value).toList(),
if (project != null) 'Project': project,
if (softwareRevenue != null) 'SoftwareRevenue': softwareRevenue,
},
);
return UpdateOpportunityResponse.fromJson(jsonResponse.body);
}