list_opportunities
¶
list_opportunities(
catalog: CatalogIdentifier,
*,
config_overrides: Optional[PartnerCentralSellingClientConfig] = None,
max_results: Optional[PageSize] = None,
next_token: Optional[str] = None,
sort: Optional[OpportunitySort] = None,
last_modified_date: Optional[LastModifiedDate] = None,
identifier: Optional[FilterIdentifier] = None,
life_cycle_stage: Optional[FilterLifeCycleStage] = None,
life_cycle_review_status: Optional[FilterLifeCycleReviewStatus] = None,
customer_company_name: Optional[StringList] = None,
created_date: Optional[CreatedDateFilter] = None,
target_close_date: Optional[TargetCloseDateFilter] = None,
) -> ListOpportunitiesResponse
This request accepts a list of filters that retrieve opportunity subsets as well as sort options. This feature is available to partners from Partner Central using the ListOpportunities API action.
To synchronize your system with Amazon Web Services, list only the opportunities that were newly created or updated. We recommend you rely on events emitted by the service into your Amazon Web Services account’s Amazon EventBridge default event bus. You can also use the ListOpportunities action.
We recommend the following approach:
-
Find the latest
LastModifiedDatethat you stored, and only use the values that came from Amazon Web Services. Don’t use values generated by your system. -
When you send a
ListOpportunitiesrequest, submit the date in ISO 8601 format in theAfterLastModifiedDatefilter. -
Amazon Web Services only returns opportunities created or updated on or after that date and time. Use
NextTokento iterate over all pages.
Parameters:
-
catalog(CatalogIdentifier) –Specifies the catalog associated with the request. This field takes a string value from a predefined list:
AWSorSandbox. The catalog determines which environment the opportunities are listed in. UseAWSfor listing real opportunities in the Amazon Web Services catalog, andSandboxfor testing in secure, isolated environments. -
max_results(Optional[PageSize], default:None) –Specifies the maximum number of results to return in a single call. This limits the number of opportunities returned in the response to avoid providing too many results at once.
Default: 20
-
next_token(Optional[str], default:None) –A pagination token used to retrieve the next set of results in subsequent calls. This token is included in the response only if there are additional result pages available.
-
sort(Optional[OpportunitySort], default:None) –An object that specifies how the response is sorted. The default
Sort.SortByvalue isLastModifiedDate. -
last_modified_date(Optional[LastModifiedDate], default:None) –Filters the opportunities based on their last modified date. This filter helps retrieve opportunities that were updated after the specified date, allowing partners to track recent changes or updates.
-
identifier(Optional[FilterIdentifier], default:None) –Filters the opportunities based on the opportunity identifier. This allows partners to retrieve specific opportunities by providing their unique identifiers, ensuring precise results.
-
life_cycle_stage(Optional[FilterLifeCycleStage], default:None) –Filters the opportunities based on their lifecycle stage. This filter allows partners to retrieve opportunities at various stages in the sales cycle, such as
Qualified,Technical Validation,Business Validation, orClosed Won. -
life_cycle_review_status(Optional[FilterLifeCycleReviewStatus], default:None) –Filters the opportunities based on their current lifecycle approval status. Use this filter to retrieve opportunities with statuses such as
Pending Submission,In Review,Action Required, orApproved. -
customer_company_name(Optional[StringList], default:None) –Filters the opportunities based on the customer's company name. This allows partners to search for opportunities associated with a specific customer by matching the provided company name string.
-
created_date(Optional[CreatedDateFilter], default:None) –Filter opportunities by creation date criteria.
-
target_close_date(Optional[TargetCloseDateFilter], default:None) –Filters opportunities based on their target close date. This filter helps retrieve opportunities with an expected close date before or after a specified date.
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.
-
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/partner_central_selling.py
2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 | |