const apiInstance = new Fastly.LoggingGrafanacloudlogsApi();
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
createLogGrafanacloudlogs | POST /service/{service_id}/version/{version_id}/logging/grafanacloudlogs | Create a Grafana Cloud Logs log endpoint |
deleteLogGrafanacloudlogs | DELETE /service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name} | Delete the Grafana Cloud Logs log endpoint |
getLogGrafanacloudlogs | GET /service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name} | Get a Grafana Cloud Logs log endpoint |
listLogGrafanacloudlogs | GET /service/{service_id}/version/{version_id}/logging/grafanacloudlogs | List Grafana Cloud Logs log endpoints |
updateLogGrafanacloudlogs | PUT /service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name} | Update a Grafana Cloud Logs log endpoint |
createLogGrafanacloudlogs({ service_id, version_id, [name, ][placement, ][response_condition, ][format, ][format_version, ][user, ][url, ][token, ][index] })
Create a Grafana Cloud Logs logging object for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
name: "name_example",
placement: "none",
response_condition: "response_condition_example",
format: "format_example",
format_version: 1,
user: "user_example",
url: "url_example",
token: "token_example",
index: "index_example",
};
apiInstance.createLogGrafanacloudlogs(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. | |
name | String | The name for the real-time logging configuration. | [optional] |
placement | String | Where in the generated VCL the logging call should be placed. If not set, endpoints with format_version of 2 are placed in vcl_log and those with format_version of 1 are placed in vcl_deliver . |
[optional] [one of: "none", "waf_debug", "null"] |
response_condition | String | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] |
format | String | A Fastly log format string. | [optional] |
format_version | Number | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in vcl_log if format_version is set to 2 and in vcl_deliver if format_version is set to 1 . |
[optional] [one of: 1, 2] |
user | String | The Grafana Cloud Logs Dataset you want to log to. | [optional] |
url | String | The URL of the Loki instance in your Grafana stack. | [optional] |
token | String | The Grafana Access Policy token with logs:write access scoped to your Loki instance. |
[optional] |
index | String | The Stream Labels, a JSON string used to identify the stream. | [optional] |
LoggingGrafanacloudlogsResponse
deleteLogGrafanacloudlogs({ service_id, version_id, logging_grafanacloudlogs_name })
Delete the Grafana Cloud Logs logging object for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
logging_grafanacloudlogs_name: "logging_grafanacloudlogs_name_example", // required
};
apiInstance.deleteLogGrafanacloudlogs(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. | |
logging_grafanacloudlogs_name | String | The name for the real-time logging configuration. |
getLogGrafanacloudlogs({ service_id, version_id, logging_grafanacloudlogs_name })
Get the details of a Grafana Cloud Logs logging object for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
logging_grafanacloudlogs_name: "logging_grafanacloudlogs_name_example", // required
};
apiInstance.getLogGrafanacloudlogs(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. | |
logging_grafanacloudlogs_name | String | The name for the real-time logging configuration. |
LoggingGrafanacloudlogsResponse
listLogGrafanacloudlogs({ service_id, version_id })
List all of the Grafana Cloud Logs logging objects for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
};
apiInstance.listLogGrafanacloudlogs(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. |
[LoggingGrafanacloudlogsResponse]
updateLogGrafanacloudlogs({ service_id, version_id, logging_grafanacloudlogs_name, [name, ][placement, ][response_condition, ][format, ][format_version, ][user, ][url, ][token, ][index] })
Update a Grafana Cloud Logs logging object for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
logging_grafanacloudlogs_name: "logging_grafanacloudlogs_name_example", // required
name: "name_example",
placement: "none",
response_condition: "response_condition_example",
format: "format_example",
format_version: 1,
user: "user_example",
url: "url_example",
token: "token_example",
index: "index_example",
};
apiInstance.updateLogGrafanacloudlogs(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. | |
logging_grafanacloudlogs_name | String | The name for the real-time logging configuration. | |
name | String | The name for the real-time logging configuration. | [optional] |
placement | String | Where in the generated VCL the logging call should be placed. If not set, endpoints with format_version of 2 are placed in vcl_log and those with format_version of 1 are placed in vcl_deliver . |
[optional] [one of: "none", "waf_debug", "null"] |
response_condition | String | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] |
format | String | A Fastly log format string. | [optional] |
format_version | Number | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in vcl_log if format_version is set to 2 and in vcl_deliver if format_version is set to 1 . |
[optional] [one of: 1, 2] |
user | String | The Grafana Cloud Logs Dataset you want to log to. | [optional] |
url | String | The URL of the Loki instance in your Grafana stack. | [optional] |
token | String | The Grafana Access Policy token with logs:write access scoped to your Loki instance. |
[optional] |
index | String | The Stream Labels, a JSON string used to identify the stream. | [optional] |