Modifies an existing subnet group.
Parameters:
-
subnet_group_name
(String)
–
The name of the subnet group.
-
description
(Optional[String], default:
None
)
–
A description of the subnet group.
-
subnet_ids
(Optional[SubnetIdentifierList], default:
None
)
–
A list of subnet IDs in the subnet group.
Raises:
-
InvalidSubnet
–
An invalid subnet identifier was specified.
-
ServiceLinkedRoleNotFoundFault
–
The specified service linked role (SLR) was not found.
-
SubnetGroupNotFoundFault
–
The requested subnet group name does not refer to an existing subnet group.
-
SubnetInUse
–
The requested subnet is being used by another subnet group.
-
SubnetNotAllowedFault
–
The specified subnet can't be used for the requested network type. This error occurs when either there aren't enough subnets of the required network type to create the cluster, or when you try to use a subnet that doesn't support the requested network type (for example, trying to create a dual-stack cluster with a subnet that doesn't have IPv6 CIDR).
-
SubnetQuotaExceededFault
–
The request cannot be processed because it would exceed the allowed number of subnets in a subnet group.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_dax/_services/dax.py
| def update_subnet_group(
self,
subnet_group_name: "capo_dax.types.string.String",
*,
config_overrides: Optional[DAXClientConfig] = None,
description: Optional["capo_dax.types.string.String"] = None,
subnet_ids: Optional[
"capo_dax.types.subnet_identifier_list.SubnetIdentifierList"
] = None,
) -> "capo_dax.types.update_subnet_group_response.UpdateSubnetGroupResponse":
"""<p>Modifies an existing subnet group.</p>
Args:
subnet_group_name: <p>The name of the subnet group.</p>
description: <p>A description of the subnet group.</p>
subnet_ids: <p>A list of subnet IDs in the subnet group.</p>
Raises:
capo_dax.errors.invalid_subnet.InvalidSubnet: <p>An invalid subnet identifier was specified.</p>
capo_dax.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The specified service linked role (SLR) was not found.</p>
capo_dax.errors.subnet_group_not_found_fault.SubnetGroupNotFoundFault: <p>The requested subnet group name does not refer to an existing subnet group.</p>
capo_dax.errors.subnet_in_use.SubnetInUse: <p>The requested subnet is being used by another subnet group.</p>
capo_dax.errors.subnet_not_allowed_fault.SubnetNotAllowedFault: <p>The specified subnet can't be used for the requested network type. This error occurs when either there aren't enough subnets of the required network type to create the cluster, or when you try to use a subnet that doesn't support the requested network type (for example, trying to create a dual-stack cluster with a subnet that doesn't have IPv6 CIDR). </p>
capo_dax.errors.subnet_quota_exceeded_fault.SubnetQuotaExceededFault: <p>The request cannot be processed because it would exceed the allowed number of subnets in a subnet group.</p>
capo_dax.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_dax.types.update_subnet_group_request.UpdateSubnetGroupRequest]",
) -> OperationResponse[
"capo_dax.types.update_subnet_group_response.UpdateSubnetGroupResponse"
]:
import capo_dax._operations.amazon_daxv3.update_subnet_group
output, http_response = (
capo_dax._operations.amazon_daxv3.update_subnet_group.update_subnet_group(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateSubnetGroup")
)
input_: capo_dax.types.update_subnet_group_request.UpdateSubnetGroupRequest = {
"subnet_group_name": subnet_group_name
}
if description is not None:
input_["description"] = description
if subnet_ids is not None:
input_["subnet_ids"] = subnet_ids
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|