createPolicyStoreAlias method
Creates a policy store alias for the specified policy store. A policy store alias is an alternative identifier that you can use to reference a policy store in API operations.
This operation is idempotent. If multiple CreatePolicyStoreAlias requests
are made where the aliasName and policyStoreId
fields are the same between the requests, subsequent requests will be
ignored. For each duplicate CreatePolicyStoreAlias request, a Success
response will be returned and a new policy store alias will not be
created.
May throw ConflictException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
Parameter aliasName :
Specifies the name of the policy store alias to create. The name must be
unique within your Amazon Web Services account and Amazon Web Services
Region.
Parameter policyStoreId :
Specifies the ID of the policy store to associate with the alias.
Implementation
Future<CreatePolicyStoreAliasOutput> createPolicyStoreAlias({
required String aliasName,
required String policyStoreId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'VerifiedPermissions.CreatePolicyStoreAlias'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'aliasName': aliasName,
'policyStoreId': policyStoreId,
},
);
return CreatePolicyStoreAliasOutput.fromJson(jsonResponse.body);
}