Skip to content

Latest commit

 

History

History
398 lines (313 loc) · 26.3 KB

PoolApi.md

File metadata and controls

398 lines (313 loc) · 26.3 KB

WebService::Fastly::PoolApi

Load the API package

use WebService::Fastly::Object::PoolApi;

Note

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

Method HTTP request Description
create_server_pool POST /service/{service_id}/version/{version_id}/pool Create a server pool
delete_server_pool DELETE /service/{service_id}/version/{version_id}/pool/{pool_name} Delete a server pool
get_server_pool GET /service/{service_id}/version/{version_id}/pool/{pool_name} Get a server pool
list_server_pools GET /service/{service_id}/version/{version_id}/pool List server pools
update_server_pool PUT /service/{service_id}/version/{version_id}/pool/{pool_name} Update a server pool

create_server_pool

PoolResponsePost create_server_pool(service_id => $service_id, version_id => $version_id, tls_ca_cert => $tls_ca_cert, tls_client_cert => $tls_client_cert, tls_client_key => $tls_client_key, tls_cert_hostname => $tls_cert_hostname, use_tls => $use_tls, created_at => $created_at, deleted_at => $deleted_at, updated_at => $updated_at, service_id => $service_id, version => $version, name => $name, shield => $shield, request_condition => $request_condition, tls_ciphers => $tls_ciphers, tls_sni_hostname => $tls_sni_hostname, min_tls_version => $min_tls_version, max_tls_version => $max_tls_version, healthcheck => $healthcheck, comment => $comment, type => $type, override_host => $override_host, between_bytes_timeout => $between_bytes_timeout, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, max_conn_default => $max_conn_default, quorum => $quorum, tls_check_cert => $tls_check_cert)

Create a server pool

Creates a pool for a particular service and version.

Example

use Data::Dumper;
use WebService::Fastly::PoolApi;
my $api_instance = WebService::Fastly::PoolApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service.
my $version_id = 56; # int | Integer identifying a service version.
my $tls_ca_cert = 'null'; # string | A secure certificate to authenticate a server with. Must be in PEM format.
my $tls_client_cert = 'null'; # string | The client certificate used to make authenticated requests. Must be in PEM format.
my $tls_client_key = 'null'; # string | The client private key used to make authenticated requests. Must be in PEM format.
my $tls_cert_hostname = 'null'; # string | The hostname used to verify a server's certificate. It can either be the Common Name (CN) or a Subject Alternative Name (SAN).
my $use_tls = 0; # int | Whether to use TLS.
my $created_at = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Date and time in ISO 8601 format.
my $deleted_at = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Date and time in ISO 8601 format.
my $updated_at = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Date and time in ISO 8601 format.
my $service_id = "service_id_example"; # string | 
my $version = "version_example"; # string | 
my $name = "name_example"; # string | Name for the Pool.
my $shield = 'null'; # string | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding.
my $request_condition = "request_condition_example"; # string | Condition which, if met, will select this configuration during a request. Optional.
my $tls_ciphers = "tls_ciphers_example"; # string | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional.
my $tls_sni_hostname = "tls_sni_hostname_example"; # string | SNI hostname. Optional.
my $min_tls_version = 56; # int | Minimum allowed TLS version on connections to this server. Optional.
my $max_tls_version = 56; # int | Maximum allowed TLS version on connections to this server. Optional.
my $healthcheck = "healthcheck_example"; # string | Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools.
my $comment = "comment_example"; # string | A freeform descriptive note.
my $type = "type_example"; # string | What type of load balance group to use.
my $override_host = 'null'; # string | The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting.
my $between_bytes_timeout = 10000; # int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`.
my $connect_timeout = 56; # int | How long to wait for a timeout in milliseconds. Optional.
my $first_byte_timeout = 56; # int | How long to wait for the first byte in milliseconds. Optional.
my $max_conn_default = 200; # int | Maximum number of connections. Optional.
my $quorum = 75; # int | Percentage of capacity (`0-100`) that needs to be operationally available for a pool to be considered up.
my $tls_check_cert = 56; # int | Be strict on checking TLS certs. Optional.

