"description": "Administrate log data for your projects"
}
}
}
},
"description": "Writes log entries and manages your Stackdriver Logging configuration.",
"protocol": "rest",
"title": "Stackdriver Logging API",
"resources": {
"folders": {
"resources": {
"logs": {
"methods": {
"list": {
"id": "logging.folders.logs.list",
"response": {
"$ref": "ListLogsResponse"
},
"parameterOrder": [
"parent"
],
"description": "Lists the logs in projects or organizations. Only logs that have entries are listed.",
"flatPath": "v2/folders/{foldersId}/logs",
"httpMethod": "GET",
"parameters": {
"pageSize": {
"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
"location": "query",
"type": "integer",
"format": "int32"
},
"parent": {
"description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n",
"required": true,
"pattern": "^folders/[^/]+$",
"location": "path",
"type": "string"
},
"pageToken": {
"description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
"description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.",
"required": true,
"pattern": "^folders/[^/]+/logs/[^/]+$",
"location": "path",
"type": "string"
}
},
"path": "v2/{+logName}",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"
]
}
}
},
"sinks": {
"methods": {
"update": {
"id": "logging.folders.sinks.update",
"response": {
"$ref": "LogSink"
},
"parameterOrder": [
"sinkName"
],
"description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.",
"description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
"required": true,
"pattern": "^folders/[^/]+/sinks/[^/]+$",
"location": "path",
"type": "string"
},
"uniqueWriterIdentity": {
"description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value was false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value was true and the new value is false.",
"description": "Required. The parent resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
"description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or 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.",
"request": {
"$ref": "LogSink"
},
"flatPath": "v2/folders/{foldersId}/sinks",
"httpMethod": "POST",
"parameters": {
"uniqueWriterIdentity": {
"description": "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 cloud-logs@google.com, the same identity used 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 unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.",
"location": "query",
"type": "boolean"
},
"parent": {
"description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
"required": true,
"pattern": "^folders/[^/]+$",
"location": "path",
"type": "string"
}
},
"path": "v2/{+parent}/sinks",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"
]
},
"list": {
"id": "logging.folders.sinks.list",
"response": {
"$ref": "ListSinksResponse"
},
"parameterOrder": [
"parent"
],
"description": "Lists sinks.",
"flatPath": "v2/folders/{foldersId}/sinks",
"httpMethod": "GET",
"parameters": {
"pageSize": {
"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
"location": "query",
"type": "integer",
"format": "int32"
},
"parent": {
"description": "Required. The parent resource whose sinks are to be listed. Examples: \"projects/my-logging-project\", \"organizations/123456789\".",
"required": true,
"pattern": "^folders/[^/]+$",
"location": "path",
"type": "string"
},
"pageToken": {
"description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
"description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nIt is an error if the sink does not exist. Example: \"projects/my-project-id/sinks/my-sink-id\". It is an error if the sink does not exist.",
"required": true,
"pattern": "^folders/[^/]+/sinks/[^/]+$",
"location": "path",
"type": "string"
}
},
"path": "v2/{+sinkName}",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"
]
}
}
}
}
},
"billingAccounts": {
"resources": {
"logs": {
"methods": {
"list": {
"id": "logging.billingAccounts.logs.list",
"response": {
"$ref": "ListLogsResponse"
},
"parameterOrder": [
"parent"
],
"description": "Lists the logs in projects or organizations. Only logs that have entries are listed.",
"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
"location": "query",
"type": "integer",
"format": "int32"
},
"parent": {
"description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n",
"required": true,
"pattern": "^billingAccounts/[^/]+$",
"location": "path",
"type": "string"
},
"pageToken": {
"description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
"description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.",
"required": true,
"pattern": "^billingAccounts/[^/]+/logs/[^/]+$",
"location": "path",
"type": "string"
}
},
"path": "v2/{+logName}",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"
]
}
}
},
"sinks": {
"methods": {
"update": {
"id": "logging.billingAccounts.sinks.update",
"response": {
"$ref": "LogSink"
},
"parameterOrder": [
"sinkName"
],
"description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.",
"description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
"required": true,
"pattern": "^billingAccounts/[^/]+/sinks/[^/]+$",
"location": "path",
"type": "string"
},
"uniqueWriterIdentity": {
"description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value was false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value was true and the new value is false.",
"description": "Required. The parent resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
"description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or 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.",
"description": "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 cloud-logs@google.com, the same identity used 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 unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.",
"location": "query",
"type": "boolean"
},
"parent": {
"description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
"location": "query",
"type": "integer",
"format": "int32"
},
"parent": {
"description": "Required. The parent resource whose sinks are to be listed. Examples: \"projects/my-logging-project\", \"organizations/123456789\".",
"required": true,
"pattern": "^billingAccounts/[^/]+$",
"location": "path",
"type": "string"
},
"pageToken": {
"description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
"description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nIt is an error if the sink does not exist. Example: \"projects/my-project-id/sinks/my-sink-id\". It is an error if the sink does not exist.",
"required": true,
"pattern": "^billingAccounts/[^/]+/sinks/[^/]+$",
"location": "path",
"type": "string"
}
},
"path": "v2/{+sinkName}",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"
]
}
}
}
}
},
"organizations": {
"resources": {
"logs": {
"methods": {
"list": {
"id": "logging.organizations.logs.list",
"response": {
"$ref": "ListLogsResponse"
},
"parameterOrder": [
"parent"
],
"description": "Lists the logs in projects or organizations. Only logs that have entries are listed.",
"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
"location": "query",
"type": "integer",
"format": "int32"
},
"parent": {
"description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n",
"required": true,
"pattern": "^organizations/[^/]+$",
"location": "path",
"type": "string"
},
"pageToken": {
"description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
"description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.",
"required": true,
"pattern": "^organizations/[^/]+/logs/[^/]+$",
"location": "path",
"type": "string"
}
},
"path": "v2/{+logName}",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"
]
}
}
},
"sinks": {
"methods": {
"update": {
"id": "logging.organizations.sinks.update",
"response": {
"$ref": "LogSink"
},
"parameterOrder": [
"sinkName"
],
"description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.",
"description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
"required": true,
"pattern": "^organizations/[^/]+/sinks/[^/]+$",
"location": "path",
"type": "string"
},
"uniqueWriterIdentity": {
"description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value was false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value was true and the new value is false.",
"description": "Required. The parent resource name of the sink:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
"description": "Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the current time is outside the sink's start and end times or 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.",
"description": "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 cloud-logs@google.com, the same identity used 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 unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink.",
"location": "query",
"type": "boolean"
},
"parent": {
"description": "Required. The resource in which to create the sink:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\nExamples: \"projects/my-logging-project\", \"organizations/123456789\".",
"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
"location": "query",
"type": "integer",
"format": "int32"
},
"parent": {
"description": "Required. The parent resource whose sinks are to be listed. Examples: \"projects/my-logging-project\", \"organizations/123456789\".",
"required": true,
"pattern": "^organizations/[^/]+$",
"location": "path",
"type": "string"
},
"pageToken": {
"description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
"description": "Required. The full resource name of the sink to delete, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nIt is an error if the sink does not exist. Example: \"projects/my-project-id/sinks/my-sink-id\". It is an error if the sink does not exist.",
"required": true,
"pattern": "^organizations/[^/]+/sinks/[^/]+$",
"location": "path",
"type": "string"
}
},
"path": "v2/{+sinkName}",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"
]
}
}
}
}
},
"projects": {
"resources": {
"metrics": {
"methods": {
"update": {
"id": "logging.projects.metrics.update",
"response": {
"$ref": "LogMetric"
},
"parameterOrder": [
"metricName"
],
"description": "Creates or updates a logs-based metric.",
"description": "The resource name of the metric to update:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\nThe updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created.",
"description": "The resource name of the project in which to create the metric:\n\"projects/[PROJECT_ID]\"\nThe new metric must be provided in the request.",
"required": true,
"pattern": "^projects/[^/]+$",
"location": "path",
"type": "string"
}
},
"path": "v2/{+parent}/metrics",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin",
"https://www.googleapis.com/auth/logging.write"
]
},
"list": {
"id": "logging.projects.metrics.list",
"response": {
"$ref": "ListLogMetricsResponse"
},
"parameterOrder": [
"parent"
],
"description": "Lists logs-based metrics.",
"flatPath": "v2/projects/{projectsId}/metrics",
"httpMethod": "GET",
"parameters": {
"pageSize": {
"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
"location": "query",
"type": "integer",
"format": "int32"
},
"parent": {
"description": "Required. The name of the project containing the metrics:\n\"projects/[PROJECT_ID]\"\n",
"required": true,
"pattern": "^projects/[^/]+$",
"location": "path",
"type": "string"
},
"pageToken": {
"description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
"description": "The resource name of the metric to delete:\n\"projects/[PROJECT_ID]/metrics/[METRIC_ID]\"\n",
"required": true,
"pattern": "^projects/[^/]+/metrics/[^/]+$",
"location": "path",
"type": "string"
}
},
"path": "v2/{+metricName}",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin",
"https://www.googleapis.com/auth/logging.write"
]
}
}
},
"logs": {
"methods": {
"list": {
"id": "logging.projects.logs.list",
"response": {
"$ref": "ListLogsResponse"
},
"parameterOrder": [
"parent"
],
"description": "Lists the logs in projects or organizations. Only logs that have entries are listed.",
"flatPath": "v2/projects/{projectsId}/logs",
"httpMethod": "GET",
"parameters": {
"pageSize": {
"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.",
"location": "query",
"type": "integer",
"format": "int32"
},
"parent": {
"description": "Required. The resource name that owns the logs:\n\"projects/[PROJECT_ID]\"\n\"organizations/[ORGANIZATION_ID]\"\n",
"required": true,
"pattern": "^projects/[^/]+$",
"location": "path",
"type": "string"
},
"pageToken": {
"description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.",
"description": "Required. The resource name of the log to delete:\n\"projects/[PROJECT_ID]/logs/[LOG_ID]\"\n\"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]\"\n[LOG_ID] must be URL-encoded. For example, \"projects/my-project-id/logs/syslog\", \"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity\". For more information about log names, see LogEntry.",
"required": true,
"pattern": "^projects/[^/]+/logs/[^/]+$",
"location": "path",
"type": "string"
}
},
"path": "v2/{+logName}",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/logging.admin"
]
}
}
},
"sinks": {
"methods": {
"update": {
"id": "logging.projects.sinks.update",
"response": {
"$ref": "LogSink"
},
"parameterOrder": [
"sinkName"
],
"description": "Updates a sink. If the named sink doesn't exist, then this method is identical to sinks.create. If the named sink does exist, then this method replaces the following fields in the existing sink with values from the new sink: destination, filter, output_version_format, start_time, and end_time. The updated filter might also have a new writer_identity; see the unique_writer_identity field.",
"description": "Required. The full resource name of the sink to update, including the parent resource and the sink identifier:\n\"projects/[PROJECT_ID]/sinks/[SINK_ID]\"\n\"organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]\"\nExample: \"projects/my-project-id/sinks/my-sink-id\".",
"required": true,
"pattern": "^projects/[^/]+/sinks/[^/]+$",
"location": "path",
"type": "string"
},
"uniqueWriterIdentity": {
"description": "Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field:\nIf the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity.\nIf the old value was false and the new value is true, then writer_identity is changed to a unique service account.\nIt is an error if the old value was true and the new value is false.",