Skip to content

modify_ipam

modify_ipam(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    ipam_id: Optional[IpamId] = None,
    description: Optional[String] = None,
    add_operating_regions: Optional[AddIpamOperatingRegionSet] = None,
    remove_operating_regions: Optional[RemoveIpamOperatingRegionSet] = None,
    tier: Optional[IpamTier] = None,
    enable_private_gua: Optional[Boolean] = None,
    metered_account: Optional[IpamMeteredAccount] = None,
) -> ModifyIpamResult

Modify the configurations of an IPAM.

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.

  • ipam_id (Optional[IpamId], default: None ) –

    The ID of the IPAM you want to modify.

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

    The description of the IPAM you want to modify.

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

    Choose 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.

  • remove_operating_regions (Optional[RemoveIpamOperatingRegionSet], default: None ) –

    The operating Regions to remove.

  • 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 modify_ipam(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    ipam_id: Optional["capo_ec2.types.ipam_id.IpamId"] = None,
    description: Optional["capo_ec2.types.string.String"] = None,
    add_operating_regions: Optional[
        "capo_ec2.types.add_ipam_operating_region_set.AddIpamOperatingRegionSet"
    ] = None,
    remove_operating_regions: Optional[
        "capo_ec2.types.remove_ipam_operating_region_set.RemoveIpamOperatingRegionSet"
    ] = 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.modify_ipam_result.ModifyIpamResult":
    """<p>Modify the configurations of an IPAM. </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>
        ipam_id: <p>The ID of the IPAM you want to modify.</p>
        description: <p>The description of the IPAM you want to modify.</p>
        add_operating_regions: <p>Choose 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>
        remove_operating_regions: <p>The operating Regions to remove.</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.modify_ipam_request.ModifyIpamRequest]",
    ) -> OperationResponse["capo_ec2.types.modify_ipam_result.ModifyIpamResult"]:
        import capo_ec2._operations.amazon_ec2.modify_ipam

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyIpam")
    )
    input_: capo_ec2.types.modify_ipam_request.ModifyIpamRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if ipam_id is not None:
        input_["ipam_id"] = ipam_id
    if description is not None:
        input_["description"] = description
    if add_operating_regions is not None:
        input_["add_operating_regions"] = add_operating_regions
    if remove_operating_regions is not None:
        input_["remove_operating_regions"] = remove_operating_regions
    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