Skip to content

create_ipam

create_ipam(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    description: Optional[String] = None,
    operating_regions: Optional[AddIpamOperatingRegionSet] = None,
    tag_specifications: Optional[TagSpecificationList] = None,
    client_token: Optional[String] = None,
    tier: Optional[IpamTier] = None,
    enable_private_gua: Optional[Boolean] = None,
    metered_account: Optional[IpamMeteredAccount] = None,
) -> CreateIpamResult

Create an IPAM. Amazon VPC IP Address Manager (IPAM) is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization.

For more information, see Create an IPAM in the Amazon VPC IPAM User Guide.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • description (Optional[String], default: None ) –

    A description for the IPAM.

  • operating_regions (Optional[AddIpamOperatingRegionSet], default: None ) –

    The operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

    For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide.

  • tag_specifications (Optional[TagSpecificationList], default: None ) –

    The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

  • client_token (Optional[String], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

  • tier (Optional[IpamTier], default: None ) –

    IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see Amazon VPC pricing > IPAM tab.

  • enable_private_gua (Optional[Boolean], default: None ) –

    Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.

  • metered_account (Optional[IpamMeteredAccount], default: None ) –

    A metered account is an Amazon Web Services account that is charged for active IP addresses managed in IPAM. For more information, see Enable cost distribution in the Amazon VPC IPAM User Guide.

    Possible values:

    • ipam-owner (default): The Amazon Web Services account which owns the IPAM is charged for all active IP addresses managed in IPAM.

    • resource-owner: The Amazon Web Services account that owns the IP address is charged for the active IP address.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def create_ipam(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    description: Optional["capo_ec2.types.string.String"] = None,
    operating_regions: Optional[
        "capo_ec2.types.add_ipam_operating_region_set.AddIpamOperatingRegionSet"
    ] = None,
    tag_specifications: Optional[
        "capo_ec2.types.tag_specification_list.TagSpecificationList"
    ] = None,
    client_token: Optional["capo_ec2.types.string.String"] = None,
    tier: Optional["capo_ec2.types.ipam_tier.IpamTier"] = None,
    enable_private_gua: Optional["capo_ec2.types.boolean.Boolean"] = None,
    metered_account: Optional[
        "capo_ec2.types.ipam_metered_account.IpamMeteredAccount"
    ] = None,
) -> "capo_ec2.types.create_ipam_result.CreateIpamResult":
    """<p>Create an IPAM. Amazon VPC IP Address Manager (IPAM) is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>

    Args:
        dry_run: <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        description: <p>A description for the IPAM.</p>
        operating_regions: <p>The operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions. </p> <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>. </p>
        tag_specifications: <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p>
        tier: <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing > IPAM tab</a>.</p>
        enable_private_gua: <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
        metered_account: <p>A metered account is an Amazon Web Services account that is charged for active IP addresses managed in IPAM. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/ipam-enable-cost-distro.html">Enable cost distribution</a> in the <i>Amazon VPC IPAM User Guide</i>.</p> <p>Possible values:</p> <ul> <li> <p> <code>ipam-owner</code> (default): The Amazon Web Services account which owns the IPAM is charged for all active IP addresses managed in IPAM.</p> </li> <li> <p> <code>resource-owner</code>: The Amazon Web Services account that owns the IP address is charged for the active IP address.</p> </li> </ul>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ec2.types.create_ipam_request.CreateIpamRequest]",
    ) -> OperationResponse["capo_ec2.types.create_ipam_result.CreateIpamResult"]:
        import capo_ec2._operations.amazon_ec2.create_ipam

        output, http_response = (
            capo_ec2._operations.amazon_ec2.create_ipam.create_ipam(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateIpam")
    )
    input_: capo_ec2.types.create_ipam_request.CreateIpamRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if description is not None:
        input_["description"] = description
    if operating_regions is not None:
        input_["operating_regions"] = operating_regions
    if tag_specifications is not None:
        input_["tag_specifications"] = tag_specifications
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tier is not None:
        input_["tier"] = tier
    if enable_private_gua is not None:
        input_["enable_private_gua"] = enable_private_gua
    if metered_account is not None:
        input_["metered_account"] = metered_account

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