Skip to content

put_protocols_list

put_protocols_list(
    protocols_list: ProtocolsListData,
    *,
    config_overrides: Optional[FMSClientConfig] = None,
    tag_list: Optional[TagList] = None,
) -> PutProtocolsListResponse

Creates an Firewall Manager protocols list.

Parameters:

  • protocols_list (ProtocolsListData) –

    The details of the Firewall Manager protocols list to be created.

  • tag_list (Optional[TagList], default: None ) –

    The tags associated with the resource.

Raises:

  • InternalErrorException –

    The operation failed because of a system problem, even though the request was valid. Retry your request.

  • InvalidInputException –

    The parameters of the request were invalid.

  • InvalidOperationException –

    The operation failed because there was nothing to do or the operation wasn't possible. For example, you might have submitted an AssociateAdminAccount request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that's disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.

  • LimitExceededException –

    The operation exceeds a resource limit, for example, the maximum number of policy objects that you can create for an Amazon Web Services account. For more information, see Firewall Manager Limits in the WAF Developer Guide.

  • ResourceNotFoundException –

    The specified resource was not found.

  • UnknownServiceError –

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

Source code in docs_src/capo_fms/_services/fms.py
def put_protocols_list(
    self,
    protocols_list: "capo_fms.types.protocols_list_data.ProtocolsListData",
    *,
    config_overrides: Optional[FMSClientConfig] = None,
    tag_list: Optional["capo_fms.types.tag_list.TagList"] = None,
) -> "capo_fms.types.put_protocols_list_response.PutProtocolsListResponse":
    """<p>Creates an Firewall Manager protocols list.</p>

    Args:
        protocols_list: <p>The details of the Firewall Manager protocols list to be created.</p>
        tag_list: <p>The tags associated with the resource.</p>

    Raises:
        capo_fms.errors.internal_error_exception.InternalErrorException: <p>The operation failed because of a system problem, even though the request was valid. Retry your request.</p>
        capo_fms.errors.invalid_input_exception.InvalidInputException: <p>The parameters of the request were invalid.</p>
        capo_fms.errors.invalid_operation_exception.InvalidOperationException: <p>The operation failed because there was nothing to do or the operation wasn't possible. For example, you might have submitted an <code>AssociateAdminAccount</code> request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that's disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.</p>
        capo_fms.errors.limit_exceeded_exception.LimitExceededException: <p>The operation exceeds a resource limit, for example, the maximum number of <code>policy</code> objects that you can create for an Amazon Web Services account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html">Firewall Manager Limits</a> in the <i>WAF Developer Guide</i>.</p>
        capo_fms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_fms.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fms.types.put_protocols_list_request.PutProtocolsListRequest]",
    ) -> OperationResponse[
        "capo_fms.types.put_protocols_list_response.PutProtocolsListResponse"
    ]:
        import capo_fms._operations.awsfms_20180101.put_protocols_list

        output, http_response = (
            capo_fms._operations.awsfms_20180101.put_protocols_list.put_protocols_list(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutProtocolsList")
    )
    input_: capo_fms.types.put_protocols_list_request.PutProtocolsListRequest = {
        "protocols_list": protocols_list
    }
    if tag_list is not None:
        input_["tag_list"] = tag_list

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