Skip to content

create_cidr_collection

create_cidr_collection(
    name: CollectionName,
    caller_reference: CidrNonce,
    *,
    config_overrides: Optional[Route53ClientConfig] = None,
) -> CreateCidrCollectionResponse

Creates a CIDR collection in the current Amazon Web Services account.

Parameters:

  • name (CollectionName) –

    A unique identifier for the account that can be used to reference the collection from other API calls.

  • caller_reference (CidrNonce) –

    A client-specific token that allows requests to be securely retried so that the intended outcome will only occur once, retries receive a similar response, and there are no additional edge cases to handle.

Raises:

  • CidrCollectionAlreadyExistsException –

    A CIDR collection with this name and a different caller reference already exists in this account.

  • ConcurrentModification –

    Another user submitted a request to create, update, or delete the object at the same time that you did. Retry the request.

  • InvalidInput –

    The input is not valid.

  • LimitsExceeded –

    This operation can't be completed because the current account has reached the limit on the resource you are trying to create. To request a higher limit, create a case with the Amazon Web Services Support Center.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_route_53/_services/route53.py
def create_cidr_collection(
    self,
    name: "capo_route_53.types.collection_name.CollectionName",
    caller_reference: "capo_route_53.types.cidr_nonce.CidrNonce",
    *,
    config_overrides: Optional[Route53ClientConfig] = None,
) -> "capo_route_53.types.create_cidr_collection_response.CreateCidrCollectionResponse":
    """<p>Creates a CIDR collection in the current Amazon Web Services account.</p>

    Args:
        name: <p>A unique identifier for the account that can be used to reference the collection from other API calls.</p>
        caller_reference: <p>A client-specific token that allows requests to be securely retried so that the intended outcome will only occur once, retries receive a similar response, and there are no additional edge cases to handle.</p>

    Raises:
        capo_route_53.errors.cidr_collection_already_exists_exception.CidrCollectionAlreadyExistsException: <p>A CIDR collection with this name and a different caller reference already exists in this account.</p>
        capo_route_53.errors.concurrent_modification.ConcurrentModification: <p>Another user submitted a request to create, update, or delete the object at the same time that you did. Retry the request. </p>
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
        capo_route_53.errors.limits_exceeded.LimitsExceeded: <p>This operation can't be completed because the current account has reached the limit on the resource you are trying to create. To request a higher limit, <a href="http://aws.amazon.com/route53-request">create a case</a> with the Amazon Web Services Support Center.</p>
        capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route_53.types.create_cidr_collection_request.CreateCidrCollectionRequest]",
    ) -> OperationResponse[
        "capo_route_53.types.create_cidr_collection_response.CreateCidrCollectionResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.create_cidr_collection

        output, http_response = (
            capo_route_53._operations.aws_dns_v20130401.create_cidr_collection.create_cidr_collection(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCidrCollection")
    )
    input_: capo_route_53.types.create_cidr_collection_request.CreateCidrCollectionRequest = {
        "name": name,
        "caller_reference": caller_reference,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output