createSubscriptionTarget method
- required List<
String> applicableAssetTypes, - required List<
String> authorizedPrincipals, - required String domainIdentifier,
- required String environmentIdentifier,
- required String manageAccessRole,
- required String name,
- required List<
SubscriptionTargetForm> subscriptionTargetConfig, - required String type,
- String? clientToken,
- String? provider,
- SubscriptionGrantCreationMode? subscriptionGrantCreationMode,
Creates a subscription target in Amazon DataZone.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicableAssetTypes :
The asset types that can be included in the subscription target.
Parameter authorizedPrincipals :
The authorized principals of the subscription target.
Parameter domainIdentifier :
The ID of the Amazon DataZone domain in which subscription target is
created.
Parameter environmentIdentifier :
The ID of the environment in which subscription target is created.
Parameter manageAccessRole :
The manage access role that is used to create the subscription target.
Parameter name :
The name of the subscription target.
Parameter subscriptionTargetConfig :
The configuration of the subscription target.
Parameter type :
The type of the subscription target.
Parameter clientToken :
A unique, case-sensitive identifier that is provided to ensure the
idempotency of the request.
Parameter provider :
The provider of the subscription target.
Parameter subscriptionGrantCreationMode :
Determines the subscription grant creation mode for this target, defining
if grants are auto-created upon subscription approval or managed manually.
Implementation
Future<CreateSubscriptionTargetOutput> createSubscriptionTarget({
required List<String> applicableAssetTypes,
required List<String> authorizedPrincipals,
required String domainIdentifier,
required String environmentIdentifier,
required String manageAccessRole,
required String name,
required List<SubscriptionTargetForm> subscriptionTargetConfig,
required String type,
String? clientToken,
String? provider,
SubscriptionGrantCreationMode? subscriptionGrantCreationMode,
}) async {
final $payload = <String, dynamic>{
'applicableAssetTypes': applicableAssetTypes,
'authorizedPrincipals': authorizedPrincipals,
'manageAccessRole': manageAccessRole,
'name': name,
'subscriptionTargetConfig': subscriptionTargetConfig,
'type': type,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (provider != null) 'provider': provider,
if (subscriptionGrantCreationMode != null)
'subscriptionGrantCreationMode': subscriptionGrantCreationMode.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/environments/${Uri.encodeComponent(environmentIdentifier)}/subscription-targets',
exceptionFnMap: _exceptionFns,
);
return CreateSubscriptionTargetOutput.fromJson(response);
}