eval {
    my $result = $api_instance->create_server_pool(service_id => $service_id, version_id => $version_id, tls_ca_cert => $tls_ca_cert, tls_client_cert => $tls_client_cert, tls_client_key => $tls_client_key, tls_cert_hostname => $tls_cert_hostname, use_tls => $use_tls, created_at => $created_at, deleted_at => $deleted_at, updated_at => $updated_at, service_id => $service_id, version => $version, name => $name, shield => $shield, request_condition => $request_condition, tls_ciphers => $tls_ciphers, tls_sni_hostname => $tls_sni_hostname, min_tls_version => $min_tls_version, max_tls_version => $max_tls_version, healthcheck => $healthcheck, comment => $comment, type => $type, override_host => $override_host, between_bytes_timeout => $between_bytes_timeout, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, max_conn_default => $max_conn_default, quorum => $quorum, tls_check_cert => $tls_check_cert);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoolApi->create_server_pool: $@\n";
}

Parameters

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
tls_ca_cert string A secure certificate to authenticate a server with. Must be in PEM format. [optional] [default to 'null']
tls_client_cert string The client certificate used to make authenticated requests. Must be in PEM format. [optional] [default to 'null']
tls_client_key string The client private key used to make authenticated requests. Must be in PEM format. [optional] [default to 'null']
tls_cert_hostname string The hostname used to verify a server's certificate. It can either be the Common Name (CN) or a Subject Alternative Name (SAN). [optional] [default to 'null']
use_tls int Whether to use TLS. [optional] [default to 0]
created_at DateTime Date and time in ISO 8601 format. [optional]
deleted_at DateTime Date and time in ISO 8601 format. [optional]
updated_at DateTime Date and time in ISO 8601 format. [optional]
service_id string [optional]
version string [optional]
name string Name for the Pool. [optional]
shield string Selected POP to serve as a shield for the servers. Defaults to null meaning no origin shielding if not set. Refer to the POPs API endpoint to get a list of available POPs used for shielding. [optional] [default to 'null']
request_condition string Condition which, if met, will select this configuration during a request. Optional. [optional]
tls_ciphers string List of OpenSSL ciphers (see the openssl.org manpages for details). Optional. [optional]
tls_sni_hostname string SNI hostname. Optional. [optional]
min_tls_version int Minimum allowed TLS version on connections to this server. Optional. [optional]
max_tls_version int Maximum allowed TLS version on connections to this server. Optional. [optional]
healthcheck string Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. [optional]
comment string A freeform descriptive note. [optional]
type string What type of load balance group to use. [optional]
override_host string The hostname to override the Host header. Defaults to null meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. [optional] [default to 'null']
between_bytes_timeout int Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using bereq.between_bytes_timeout. [optional] [default to 10000]
connect_timeout int How long to wait for a timeout in milliseconds. Optional. [optional]
first_byte_timeout int How long to wait for the first byte in milliseconds. Optional. [optional]
max_conn_default int Maximum number of connections. Optional. [optional] [default to 200]
quorum int Percentage of capacity (0-100) that needs to be operationally available for a pool to be considered up. [optional] [default to 75]
tls_check_cert int Be strict on checking TLS certs. Optional. [optional]

Return type

PoolResponsePost

Authorization

token

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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

delete_server_pool

InlineResponse200 delete_server_pool(service_id => $service_id, version_id => $version_id, pool_name => $pool_name)

Delete a server pool

Deletes a specific pool for a particular service and version.

Example

use Data::Dumper;
use WebService::Fastly::PoolApi;
my $api_instance = WebService::Fastly::PoolApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service.
my $version_id = 56; # int | Integer identifying a service version.
my $pool_name = "pool_name_example"; # string | Name for the Pool.

eval {
    my $result = $api_instance->delete_server_pool(service_id => $service_id, version_id => $version_id, pool_name => $pool_name);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoolApi->delete_server_pool: $@\n";
}

Parameters

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
pool_name string Name for the Pool.

Return type

InlineResponse200

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

get_server_pool

