Skip to content

get_byte_match_set async

get_byte_match_set(
    byte_match_set_id: ResourceId,
    *,
    config_overrides: Optional[AsyncWAFClientConfig] = None,
) -> GetByteMatchSetResponse

This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.

For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

Returns the ByteMatchSet specified by ByteMatchSetId.

Parameters:

Raises:

Examples:

To get a byte match set The following example returns the details of a byte match set with the ID exampleIDs3t-46da-4fdb-b8d5-abc321j569j5.

>>> await client.get_byte_match_set(byte_match_set_id='exampleIDs3t-46da-4fdb-b8d5-abc321j569j5')
Source code in docs_src/capo_waf/_services/async_waf.py
async def get_byte_match_set(
    self,
    byte_match_set_id: "capo_waf.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[AsyncWAFClientConfig] = None,
) -> "capo_waf.types.get_byte_match_set_response.GetByteMatchSetResponse":
    """<note> <p>This is <b>AWS WAF Classic</b> documentation. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html">AWS WAF Classic</a> in the developer guide.</p> <p> <b>For the latest version of AWS WAF</b>, use the AWS WAFV2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a>. With the latest version, AWS WAF has a single set of endpoints for regional and global use. </p> </note> <p>Returns the <a>ByteMatchSet</a> specified by <code>ByteMatchSetId</code>.</p>

    Args:
        byte_match_set_id: <p>The <code>ByteMatchSetId</code> of the <a>ByteMatchSet</a> that you want to get. <code>ByteMatchSetId</code> is returned by <a>CreateByteMatchSet</a> and by <a>ListByteMatchSets</a>.</p>

    Raises:
        capo_waf.errors.waf_internal_error_exception.WAFInternalErrorException: <p>The operation failed because of a system problem, even though the request was valid. Retry your request.</p>
        capo_waf.errors.waf_invalid_account_exception.WAFInvalidAccountException: <p>The operation failed because you tried to create, update, or delete an object by using an invalid account identifier.</p>
        capo_waf.errors.waf_nonexistent_item_exception.WAFNonexistentItemException: <p>The operation failed because the referenced object doesn't exist.</p>
        capo_waf.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To get a byte match set
        The following example returns the details of a byte match set with the ID exampleIDs3t-46da-4fdb-b8d5-abc321j569j5.

        >>> await client.get_byte_match_set(byte_match_set_id='exampleIDs3t-46da-4fdb-b8d5-abc321j569j5')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_waf.types.get_byte_match_set_request.GetByteMatchSetRequest]",
    ) -> AsyncOperationResponse[
        "capo_waf.types.get_byte_match_set_response.GetByteMatchSetResponse"
    ]:
        import capo_waf._operations.awswaf_20150824.get_byte_match_set

        (
            output,
            http_response,
        ) = await capo_waf._operations.awswaf_20150824.get_byte_match_set.async_get_byte_match_set(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetByteMatchSet")
    )
    input_: capo_waf.types.get_byte_match_set_request.GetByteMatchSetRequest = {
        "byte_match_set_id": byte_match_set_id
    }

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