Skip to content

Latest commit

 

History

History
227 lines (170 loc) · 7.23 KB

ResponseObjectApi.md

File metadata and controls

227 lines (170 loc) · 7.23 KB

Fastly::ResponseObjectApi

require 'fastly'
api_instance = Fastly::ResponseObjectApi.new

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
create_response_object POST /service/{service_id}/version/{version_id}/response_object Create a Response object
delete_response_object DELETE /service/{service_id}/version/{version_id}/response_object/{response_object_name} Delete a Response Object
get_response_object GET /service/{service_id}/version/{version_id}/response_object/{response_object_name} Get a Response object
list_response_objects GET /service/{service_id}/version/{version_id}/response_object List Response objects
update_response_object PUT /service/{service_id}/version/{version_id}/response_object/{response_object_name} Update a Response object

create_response_object()

create_response_object(opts): <ResponseObjectResponse> # Create a Response object

Creates a new Response Object.

Examples

api_instance = Fastly::ResponseObjectApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    create_response_object_request: Fastly::CreateResponseObjectRequest.new, # CreateResponseObjectRequest | 
}

begin
  # Create a Response object
  result = api_instance.create_response_object(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling ResponseObjectApi->create_response_object: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
create_response_object_request CreateResponseObjectRequest [optional]

Return type

ResponseObjectResponse

[Back to top] [Back to API list] [Back to README]

delete_response_object()

delete_response_object(opts): <InlineResponse200> # Delete a Response Object

Deletes the specified Response Object.

Examples

api_instance = Fastly::ResponseObjectApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    response_object_name: 'response_object_name_example', # String | Name for the request settings.
}

begin
  # Delete a Response Object
  result = api_instance.delete_response_object(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling ResponseObjectApi->delete_response_object: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
response_object_name String Name for the request settings.

Return type

InlineResponse200

[Back to top] [Back to API list] [Back to README]

get_response_object()

get_response_object(opts): <ResponseObjectResponse> # Get a Response object

Gets the specified Response Object.

Examples

api_instance = Fastly::ResponseObjectApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    response_object_name: 'response_object_name_example', # String | Name for the request settings.
}

begin
  # Get a Response object
  result = api_instance.get_response_object(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling ResponseObjectApi->get_response_object: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
response_object_name String Name for the request settings.

Return type

ResponseObjectResponse

[Back to top] [Back to API list] [Back to README]

list_response_objects()

list_response_objects(opts): <Array<ResponseObjectResponse>> # List Response objects

Returns all Response Objects for the specified service and version.

Examples

api_instance = Fastly::ResponseObjectApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
}

begin
  # List Response objects
  result = api_instance.list_response_objects(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling ResponseObjectApi->list_response_objects: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.

Return type

Array<ResponseObjectResponse>

[Back to top] [Back to API list] [Back to README]

update_response_object()

update_response_object(opts): <ResponseObjectResponse> # Update a Response object

Updates the specified Response Object.

Examples

api_instance = Fastly::ResponseObjectApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    response_object_name: 'response_object_name_example', # String | Name for the request settings.
    create_response_object_request: Fastly::CreateResponseObjectRequest.new, # CreateResponseObjectRequest | 
}

begin
  # Update a Response object
  result = api_instance.update_response_object(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling ResponseObjectApi->update_response_object: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
response_object_name String Name for the request settings.
create_response_object_request CreateResponseObjectRequest [optional]

Return type

ResponseObjectResponse

[Back to top] [Back to API list] [Back to README]