original_docstring: r"""Creates a new exclusion in a specified parent
          resource. Only log entries belonging to that resource
          can be excluded. You can have up to 10 exclusions in a
          resource.
  
          Args:
              request (Union[google.cloud.logging_v2.types.CreateExclusionRequest, dict]):
                  The request object. The parameters to `CreateExclusion`.
              parent (:class:`str`):
                  Required. The parent resource in which to create the
                  exclusion:
  
                  ::
  
                      "projects/[PROJECT_ID]"
                      "organizations/[ORGANIZATION_ID]"
                      "billingAccounts/[BILLING_ACCOUNT_ID]"
                      "folders/[FOLDER_ID]"
  
                  Examples: ``"projects/my-logging-project"``,
                  ``"organizations/123456789"``.
  
                  This corresponds to the ``parent`` field
                  on the ``request`` instance; if ``request`` is provided, this
                  should not be set.
              exclusion (:class:`google.cloud.logging_v2.types.LogExclusion`):
                  Required. The new exclusion, whose ``name`` parameter is
                  an exclusion name that is not already used in the parent
                  resource.
  
                  This corresponds to the ``exclusion`` field
                  on the ``request`` instance; if ``request`` is provided, this
                  should not be set.
              retry (google.api_core.retry.Retry): Designation of what errors, if any,
                  should be retried.
              timeout (float): The timeout for this request.
              metadata (Sequence[Tuple[str, str]]): Strings which should be
                  sent along with the request as metadata.
  
          Returns:
              google.cloud.logging_v2.types.LogExclusion:
                  Specifies a set of log entries that
                  are not to be stored in Logging. If your
                  GCP resource receives a large volume of
                  logs, you can use exclusions to reduce
                  your chargeable logs. Exclusions are
                  processed after log sinks, so you can
                  export log entries before they are
                  excluded. Note that organization-level
                  and folder-level exclusions don't apply
                  to child resources, and that you can't
                  exclude audit log entries.
  
          
docstring: r"""Creates a new exclusion in a specified parent
  resource. Only log entries belonging to that resource
  can be excluded. You can have up to 10 exclusions in a
  resource.
docstring_tokens: r " " " Creates a new exclusion in a specified parent resource . Only log entries belonging to that resource can be excluded . You can have up to 10 exclusions in a resource .
code: async def create_exclusion(self,
              request: Union[logging_config.CreateExclusionRequest, dict] = None,
              *,
              parent: str = None,
              exclusion: logging_config.LogExclusion = None,
              retry: OptionalRetry = gapic_v1.method.DEFAULT,
              timeout: float = None,
              metadata: Sequence[Tuple[str, str]] = (),
              ) -> logging_config.LogExclusion:
          r"""Creates a new exclusion in a specified parent
          resource. Only log entries belonging to that resource
          can be excluded. You can have up to 10 exclusions in a
          resource.
  
          Args:
              request (Union[google.cloud.logging_v2.types.CreateExclusionRequest, dict]):
                  The request object. The parameters to `CreateExclusion`.
              parent (:class:`str`):
                  Required. The parent resource in which to create the
                  exclusion:
  
                  ::
  
                      "projects/[PROJECT_ID]"
                      "organizations/[ORGANIZATION_ID]"
                      "billingAccounts/[BILLING_ACCOUNT_ID]"
                      "folders/[FOLDER_ID]"
  
                  Examples: ``"projects/my-logging-project"``,
                  ``"organizations/123456789"``.
  
                  This corresponds to the ``parent`` field
                  on the ``request`` instance; if ``request`` is provided, this
                  should not be set.
              exclusion (:class:`google.cloud.logging_v2.types.LogExclusion`):
                  Required. The new exclusion, whose ``name`` parameter is
                  an exclusion name that is not already used in the parent
                  resource.
  
                  This corresponds to the ``exclusion`` field
                  on the ``request`` instance; if ``request`` is provided, this
                  should not be set.
              retry (google.api_core.retry.Retry): Designation of what errors, if any,
                  should be retried.
              timeout (float): The timeout for this request.
              metadata (Sequence[Tuple[str, str]]): Strings which should be
                  sent along with the request as metadata.
  
          Returns:
              google.cloud.logging_v2.types.LogExclusion:
                  Specifies a set of log entries that
                  are not to be stored in Logging. If your
                  GCP resource receives a large volume of
                  logs, you can use exclusions to reduce
                  your chargeable logs. Exclusions are
                  processed after log sinks, so you can
                  export log entries before they are
                  excluded. Note that organization-level
                  and folder-level exclusions don't apply
                  to child resources, and that you can't
                  exclude audit log entries.
  
          """
          # Create or coerce a protobuf request object.
          # Sanity check: If we got a request object, we should *not* have
          # gotten any keyword arguments that map to the request.
          has_flattened_params = any([parent, exclusion])
          if request is not None and has_flattened_params:
              raise ValueError("If the `request` argument is set, then none of "
                               "the individual field arguments should be set.")
  
          request = logging_config.CreateExclusionRequest(request)
  
          # If we have keyword arguments corresponding to fields on the
          # request, apply these.
          if parent is not None:
              request.parent = parent
          if exclusion is not None:
              request.exclusion = exclusion
  
          # Wrap the RPC method; this adds retry and timeout information,
          # and friendly error handling.
          rpc = gapic_v1.method_async.wrap_method(
              self._client._transport.create_exclusion,
              default_timeout=120.0,
              client_info=DEFAULT_CLIENT_INFO,
          )
  
          # Certain fields should be provided within the metadata header;
          # add these here.
          metadata = tuple(metadata) + (
              gapic_v1.routing_header.to_grpc_metadata((
                  ("parent", request.parent),
              )),
          )
  
          # Send the request.
          response = await rpc(
              request,
              retry=retry,
              timeout=timeout,
              metadata=metadata,
          )
  
          # Done; return the response.
          return response
code_tokens: async def create_exclusion ( self , request : Union [ logging_config . CreateExclusionRequest , dict ] = None , * , parent : str = None , exclusion : logging_config . LogExclusion = None , retry : OptionalRetry = gapic_v1 . method . DEFAULT , timeout : float = None , metadata : Sequence [ Tuple [ str , str ] ] = ( ) , ) -> logging_config . LogExclusion : has_flattened_params = any ( [ parent , exclusion ] ) if request is not None and has_flattened_params : raise ValueError ( "If the `request` argument is set, then none of " "the individual field arguments should be set." ) request = logging_config . CreateExclusionRequest ( request ) if parent is not None : request . parent = parent if exclusion is not None : request . exclusion = exclusion rpc = gapic_v1 . method_async . wrap_method ( self . _client . _transport . create_exclusion , default_timeout = 120.0 , client_info = DEFAULT_CLIENT_INFO , ) metadata = tuple ( metadata ) + ( gapic_v1 . routing_header . to_grpc_metadata ( ( ( "parent" , request . parent ) , ) ) , ) response = await rpc ( request , retry = retry , timeout = timeout , metadata = metadata , ) return response
short_docstring: r"""Creates a new exclusion in a specified parent
  resource.
short_docstring_tokens: r " " " Creates a new exclusion in a specified parent resource .
comment: r"""Creates a new exclusion in a specified parent
          resource. Only log entries belonging to that resource
          can be excluded. You can have up to 10 exclusions in a
          resource.
  
          Args:
              request (Union[google.cloud.logging_v2.types.CreateExclusionRequest, dict]):
                  The request object. The parameters to `CreateExclusion`.
              parent (:class:`str`):
                  Required. The parent resource in which to create the
                  exclusion:
  
                  ::
  
                      "projects/[PROJECT_ID]"
                      "organizations/[ORGANIZATION_ID]"
                      "billingAccounts/[BILLING_ACCOUNT_ID]"
                      "folders/[FOLDER_ID]"
  
                  Examples: ``"projects/my-logging-project"``,
                  ``"organizations/123456789"``.
  
                  This corresponds to the ``parent`` field
                  on the ``request`` instance; if ``request`` is provided, this
                  should not be set.
              exclusion (:class:`google.cloud.logging_v2.types.LogExclusion`):
                  Required. The new exclusion, whose ``name`` parameter is
                  an exclusion name that is not already used in the parent
                  resource.
  
                  This corresponds to the ``exclusion`` field
                  on the ``request`` instance; if ``request`` is provided, this
                  should not be set.
              retry (google.api_core.retry.Retry): Designation of what errors, if any,
                  should be retried.
              timeout (float): The timeout for this request.
              metadata (Sequence[Tuple[str, str]]): Strings which should be
                  sent along with the request as metadata.
  
          Returns:
              google.cloud.logging_v2.types.LogExclusion:
                  Specifies a set of log entries that
                  are not to be stored in Logging. If your
                  GCP resource receives a large volume of
                  logs, you can use exclusions to reduce
                  your chargeable logs. Exclusions are
                  processed after log sinks, so you can
                  export log entries before they are
                  excluded. Note that organization-level
                  and folder-level exclusions don't apply
                  to child resources, and that you can't
                  exclude audit log entries.
  
          """$SEP$# Create or coerce a protobuf request object.$SEP$# Sanity check: If we got a request object, we should *not* have$SEP$# gotten any keyword arguments that map to the request.$SEP$# If we have keyword arguments corresponding to fields on the$SEP$# request, apply these.$SEP$# Wrap the RPC method; this adds retry and timeout information,$SEP$# and friendly error handling.$SEP$# Certain fields should be provided within the metadata header;$SEP$# add these here.$SEP$# Send the request.$SEP$# Done; return the response.