listConflictingAliases method
In the returned list, the standard distribution and account IDs are partially hidden, which allows you to identify the standard distribution and accounts that you own, and helps to protect the information of ones that you don't own.
Use this operation to find aliases that are in use in CloudFront that
conflict or overlap with the provided alias. For example, if you provide
www.example.com as input, the returned list can include
www.example.com and the overlapping wildcard alternate domain
name (.example.com), if they exist. If you provide
.example.com as input, the returned list can include
*.example.com and any alternate domain names covered by that
wildcard (for example, www.example.com,
test.example.com, dev.example.com, and so on),
if they exist.
To list conflicting aliases, specify the alias to search and the ID of a standard distribution in your account that has an attached TLS certificate that includes the provided alias. For more information, including how to set up the standard distribution and certificate, see Moving an alternate domain name to a different standard distribution or distribution tenant in the Amazon CloudFront Developer Guide.
You can optionally specify the maximum number of items to receive in the
response. If the total number of items in the list exceeds the maximum
that you specify, or the default maximum, the response is paginated. To
get the next page of items, send a subsequent request that specifies the
NextMarker value from the current response as the
Marker value in the subsequent request.
May throw InvalidArgument.
May throw NoSuchDistribution.
Parameter alias :
The alias (also called a CNAME) to search for conflicting aliases.
Parameter distributionId :
The ID of a standard distribution in your account that has an attached TLS
certificate that includes the provided alias.
Parameter marker :
Use this field when paginating results to indicate where to begin in the
list of conflicting aliases. The response includes conflicting aliases in
the list that occur after the marker. To get the next page of the list,
set this field's value to the value of NextMarker from the
current page's response.
Parameter maxItems :
The maximum number of conflicting aliases that you want in the response.
Implementation
Future<ListConflictingAliasesResult> listConflictingAliases({
required String alias,
required String distributionId,
String? marker,
int? maxItems,
}) async {
_s.validateNumRange(
'maxItems',
maxItems,
0,
100,
);
final $query = <String, List<String>>{
'Alias': [alias],
'DistributionId': [distributionId],
if (marker != null) 'Marker': [marker],
if (maxItems != null) 'MaxItems': [maxItems.toString()],
};
final $result = await _protocol.sendRaw(
method: 'GET',
requestUri: '/2020-05-31/conflicting-alias',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return ListConflictingAliasesResult(
conflictingAliasesList: ConflictingAliasesList.fromXml($elem),
);
}