PoolResponse get_server_pool(service_id => $service_id, version_id => $version_id, pool_name => $pool_name)

Get a server pool

Gets a single pool for a particular service and version.

Example

use Data::Dumper;
use WebService::Fastly::PoolApi;
my $api_instance = WebService::Fastly::PoolApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service.
my $version_id = 56; # int | Integer identifying a service version.
my $pool_name = "pool_name_example"; # string | Name for the Pool.

eval {
    my $result = $api_instance->get_server_pool(service_id => $service_id, version_id => $version_id, pool_name => $pool_name);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoolApi->get_server_pool: $@\n";
}

Parameters

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
pool_name string Name for the Pool.

Return type

PoolResponse

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

list_server_pools

ARRAY[PoolResponse] list_server_pools(service_id => $service_id, version_id => $version_id)

List server pools

Lists all pools for a particular service and pool.

Example

use Data::Dumper;
use WebService::Fastly::PoolApi;
my $api_instance = WebService::Fastly::PoolApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service.
my $version_id = 56; # int | Integer identifying a service version.

eval {
    my $result = $api_instance->list_server_pools(service_id => $service_id, version_id => $version_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoolApi->list_server_pools: $@\n";
}

Parameters

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

Return type

ARRAY[PoolResponse]

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

update_server_pool

PoolResponse update_server_pool(service_id => $service_id, version_id => $version_id, pool_name => $pool_name, tls_ca_cert => $tls_ca_cert, tls_client_cert => $tls_client_cert, tls_client_key => $tls_client_key, tls_cert_hostname => $tls_cert_hostname, use_tls => $use_tls, created_at => $created_at, deleted_at => $deleted_at, updated_at => $updated_at, service_id => $service_id, version => $version, name => $name, shield => $shield, request_condition => $request_condition, tls_ciphers => $tls_ciphers, tls_sni_hostname => $tls_sni_hostname, min_tls_version => $min_tls_version, max_tls_version => $max_tls_version, healthcheck => $healthcheck, comment => $comment, type => $type, override_host => $override_host, between_bytes_timeout => $between_bytes_timeout, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, max_conn_default => $max_conn_default, quorum => $quorum, tls_check_cert => $tls_check_cert)

Update a server pool

Updates a specific pool for a particular service and version.

Example

use Data::Dumper;
use WebService::Fastly::PoolApi;
my $api_instance = WebService::Fastly::PoolApi->new(

    # Configure API key authorization: token
    api_key => {'Fastly-Key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'Fastly-Key' => 'Bearer'},
);

my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service.
my $version_id = 56; # int | Integer identifying a service version.
my $pool_name = "pool_name_example"; # string | Name for the Pool.
my $tls_ca_cert = 'null'; # string | A secure certificate to authenticate a server with. Must be in PEM format.
my $tls_client_cert = 'null'; # string | The client certificate used to make authenticated requests. Must be in PEM format.
my $tls_client_key = 'null'; # string | The client private key used to make authenticated requests. Must be in PEM format.
my $tls_cert_hostname = 'null'; # string | The hostname used to verify a server's certificate. It can either be the Common Name (CN) or a Subject Alternative Name (SAN).
my $use_tls = 0; # int | Whether to use TLS.
my $created_at = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Date and time in ISO 8601 format.
my $deleted_at = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Date and time in ISO 8601 format.
my $updated_at = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Date and time in ISO 8601 format.
my $service_id = "service_id_example"; # string | 
my $version = "version_example"; # string | 
my $name = "name_example"; # string | Name for the Pool.
my $shield = 'null'; # string | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding.
my $request_condition = "request_condition_example"; # string | Condition which, if met, will select this configuration during a request. Optional.
my $tls_ciphers = "tls_ciphers_example"; # string | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional.
my $tls_sni_hostname = "tls_sni_hostname_example"; # string | SNI hostname. Optional.
my $min_tls_version = 56; # int | Minimum allowed TLS version on connections to this server. Optional.
my $max_tls_version = 56; # int | Maximum allowed TLS version on connections to this server. Optional.
my $healthcheck = "healthcheck_example"; # string | Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools.
my $comment = "comment_example"; # string | A freeform descriptive note.
my $type = "type_example"; # string | What type of load balance group to use.
my $override_host = 'null'; # string | The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting.
my $between_bytes_timeout = 10000; # int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`.
my $connect_timeout = 56; # int | How long to wait for a timeout in milliseconds. Optional.
my $first_byte_timeout = 56; # int | How long to wait for the first byte in milliseconds. Optional.
my $max_conn_default = 200; # int | Maximum number of connections. Optional.
my $quorum = 75; # int | Percentage of capacity (`0-100`) that needs to be operationally available for a pool to be considered up.
my $tls_check_cert = 56; # int | Be strict on checking TLS certs. Optional.

eval {
    my $result = $api_instance->update_server_pool(service_id => $service_id, version_id => $version_id, pool_name => $pool_name, tls_ca_cert => $tls_ca_cert, tls_client_cert => $tls_client_cert, tls_client_key => $tls_client_key, tls_cert_hostname => $tls_cert_hostname, use_tls => $use_tls, created_at => $created_at, deleted_at => $deleted_at, updated_at => $updated_at, service_id => $service_id, version => $version, name => $name, shield => $shield, request_condition => $request_condition, tls_ciphers => $tls_ciphers, tls_sni_hostname => $tls_sni_hostname, min_tls_version => $min_tls_version, max_tls_version => $max_tls_version, healthcheck => $healthcheck, comment => $comment, type => $type, override_host => $override_host, between_bytes_timeout => $between_bytes_timeout, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, max_conn_default => $max_conn_default, quorum => $quorum, tls_check_cert => $tls_check_cert);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoolApi->update_server_pool: $@\n";
}

Parameters

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
pool_name string Name for the Pool.
tls_ca_cert string A secure certificate to authenticate a server with. Must be in PEM format. [optional] [default to 'null']
tls_client_cert string The client certificate used to make authenticated requests. Must be in PEM format. [optional] [default to 'null']
tls_client_key string The client private key used to make authenticated requests. Must be in PEM format. [optional] [default to 'null']
tls_cert_hostname string The hostname used to verify a server's certificate. It can either be the Common Name (CN) or a Subject Alternative Name (SAN). [optional] [default to 'null']
use_tls int Whether to use TLS. [optional] [default to 0]
created_at DateTime Date and time in ISO 8601 format. [optional]
deleted_at DateTime Date and time in ISO 8601 format. [optional]
updated_at DateTime Date and time in ISO 8601 format. [optional]
service_id string [optional]
version string [optional]
name string Name for the Pool. [optional]
shield string Selected POP to serve as a shield for the servers. Defaults to null meaning no origin shielding if not set. Refer to the POPs API endpoint to get a list of available POPs used for shielding. [optional] [default to 'null']
request_condition string Condition which, if met, will select this configuration during a request. Optional. [optional]
tls_ciphers string List of OpenSSL ciphers (see the openssl.org manpages for details). Optional. [optional]
tls_sni_hostname string SNI hostname. Optional. [optional]
min_tls_version int Minimum allowed TLS version on connections to this server. Optional. [optional]
max_tls_version int Maximum allowed TLS version on connections to this server. Optional. [optional]
healthcheck string Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. [optional]
comment string A freeform descriptive note. [optional]
type string What type of load balance group to use. [optional]
override_host string The hostname to override the Host header. Defaults to null meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. [optional] [default to 'null']
between_bytes_timeout int Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using bereq.between_bytes_timeout. [optional] [default to 10000]
connect_timeout int How long to wait for a timeout in milliseconds. Optional. [optional]
first_byte_timeout int How long to wait for the first byte in milliseconds. Optional. [optional]
max_conn_default int Maximum number of connections. Optional. [optional] [default to 200]
quorum int Percentage of capacity (0-100) that needs to be operationally available for a pool to be considered up. [optional] [default to 75]
tls_check_cert int Be strict on checking TLS certs. Optional. [optional]

Return type

PoolResponse

Authorization

token

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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