Skip to content

Latest commit

 

History

History
264 lines (193 loc) · 7.12 KB

AclEntryApi.md

File metadata and controls

264 lines (193 loc) · 7.12 KB

Fastly.AclEntryApi

const apiInstance = new Fastly.AclEntryApi();

Methods

Note

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

Method HTTP request Description
bulkUpdateAclEntries PATCH /service/{service_id}/acl/{acl_id}/entries Update multiple ACL entries
createAclEntry POST /service/{service_id}/acl/{acl_id}/entry Create an ACL entry
deleteAclEntry DELETE /service/{service_id}/acl/{acl_id}/entry/{acl_entry_id} Delete an ACL entry
getAclEntry GET /service/{service_id}/acl/{acl_id}/entry/{acl_entry_id} Describe an ACL entry
listAclEntries GET /service/{service_id}/acl/{acl_id}/entries List ACL entries
updateAclEntry PATCH /service/{service_id}/acl/{acl_id}/entry/{acl_entry_id} Update an ACL entry

bulkUpdateAclEntries

bulkUpdateAclEntries({ service_id, acl_id, [bulk_update_acl_entries_request] })

Update multiple ACL entries on the same ACL. For faster updates to your service, group your changes into large batches. The maximum batch size is 1000 entries. Contact support to discuss raising this limit.

Example

const options = {
  service_id: "service_id_example", // required
  acl_id: "acl_id_example", // required
  bulk_update_acl_entries_request: {"entries":[{"op":"create","ip":"192.168.0.1","subnet":8},{"op":"update","id":"6yxNzlOpW1V7JfSwvLGtOc","ip":"192.168.0.2","subnet":16},{"op":"delete","id":"6yxNzlOpW1V7JfSwvLGtOc"}]},
};

apiInstance.bulkUpdateAclEntries(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
acl_id String Alphanumeric string identifying a ACL.
bulk_update_acl_entries_request BulkUpdateAclEntriesRequest [optional]

Return type

InlineResponse200

createAclEntry

createAclEntry({ service_id, acl_id, [acl_entry] })

Add an ACL entry to an ACL.

Example

const options = {
  service_id: "service_id_example", // required
  acl_id: "acl_id_example", // required
  acl_entry: {"subnet":0,"ip":"127.0.0.1"},
};

apiInstance.createAclEntry(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
acl_id String Alphanumeric string identifying a ACL.
acl_entry AclEntry [optional]

Return type

AclEntryResponse

deleteAclEntry

deleteAclEntry({ service_id, acl_id, acl_entry_id })

Delete an ACL entry from a specified ACL.

Example

const options = {
  service_id: "service_id_example", // required
  acl_id: "acl_id_example", // required
  acl_entry_id: "acl_entry_id_example", // required
};

apiInstance.deleteAclEntry(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
acl_id String Alphanumeric string identifying a ACL.
acl_entry_id String Alphanumeric string identifying an ACL Entry.

Return type

InlineResponse200

getAclEntry

getAclEntry({ service_id, acl_id, acl_entry_id })

Retrieve a single ACL entry.

Example

const options = {
  service_id: "service_id_example", // required
  acl_id: "acl_id_example", // required
  acl_entry_id: "acl_entry_id_example", // required
};

apiInstance.getAclEntry(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
acl_id String Alphanumeric string identifying a ACL.
acl_entry_id String Alphanumeric string identifying an ACL Entry.

Return type

AclEntryResponse

listAclEntries

listAclEntries({ service_id, acl_id, [page, ][per_page, ][sort, ][direction] })

List ACL entries for a specified ACL.

Example

const options = {
  service_id: "service_id_example", // required
  acl_id: "acl_id_example", // required
  page: 1,
  per_page: 20,
  sort: created,
  direction: "ascend",
};

apiInstance.listAclEntries(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
acl_id String Alphanumeric string identifying a ACL.
page Number Current page. [optional]
per_page Number Number of records per page. [optional] [defaults to 20]
sort String Field on which to sort. [optional] [defaults to 'created']
direction String Direction in which to sort results. [optional] [one of: "ascend", "descend"]

Return type

[AclEntryResponse]

updateAclEntry

updateAclEntry({ service_id, acl_id, acl_entry_id, [acl_entry] })

Update an ACL entry for a specified ACL.

Example

const options = {
  service_id: "service_id_example", // required
  acl_id: "acl_id_example", // required
  acl_entry_id: "acl_entry_id_example", // required
  acl_entry: {"subnet":8},
};

apiInstance.updateAclEntry(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
acl_id String Alphanumeric string identifying a ACL.
acl_entry_id String Alphanumeric string identifying an ACL Entry.
acl_entry AclEntry [optional]

Return type

AclEntryResponse

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