# Address Maps ## List Address Maps `addressing.address_maps.list(AddressMapListParams**kwargs) -> SyncSinglePage[AddressMap]` **get** `/accounts/{account_id}/addressing/address_maps` List all address maps owned by the account. ### Parameters - `account_id: str` Identifier of a Cloudflare account. ### Returns - `class AddressMap: …` - `id: Optional[str]` Identifier of an Address Map. - `can_delete: Optional[bool]` If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. - `can_modify_ips: Optional[bool]` If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. - `created_at: Optional[datetime]` - `default_sni: Optional[str]` If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. - `description: Optional[str]` An optional description field which may be used to describe the types of IPs or zones on the map. - `enabled: Optional[bool]` Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. - `modified_at: Optional[datetime]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) page = client.addressing.address_maps.list( account_id="258def64c72dae45f3e4c8516e2111f2", ) page = page.result[0] print(page.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "055817b111884e0227e1be16a0be6ee0", "can_delete": true, "can_modify_ips": true, "created_at": "2014-01-01T05:20:00.12345Z", "default_sni": "*.example.com", "description": "My Ecommerce zones", "enabled": true, "modified_at": "2014-01-01T05:20:00.12345Z" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Address Map Details `addressing.address_maps.get(straddress_map_id, AddressMapGetParams**kwargs) -> AddressMapGetResponse` **get** `/accounts/{account_id}/addressing/address_maps/{address_map_id}` Show a particular address map owned by the account. ### Parameters - `account_id: str` Identifier of a Cloudflare account. - `address_map_id: str` Identifier of an Address Map. ### Returns - `class AddressMapGetResponse: …` - `id: Optional[str]` Identifier of an Address Map. - `can_delete: Optional[bool]` If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. - `can_modify_ips: Optional[bool]` If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. - `created_at: Optional[datetime]` - `default_sni: Optional[str]` If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. - `description: Optional[str]` An optional description field which may be used to describe the types of IPs or zones on the map. - `enabled: Optional[bool]` Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. - `ips: Optional[IPs]` The set of IPs on the Address Map. - `created_at: Optional[datetime]` - `ip: Optional[str]` An IPv4 or IPv6 address. - `memberships: Optional[List[Membership]]` Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. - `can_delete: Optional[bool]` Controls whether the membership can be deleted via the API or not. - `created_at: Optional[datetime]` - `identifier: Optional[str]` The identifier for the membership (eg. a zone or account tag). - `kind: Optional[Kind]` The type of the membership. - `"zone"` - `"account"` - `modified_at: Optional[datetime]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) address_map = client.addressing.address_maps.get( address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="258def64c72dae45f3e4c8516e2111f2", ) print(address_map.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "055817b111884e0227e1be16a0be6ee0", "can_delete": true, "can_modify_ips": true, "created_at": "2014-01-01T05:20:00.12345Z", "default_sni": "*.example.com", "description": "My Ecommerce zones", "enabled": true, "ips": [ { "created_at": "2014-01-01T05:20:00.12345Z", "ip": "192.0.2.1" } ], "memberships": [ { "can_delete": true, "created_at": "2014-01-01T05:20:00.12345Z", "identifier": "023e105f4ecef8ad9ca31a8372d0c353", "kind": "zone" } ], "modified_at": "2014-01-01T05:20:00.12345Z" } } ``` ## Create Address Map `addressing.address_maps.create(AddressMapCreateParams**kwargs) -> AddressMapCreateResponse` **post** `/accounts/{account_id}/addressing/address_maps` Create a new address map under the account. ### Parameters - `account_id: str` Identifier of a Cloudflare account. - `description: Optional[str]` An optional description field which may be used to describe the types of IPs or zones on the map. - `enabled: Optional[bool]` Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. - `ips: Optional[SequenceNotStr[str]]` - `memberships: Optional[Iterable[Membership]]` Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. - `identifier: Optional[str]` The identifier for the membership (eg. a zone or account tag). - `kind: Optional[Kind]` The type of the membership. - `"zone"` - `"account"` ### Returns - `class AddressMapCreateResponse: …` - `id: Optional[str]` Identifier of an Address Map. - `can_delete: Optional[bool]` If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. - `can_modify_ips: Optional[bool]` If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. - `created_at: Optional[datetime]` - `default_sni: Optional[str]` If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. - `description: Optional[str]` An optional description field which may be used to describe the types of IPs or zones on the map. - `enabled: Optional[bool]` Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. - `ips: Optional[IPs]` The set of IPs on the Address Map. - `created_at: Optional[datetime]` - `ip: Optional[str]` An IPv4 or IPv6 address. - `memberships: Optional[List[Membership]]` Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. - `can_delete: Optional[bool]` Controls whether the membership can be deleted via the API or not. - `created_at: Optional[datetime]` - `identifier: Optional[str]` The identifier for the membership (eg. a zone or account tag). - `kind: Optional[Kind]` The type of the membership. - `"zone"` - `"account"` - `modified_at: Optional[datetime]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) address_map = client.addressing.address_maps.create( account_id="258def64c72dae45f3e4c8516e2111f2", ) print(address_map.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "055817b111884e0227e1be16a0be6ee0", "can_delete": true, "can_modify_ips": true, "created_at": "2014-01-01T05:20:00.12345Z", "default_sni": "*.example.com", "description": "My Ecommerce zones", "enabled": true, "ips": [ { "created_at": "2014-01-01T05:20:00.12345Z", "ip": "192.0.2.1" } ], "memberships": [ { "can_delete": true, "created_at": "2014-01-01T05:20:00.12345Z", "identifier": "023e105f4ecef8ad9ca31a8372d0c353", "kind": "zone" } ], "modified_at": "2014-01-01T05:20:00.12345Z" } } ``` ## Update Address Map `addressing.address_maps.edit(straddress_map_id, AddressMapEditParams**kwargs) -> AddressMap` **patch** `/accounts/{account_id}/addressing/address_maps/{address_map_id}` Modify properties of an address map owned by the account. ### Parameters - `account_id: str` Identifier of a Cloudflare account. - `address_map_id: str` Identifier of an Address Map. - `default_sni: Optional[str]` If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. - `description: Optional[str]` An optional description field which may be used to describe the types of IPs or zones on the map. - `enabled: Optional[bool]` Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. ### Returns - `class AddressMap: …` - `id: Optional[str]` Identifier of an Address Map. - `can_delete: Optional[bool]` If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. - `can_modify_ips: Optional[bool]` If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. - `created_at: Optional[datetime]` - `default_sni: Optional[str]` If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. - `description: Optional[str]` An optional description field which may be used to describe the types of IPs or zones on the map. - `enabled: Optional[bool]` Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. - `modified_at: Optional[datetime]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) address_map = client.addressing.address_maps.edit( address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="258def64c72dae45f3e4c8516e2111f2", ) print(address_map.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "055817b111884e0227e1be16a0be6ee0", "can_delete": true, "can_modify_ips": true, "created_at": "2014-01-01T05:20:00.12345Z", "default_sni": "*.example.com", "description": "My Ecommerce zones", "enabled": true, "modified_at": "2014-01-01T05:20:00.12345Z" } } ``` ## Delete Address Map `addressing.address_maps.delete(straddress_map_id, AddressMapDeleteParams**kwargs) -> AddressMapDeleteResponse` **delete** `/accounts/{account_id}/addressing/address_maps/{address_map_id}` Delete a particular address map owned by the account. An Address Map must be disabled before it can be deleted. ### Parameters - `account_id: str` Identifier of a Cloudflare account. - `address_map_id: str` Identifier of an Address Map. ### Returns - `class AddressMapDeleteResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) address_map = client.addressing.address_maps.delete( address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="258def64c72dae45f3e4c8516e2111f2", ) print(address_map.errors) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Domain Types ### Address Map - `class AddressMap: …` - `id: Optional[str]` Identifier of an Address Map. - `can_delete: Optional[bool]` If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. - `can_modify_ips: Optional[bool]` If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. - `created_at: Optional[datetime]` - `default_sni: Optional[str]` If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. - `description: Optional[str]` An optional description field which may be used to describe the types of IPs or zones on the map. - `enabled: Optional[bool]` Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. - `modified_at: Optional[datetime]` ### Kind - `Literal["zone", "account"]` The type of the membership. - `"zone"` - `"account"` ### Address Map Get Response - `class AddressMapGetResponse: …` - `id: Optional[str]` Identifier of an Address Map. - `can_delete: Optional[bool]` If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. - `can_modify_ips: Optional[bool]` If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. - `created_at: Optional[datetime]` - `default_sni: Optional[str]` If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. - `description: Optional[str]` An optional description field which may be used to describe the types of IPs or zones on the map. - `enabled: Optional[bool]` Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. - `ips: Optional[IPs]` The set of IPs on the Address Map. - `created_at: Optional[datetime]` - `ip: Optional[str]` An IPv4 or IPv6 address. - `memberships: Optional[List[Membership]]` Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. - `can_delete: Optional[bool]` Controls whether the membership can be deleted via the API or not. - `created_at: Optional[datetime]` - `identifier: Optional[str]` The identifier for the membership (eg. a zone or account tag). - `kind: Optional[Kind]` The type of the membership. - `"zone"` - `"account"` - `modified_at: Optional[datetime]` ### Address Map Create Response - `class AddressMapCreateResponse: …` - `id: Optional[str]` Identifier of an Address Map. - `can_delete: Optional[bool]` If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. - `can_modify_ips: Optional[bool]` If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. - `created_at: Optional[datetime]` - `default_sni: Optional[str]` If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account. - `description: Optional[str]` An optional description field which may be used to describe the types of IPs or zones on the map. - `enabled: Optional[bool]` Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. - `ips: Optional[IPs]` The set of IPs on the Address Map. - `created_at: Optional[datetime]` - `ip: Optional[str]` An IPv4 or IPv6 address. - `memberships: Optional[List[Membership]]` Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. - `can_delete: Optional[bool]` Controls whether the membership can be deleted via the API or not. - `created_at: Optional[datetime]` - `identifier: Optional[str]` The identifier for the membership (eg. a zone or account tag). - `kind: Optional[Kind]` The type of the membership. - `"zone"` - `"account"` - `modified_at: Optional[datetime]` ### Address Map Delete Response - `class AddressMapDeleteResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. # Accounts ## Add an account membership to an Address Map `addressing.address_maps.accounts.update(straddress_map_id, AccountUpdateParams**kwargs) -> AccountUpdateResponse` **put** `/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}` Add an account as a member of a particular address map. ### Parameters - `account_id: str` Identifier of a Cloudflare account. - `address_map_id: str` Identifier of an Address Map. - `body: object` ### Returns - `class AccountUpdateResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) account = client.addressing.address_maps.accounts.update( address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) print(account.errors) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Remove an account membership from an Address Map `addressing.address_maps.accounts.delete(straddress_map_id, AccountDeleteParams**kwargs) -> AccountDeleteResponse` **delete** `/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}` Remove an account as a member of a particular address map. ### Parameters - `account_id: str` Identifier of a Cloudflare account. - `address_map_id: str` Identifier of an Address Map. ### Returns - `class AccountDeleteResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) account = client.addressing.address_maps.accounts.delete( address_map_id="055817b111884e0227e1be16a0be6ee0", account_id="258def64c72dae45f3e4c8516e2111f2", ) print(account.errors) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Domain Types ### Account Update Response - `class AccountUpdateResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. ### Account Delete Response - `class AccountDeleteResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. # IPs ## Add an IP to an Address Map `addressing.address_maps.ips.update(strip_address, IPUpdateParams**kwargs) -> IPUpdateResponse` **put** `/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}` Add an IP from a prefix owned by the account to a particular address map. ### Parameters - `account_id: str` Identifier of a Cloudflare account. - `address_map_id: str` Identifier of an Address Map. - `ip_address: str` An IPv4 or IPv6 address. - `body: object` ### Returns - `class IPUpdateResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) ip = client.addressing.address_maps.ips.update( ip_address="192.0.2.1", account_id="258def64c72dae45f3e4c8516e2111f2", address_map_id="055817b111884e0227e1be16a0be6ee0", body={}, ) print(ip.errors) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Remove an IP from an Address Map `addressing.address_maps.ips.delete(strip_address, IPDeleteParams**kwargs) -> IPDeleteResponse` **delete** `/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}` Remove an IP from a particular address map. ### Parameters - `account_id: str` Identifier of a Cloudflare account. - `address_map_id: str` Identifier of an Address Map. - `ip_address: str` An IPv4 or IPv6 address. ### Returns - `class IPDeleteResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) ip = client.addressing.address_maps.ips.delete( ip_address="192.0.2.1", account_id="258def64c72dae45f3e4c8516e2111f2", address_map_id="055817b111884e0227e1be16a0be6ee0", ) print(ip.errors) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Domain Types ### IP Update Response - `class IPUpdateResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. ### IP Delete Response - `class IPDeleteResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. # Zones ## Add a zone membership to an Address Map `addressing.address_maps.zones.update(straddress_map_id, ZoneUpdateParams**kwargs) -> ZoneUpdateResponse` **put** `/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{zone_id}` Add a zone as a member of a particular address map. ### Parameters - `zone_id: str` Identifier of a zone. - `account_id: str` Identifier of a Cloudflare account. - `address_map_id: str` Identifier of an Address Map. - `body: object` ### Returns - `class ZoneUpdateResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) zone = client.addressing.address_maps.zones.update( address_map_id="055817b111884e0227e1be16a0be6ee0", zone_id="8ac8489932db6327334c9b6d58544cfe", account_id="258def64c72dae45f3e4c8516e2111f2", body={}, ) print(zone.errors) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Remove a zone membership from an Address Map `addressing.address_maps.zones.delete(straddress_map_id, ZoneDeleteParams**kwargs) -> ZoneDeleteResponse` **delete** `/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{zone_id}` Remove a zone as a member of a particular address map. ### Parameters - `zone_id: str` Identifier of a zone. - `account_id: str` Identifier of a Cloudflare account. - `address_map_id: str` Identifier of an Address Map. ### Returns - `class ZoneDeleteResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted ) zone = client.addressing.address_maps.zones.delete( address_map_id="055817b111884e0227e1be16a0be6ee0", zone_id="8ac8489932db6327334c9b6d58544cfe", account_id="258def64c72dae45f3e4c8516e2111f2", ) print(zone.errors) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ``` ## Domain Types ### Zone Update Response - `class ZoneUpdateResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters. ### Zone Delete Response - `class ZoneDeleteResponse: …` - `errors: List[Error]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[ErrorSource]` - `pointer: Optional[str]` - `messages: List[Message]` - `code: int` - `message: str` - `documentation_url: Optional[str]` - `source: Optional[MessageSource]` - `pointer: Optional[str]` - `success: Literal[true]` Whether the API call was successful. - `true` - `result_info: Optional[ResultInfo]` - `count: Optional[float]` Total number of results for the requested service. - `page: Optional[float]` Current page within paginated list of results. - `per_page: Optional[float]` Number of results per page of results. - `total_count: Optional[float]` Total results available without any search parameters.