Skip to content

Latest commit

 

History

History
227 lines (170 loc) · 7.29 KB

AclApi.md

File metadata and controls

227 lines (170 loc) · 7.29 KB

Fastly::AclApi

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

Methods

Note

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

Method HTTP request Description
create_acl POST /service/{service_id}/version/{version_id}/acl Create a new ACL
delete_acl DELETE /service/{service_id}/version/{version_id}/acl/{acl_name} Delete an ACL
get_acl GET /service/{service_id}/version/{version_id}/acl/{acl_name} Describe an ACL
list_acls GET /service/{service_id}/version/{version_id}/acl List ACLs
update_acl PUT /service/{service_id}/version/{version_id}/acl/{acl_name} Update an ACL

create_acl()

create_acl(opts): <AclResponse> # Create a new ACL

Create a new ACL attached to the specified service version. A new, empty ACL must be attached to a draft version of a service. The version associated with the ACL must be activated to be used.

Examples

api_instance = Fastly::AclApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    name: 'name_example', # String | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.
}

begin
  # Create a new ACL
  result = api_instance.create_acl(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling AclApi->create_acl: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
name String Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. [optional]

Return type

AclResponse

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

delete_acl()

delete_acl(opts): <InlineResponse200> # Delete an ACL

Delete an ACL from the specified service version. To remove an ACL from use, the ACL must be deleted from a draft version and the version without the ACL must be activated.

Examples

api_instance = Fastly::AclApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    acl_name: 'acl_name_example', # String | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.
}

begin
  # Delete an ACL
  result = api_instance.delete_acl(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling AclApi->delete_acl: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
acl_name String Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.

Return type

InlineResponse200

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

get_acl()

get_acl(opts): <AclResponse> # Describe an ACL

Retrieve a single ACL by name for the version and service.

Examples

api_instance = Fastly::AclApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    acl_name: 'acl_name_example', # String | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.
}

begin
  # Describe an ACL
  result = api_instance.get_acl(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling AclApi->get_acl: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
acl_name String Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.

Return type

AclResponse

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

list_acls()

list_acls(opts): <Array<AclResponse>> # List ACLs

List ACLs.

Examples

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

begin
  # List ACLs
  result = api_instance.list_acls(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling AclApi->list_acls: #{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<AclResponse>

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

update_acl()

update_acl(opts): <AclResponse> # Update an ACL

Update an ACL for a particular service and version.

Examples

api_instance = Fastly::AclApi.new
opts = {
    service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
    version_id: 56, # Integer | Integer identifying a service version.
    acl_name: 'acl_name_example', # String | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.
    name: 'name_example', # String | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.
}

begin
  # Update an ACL
  result = api_instance.update_acl(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling AclApi->update_acl: #{e}"
end

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Integer Integer identifying a service version.
acl_name String Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.
name String Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. [optional]

Return type

AclResponse

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