Skip to content

describe_subnet_groups async

describe_subnet_groups(
    *,
    config_overrides: Optional[AsyncDAXClientConfig] = None,
    subnet_group_names: Optional[SubnetGroupNameList] = None,
    max_results: Optional[IntegerOptional] = None,
    next_token: Optional[String] = None,
) -> DescribeSubnetGroupsResponse

Returns a list of subnet group descriptions. If a subnet group name is specified, the list will contain only the description of that group.

Parameters:

  • subnet_group_names (Optional[SubnetGroupNameList], default: None ) –

    The name of the subnet group.

  • max_results (Optional[IntegerOptional], default: None ) –

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

    The value for MaxResults must be between 20 and 100.

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

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.

Raises:

Source code in docs_src/capo_dax/_services/async_dax.py
async def describe_subnet_groups(
    self,
    *,
    config_overrides: Optional[AsyncDAXClientConfig] = None,
    subnet_group_names: Optional[
        "capo_dax.types.subnet_group_name_list.SubnetGroupNameList"
    ] = None,
    max_results: Optional["capo_dax.types.integer_optional.IntegerOptional"] = None,
    next_token: Optional["capo_dax.types.string.String"] = None,
) -> "capo_dax.types.describe_subnet_groups_response.DescribeSubnetGroupsResponse":
    """<p>Returns a list of subnet group descriptions. If a subnet group name is specified, the list will contain only the description of that group.</p>

    Args:
        subnet_group_names: <p>The name of the subnet group.</p>
        max_results: <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p> <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
        next_token: <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>

    Raises:
        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.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_dax.types.describe_subnet_groups_request.DescribeSubnetGroupsRequest]",
    ) -> AsyncOperationResponse[
        "capo_dax.types.describe_subnet_groups_response.DescribeSubnetGroupsResponse"
    ]:
        import capo_dax._operations.amazon_daxv3.describe_subnet_groups

        (
            output,
            http_response,
        ) = await capo_dax._operations.amazon_daxv3.describe_subnet_groups.async_describe_subnet_groups(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeSubnetGroups")
    )
    input_: capo_dax.types.describe_subnet_groups_request.DescribeSubnetGroupsRequest = {}
    if subnet_group_names is not None:
        input_["subnet_group_names"] = subnet_group_names
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output