WebService::Fastly::EnabledProductsApi

Load the API package

use WebService::Fastly::Object::EnabledProductsApi;

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

Method | HTTP request | Description ------------- | ------------- | ------------- disable_product | DELETE /enabled-products/{product_id}/services/{service_id} | Disable a product enable_product | PUT /enabled-products/{product_id}/services/{service_id} | Enable a product get_enabled_product | GET /enabled-products/{product_id}/services/{service_id} | Get enabled product

disable_product

disable_product(product_id => $product_id, service_id => $service_id)

Disable a product

Disable a product on a service. Supported product IDs: brotli_compression,domain_inspector,fanout,image_optimizer,origin_inspector, and websockets.

Example

use Data::Dumper;
use WebService::Fastly::EnabledProductsApi;
my $api_instance = WebService::Fastly::EnabledProductsApi->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 $product_id = origin_inspector; # string | 
my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service.

eval {
    $api_instance->disable_product(product_id => $product_id, service_id => $service_id);
};
if ($@) {
    warn "Exception when calling EnabledProductsApi->disable_product: $@\n";
}

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- product_id | string| | service_id | string| Alphanumeric string identifying the service. |

Return type

void (empty response body)

Authorization

token

HTTP request headers

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

enable_product

EnabledProductResponse enable_product(product_id => $product_id, service_id => $service_id)

Enable a product

Enable a product on a service. Supported product IDs: brotli_compression,domain_inspector,fanout,image_optimizer,origin_inspector, and websockets.

Example

use Data::Dumper;
use WebService::Fastly::EnabledProductsApi;
my $api_instance = WebService::Fastly::EnabledProductsApi->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 $product_id = origin_inspector; # string | 
my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service.

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

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- product_id | string| | service_id | string| Alphanumeric string identifying the service. |

Return type

EnabledProductResponse

Authorization

token

HTTP request headers

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

get_enabled_product

EnabledProductResponse get_enabled_product(product_id => $product_id, service_id => $service_id)

Get enabled product

Get enabled product on a service. Supported product IDs: brotli_compression,domain_inspector,fanout,image_optimizer,origin_inspector, and websockets.

Example

use Data::Dumper;
use WebService::Fastly::EnabledProductsApi;
my $api_instance = WebService::Fastly::EnabledProductsApi->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 $product_id = origin_inspector; # string | 
my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service.

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

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- product_id | string| | service_id | string| Alphanumeric string identifying the service. |

Return type

EnabledProductResponse

Authorization

token

HTTP request headers

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