createBenefitApplication method
- required String benefitIdentifier,
- required String catalog,
- required String clientToken,
- List<
String> ? associatedResources, - Document? benefitApplicationDetails,
- String? description,
- List<
FileInput> ? fileDetails, - List<
FulfillmentType> ? fulfillmentTypes, - String? name,
- List<
Contact> ? partnerContacts, - List<
Tag> ? tags,
Creates a new benefit application for a partner to request access to AWS benefits and programs.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter benefitIdentifier :
The unique identifier of the benefit being requested in this application.
Parameter catalog :
The catalog identifier that specifies which benefit catalog to create the
application in.
Parameter clientToken :
A unique, case-sensitive identifier to ensure idempotent processing of the
creation request.
Parameter associatedResources :
AWS resources that are associated with this benefit application.
Parameter benefitApplicationDetails :
Detailed information and requirements specific to the benefit being
requested.
Parameter description :
A detailed description of the benefit application and its intended use.
Parameter fileDetails :
Supporting documents and files attached to the benefit application.
Parameter fulfillmentTypes :
The types of fulfillment requested for this benefit application (e.g.,
credits, access, disbursement).
Parameter name :
A human-readable name for the benefit application.
Parameter partnerContacts :
Contact information for partner representatives responsible for this
benefit application.
Parameter tags :
Key-value pairs to categorize and organize the benefit application.
Implementation
Future<CreateBenefitApplicationOutput> createBenefitApplication({
required String benefitIdentifier,
required String catalog,
required String clientToken,
List<String>? associatedResources,
Document? benefitApplicationDetails,
String? description,
List<FileInput>? fileDetails,
List<FulfillmentType>? fulfillmentTypes,
String? name,
List<Contact>? partnerContacts,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PartnerCentralBenefitsService.CreateBenefitApplication'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'BenefitIdentifier': benefitIdentifier,
'Catalog': catalog,
'ClientToken': clientToken,
if (associatedResources != null)
'AssociatedResources': associatedResources,
if (benefitApplicationDetails != null)
'BenefitApplicationDetails': benefitApplicationDetails,
if (description != null) 'Description': description,
if (fileDetails != null) 'FileDetails': fileDetails,
if (fulfillmentTypes != null)
'FulfillmentTypes': fulfillmentTypes.map((e) => e.value).toList(),
if (name != null) 'Name': name,
if (partnerContacts != null) 'PartnerContacts': partnerContacts,
if (tags != null) 'Tags': tags,
},
);
return CreateBenefitApplicationOutput.fromJson(jsonResponse.body);
}