Class LogDestinationName (3.7.6)

public final class LogDestinationName extends Option

Class for specifying resource name of the log to which this log entry belongs (see 'logName' parameter in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)

Inheritance

Object > com.google.cloud.logging.Option > LogDestinationName

Static Methods

billingAccount(String id)

public static LogDestinationName billingAccount(String id)

Returns an option which sets and validates project ID resource name for log entries.

Parameter
NameDescription
idString

corresponds to BILLING_ACCOUNT_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

Returns
TypeDescription
LogDestinationName

folder(String id)

public static LogDestinationName folder(String id)

Returns an option which sets and validates project ID resource name for log entries.

Parameter
NameDescription
idString

corresponds to FOLDER_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

Returns
TypeDescription
LogDestinationName

fromLogName(LogName logName)

public static LogDestinationName fromLogName(LogName logName)

Creates a LogDestinationName object from given LogName.

Parameter
NameDescription
logNameLogName
Returns
TypeDescription
LogDestinationName

organization(String id)

public static LogDestinationName organization(String id)

Returns an option which sets and validates project ID resource name for log entries.

Parameter
NameDescription
idString

corresponds to ORGANIZATION_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

Returns
TypeDescription
LogDestinationName

project(String id)

public static LogDestinationName project(String id)

Returns an option which sets and validates project ID resource name for log entries.

Parameter
NameDescription
idString

corresponds to PROJECT_ID token in 'logName' field described in https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

Returns
TypeDescription
LogDestinationName

Methods

getDestinationId()

public String getDestinationId()

Returns ID value associated with LogDestinationName object

Returns
TypeDescription
String

getDestinationType()

public LogDestinationName.DestinationType getDestinationType()

Returns destination type option value associated with LogDestinationName object

Returns
TypeDescription
LogDestinationName.DestinationType

toLogName(String logId)

public LogName toLogName(String logId)

Creates a LogEntry object for given log ID.

Parameter
NameDescription
logIdString
Returns
TypeDescription
LogName