All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.logging.v2.Logging.Sinks.Create.html Maven / Gradle / Ivy

There is a newer version: v2-rev20241018-2.0.0
Show newest version






Logging.Sinks.Create (Cloud Logging API v2-rev20240419-2.0.0)












com.google.api.services.logging.v2

Class Logging.Sinks.Create

    • Constructor Detail

      • Create

        protected Create(String parent,
                         LogSink content)
        Creates a sink that exports specified log entries to a destination. The export begins upon ingress, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. Create a request for the method "sinks.create". This request holds the parameters needed by the the logging server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

        Logging.initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest) must be called to initialize this instance immediately after invoking the constructor.

        Parameters:
        parent - Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For examples:"projects/my-project" "organizations/123456789"
        content - the LogSink
        Since:
        1.13
    • Method Detail

      • getParent

        public String getParent()
        Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For examples:"projects/my-project" "organizations/123456789"
      • setParent

        public Logging.Sinks.Create setParent(String parent)
        Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For examples:"projects/my-project" "organizations/123456789"
      • getCustomWriterIdentity

        public String getCustomWriterIdentity()
        Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated.
      • setCustomWriterIdentity

        public Logging.Sinks.Create setCustomWriterIdentity(String customWriterIdentity)
        Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated.
      • getUniqueWriterIdentity

        public Boolean getUniqueWriterIdentity()
        Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) used by the sinks with the same parent. For more information, see writer_identity in LogSink.
      • setUniqueWriterIdentity

        public Logging.Sinks.Create setUniqueWriterIdentity(Boolean uniqueWriterIdentity)
        Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a service agent (https://cloud.google.com/iam/docs/service-account-types#service- agents) used by the sinks with the same parent. For more information, see writer_identity in LogSink.

Copyright © 2011–2024 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy