Skip to content

Commit

Permalink
Adding request_logging as a parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Bridget Lane authored and sethvargo committed May 31, 2018
1 parent 10d525c commit cd9a5e6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions fastly/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ type CreateBigQueryInput struct {
// Format is the log formatting desired for your BigQuery dataset.
// Optional.
Format string

// ResponseCondition allows you to attach a response condition to your BigQuery logging endpoint.
// Optional.
ResponseCondition string
}

// CreateBigQuery creates a new Fastly BigQuery logging endpoint.
Expand Down Expand Up @@ -127,6 +131,9 @@ func (c *Client) CreateBigQuery(i *CreateBigQueryInput) (*BigQuery, error) {
if i.Format != "" {
params["format"] = i.Format
}
if i.ResponseCondition != "" {
params["response_condition"] = i.ResponseCondition
}

path := fmt.Sprintf("/service/%s/version/%d/logging/bigquery", i.Service, i.Version)
resp, err := c.PostForm(path, i, &RequestOptions{
Expand Down Expand Up @@ -181,6 +188,10 @@ type UpdateBigQueryInput struct {
// Format is the log formatting desired for your BigQuery dataset.
// Optional.
Format string

// ResponseCondition allows you to attach a response condition to your BigQuery logging endpoint.
// Optional.
ResponseCondition string
}

// UpdateBigQuery updates a BigQuery logging endpoint.
Expand Down Expand Up @@ -221,6 +232,9 @@ func (c *Client) UpdateBigQuery(i *UpdateBigQueryInput) (*BigQuery, error) {
if i.Format != "" {
params["format"] = i.Format
}
if i.ResponseCondition != "" {
params["response_condition"] = i.ResponseCondition
}

path := fmt.Sprintf("/service/%s/version/%d/logging/bigquery/%s", i.Service, i.Version, i.Name)
resp, err := c.PutForm(path, i, &RequestOptions{
Expand Down

0 comments on commit cd9a5e6

Please sign in to comment.