Skip to content

describe_flow_operation

describe_flow_operation(
    firewall_arn: ResourceArn,
    flow_operation_id: FlowOperationId,
    *,
    config_overrides: Optional[NetworkFirewallClientConfig] = None,
    availability_zone: Optional[AvailabilityZone] = None,
    availability_zone_id: Optional[AvailabilityZoneId] = None,
    vpc_endpoint_association_arn: Optional[ResourceArn] = None,
    vpc_endpoint_id: Optional[VpcEndpointId] = None,
) -> DescribeFlowOperationResponse

Returns key information about a specific flow operation.

Parameters:

  • firewall_arn (ResourceArn) –

    The Amazon Resource Name (ARN) of the firewall.

  • availability_zone (Optional[AvailabilityZone], default: None ) –

    The name of the Availability Zone where the firewall is located. For example, us-east-2a.

    Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.

  • availability_zone_id (Optional[AvailabilityZoneId], default: None ) –

    The ID of the Availability Zone where the firewall is located. For example, use2-az1. Availability Zone IDs are the same in every Amazon Web Services account, so use this parameter when you coordinate resources across accounts. Specify either AvailabilityZone or AvailabilityZoneId, not both. If you specify both, the request fails.

  • vpc_endpoint_association_arn (Optional[ResourceArn], default: None ) –

    The Amazon Resource Name (ARN) of a VPC endpoint association.

  • vpc_endpoint_id (Optional[VpcEndpointId], default: None ) –

    A unique identifier for the primary endpoint associated with a firewall.

  • flow_operation_id (FlowOperationId) –

    A unique identifier for the flow operation. This ID is returned in the responses to start and list commands. You provide to describe commands.

Raises:

  • InternalServerError –

    Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request.

  • InvalidRequestException –

    The operation failed because of a problem with your request. Examples include:

    • You specified an unsupported parameter name or value.

    • You tried to update a property with a value that isn't among the available types.

    • Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.

  • ResourceNotFoundException –

    Unable to locate a resource using the parameters that you provided.

  • ThrottlingException –

    Unable to process the request due to throttling limitations.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_network_firewall/_services/network_firewall.py
def describe_flow_operation(
    self,
    firewall_arn: "capo_network_firewall.types.resource_arn.ResourceArn",
    flow_operation_id: "capo_network_firewall.types.flow_operation_id.FlowOperationId",
    *,
    config_overrides: Optional[NetworkFirewallClientConfig] = None,
    availability_zone: Optional[
        "capo_network_firewall.types.availability_zone.AvailabilityZone"
    ] = None,
    availability_zone_id: Optional[
        "capo_network_firewall.types.availability_zone_id.AvailabilityZoneId"
    ] = None,
    vpc_endpoint_association_arn: Optional[
        "capo_network_firewall.types.resource_arn.ResourceArn"
    ] = None,
    vpc_endpoint_id: Optional[
        "capo_network_firewall.types.vpc_endpoint_id.VpcEndpointId"
    ] = None,
) -> "capo_network_firewall.types.describe_flow_operation_response.DescribeFlowOperationResponse":
    """<p>Returns key information about a specific flow operation.</p>

    Args:
        firewall_arn: <p>The Amazon Resource Name (ARN) of the firewall.</p>
        availability_zone: <p>The name of the Availability Zone where the firewall is located. For example, <code>us-east-2a</code>.</p> <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
        availability_zone_id: <p>The ID of the Availability Zone where the firewall is located. For example, <code>use2-az1</code>. Availability Zone IDs are the same in every Amazon Web Services account, so use this parameter when you coordinate resources across accounts. Specify either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code>, not both. If you specify both, the request fails.</p>
        vpc_endpoint_association_arn: <p>The Amazon Resource Name (ARN) of a VPC endpoint association.</p>
        vpc_endpoint_id: <p>A unique identifier for the primary endpoint associated with a firewall.</p>
        flow_operation_id: <p>A unique identifier for the flow operation. This ID is returned in the responses to start and list commands. You provide to describe commands.</p>

    Raises:
        capo_network_firewall.errors.internal_server_error.InternalServerError: <p>Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request. </p>
        capo_network_firewall.errors.invalid_request_exception.InvalidRequestException: <p>The operation failed because of a problem with your request. Examples include: </p> <ul> <li> <p>You specified an unsupported parameter name or value.</p> </li> <li> <p>You tried to update a property with a value that isn't among the available types.</p> </li> <li> <p>Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.</p> </li> </ul>
        capo_network_firewall.errors.resource_not_found_exception.ResourceNotFoundException: <p>Unable to locate a resource using the parameters that you provided.</p>
        capo_network_firewall.errors.throttling_exception.ThrottlingException: <p>Unable to process the request due to throttling limitations.</p>
        capo_network_firewall.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_network_firewall.types.describe_flow_operation_request.DescribeFlowOperationRequest]",
    ) -> OperationResponse[
        "capo_network_firewall.types.describe_flow_operation_response.DescribeFlowOperationResponse"
    ]:
        if req.options.protocol == "awsJson1_0":
            import capo_network_firewall._operations.network_firewall_20201112.aws_json1_0.describe_flow_operation

            output, http_response = (
                capo_network_firewall._operations.network_firewall_20201112.aws_json1_0.describe_flow_operation.describe_flow_operation(
                    req.options, req.input
                )
            )
        elif req.options.protocol == "rpcv2Cbor":
            import capo_network_firewall._operations.network_firewall_20201112.rpcv2_cbor.describe_flow_operation

            output, http_response = (
                capo_network_firewall._operations.network_firewall_20201112.rpcv2_cbor.describe_flow_operation.describe_flow_operation(
                    req.options, req.input
                )
            )
        else:
            raise ValueError(f"unknown protocol {req.options.protocol!r}")
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeFlowOperation")
    )
    input_: capo_network_firewall.types.describe_flow_operation_request.DescribeFlowOperationRequest = {
        "firewall_arn": firewall_arn,
        "flow_operation_id": flow_operation_id,
    }
    if availability_zone is not None:
        input_["availability_zone"] = availability_zone
    if availability_zone_id is not None:
        input_["availability_zone_id"] = availability_zone_id
    if vpc_endpoint_association_arn is not None:
        input_["vpc_endpoint_association_arn"] = vpc_endpoint_association_arn
    if vpc_endpoint_id is not None:
        input_["vpc_endpoint_id"] = vpc_endpoint_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output