set_ip_address_type
async
¶
set_ip_address_type(
resource_type: ResourceType,
resource_name: ResourceName,
ip_address_type: IpAddressType,
*,
config_overrides: Optional[AsyncLightsailClientConfig] = None,
accept_bundle_update: Optional[boolean] = None,
) -> SetIpAddressTypeResult
Sets the IP address type for an Amazon Lightsail resource.
Use this action to enable dual-stack for a resource, which enables IPv4 and IPv6 for the specified resource. Alternately, you can use this action to disable dual-stack, and enable IPv4 only.
Parameters:
-
resource_type(ResourceType) –The resource type.
The resource values are
Distribution,Instance, andLoadBalancer.Distribution-related APIs are available only in the N. Virginia (
us-east-1) Amazon Web Services Region. Set your Amazon Web Services Region configuration tous-east-1to create, view, or edit distributions. -
resource_name(ResourceName) –The name of the resource for which to set the IP address type.
-
ip_address_type(IpAddressType) –The IP address type to set for the specified resource.
The possible values are
ipv4for IPv4 only,ipv6for IPv6 only, anddualstackfor IPv4 and IPv6. -
accept_bundle_update(Optional[boolean], default:None) –Required parameter to accept the instance bundle update when changing to, and from, IPv6-only.
An instance bundle will change when switching from
dual-stackoripv4, toipv6. It also changes when switching fromipv6, todual-stackoripv4.You must include this parameter in the command to update the bundle. For example, if you switch from
dual-stacktoipv6, the bundle will be updated, and billing for the IPv6-only instance bundle begins immediately.
Raises:
-
AccessDeniedException–Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.
-
AccountSetupInProgressException–Lightsail throws this exception when an account is still in the setup in progress state.
-
InvalidInputException–Lightsail throws this exception when user input does not conform to the validation rules of an input field.
Domain and distribution APIs are only available in the N. Virginia (
us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration tous-east-1to create, view, or edit these resources. -
NotFoundException–Lightsail throws this exception when it cannot find a resource.
-
OperationFailureException–Lightsail throws this exception when an operation fails to execute.
-
RegionSetupInProgressException–Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up.
-
ServiceException–A general service exception.
-
UnauthenticatedException–Lightsail throws this exception when the user has not been authenticated.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lightsail/_services/async_lightsail.py
8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 | |