createDistributionWithTags2018_06_18 method

Future<CreateDistributionWithTagsResult> createDistributionWithTags2018_06_18(
  1. {@required DistributionConfigWithTags distributionConfigWithTags}
)

Create a new distribution with tags.

May throw CNAMEAlreadyExists. May throw DistributionAlreadyExists. May throw InvalidOrigin. May throw InvalidOriginAccessIdentity. May throw AccessDenied. May throw TooManyTrustedSigners. May throw TrustedSignerDoesNotExist. May throw InvalidViewerCertificate. May throw InvalidMinimumProtocolVersion. May throw MissingBody. May throw TooManyDistributionCNAMEs. May throw TooManyDistributions. May throw InvalidDefaultRootObject. May throw InvalidRelativePath. May throw InvalidErrorCode. May throw InvalidResponseCode. May throw InvalidArgument. May throw InvalidRequiredProtocol. May throw NoSuchOrigin. May throw TooManyOrigins. May throw TooManyCacheBehaviors. May throw TooManyCookieNamesInWhiteList. May throw InvalidForwardCookies. May throw TooManyHeadersInForwardedValues. May throw InvalidHeadersForS3Origin. May throw InconsistentQuantities. May throw TooManyCertificates. May throw InvalidLocationCode. May throw InvalidGeoRestrictionParameter. May throw InvalidProtocolSettings. May throw InvalidTTLOrder. May throw InvalidWebACLId. May throw TooManyOriginCustomHeaders. May throw InvalidTagging. May throw TooManyQueryStringParameters. May throw InvalidQueryStringParameters. May throw TooManyDistributionsWithLambdaAssociations. May throw TooManyLambdaFunctionAssociations. May throw InvalidLambdaFunctionAssociation. May throw InvalidOriginReadTimeout. May throw InvalidOriginKeepaliveTimeout. May throw NoSuchFieldLevelEncryptionConfig. May throw IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior. May throw TooManyDistributionsAssociatedToFieldLevelEncryptionConfig.

Parameter distributionConfigWithTags : The distribution's configuration information.

Implementation

Future<CreateDistributionWithTagsResult>
    createDistributionWithTags2018_06_18({
  @_s.required DistributionConfigWithTags distributionConfigWithTags,
}) async {
  ArgumentError.checkNotNull(
      distributionConfigWithTags, 'distributionConfigWithTags');
  final $result = await _protocol.sendRaw(
    method: 'POST',
    requestUri: '/2018-06-18/distribution?WithTags',
    payload: distributionConfigWithTags.toXml('DistributionConfigWithTags'),
    exceptionFnMap: _exceptionFns,
  );
  final $elem = await _s.xmlFromResponse($result);
  return CreateDistributionWithTagsResult(
    distribution: Distribution.fromXml($elem),
    eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
    location: _s.extractHeaderStringValue($result.headers, 'Location'),
  );
}