Skip to content

Latest commit

 

History

History
201 lines (127 loc) · 5.64 KB

ResourceApi.md

File metadata and controls

201 lines (127 loc) · 5.64 KB

ResourceApi

Note

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

Method HTTP request Description
create_resource POST /service/{service_id}/version/{version_id}/resource Create a resource link
delete_resource DELETE /service/{service_id}/version/{version_id}/resource/{id} Delete a resource link
get_resource GET /service/{service_id}/version/{version_id}/resource/{id} Display a resource link
list_resources GET /service/{service_id}/version/{version_id}/resource List resource links
update_resource PUT /service/{service_id}/version/{version_id}/resource/{id} Update a resource link

create_resource

Create a link between a resource and a service version.

let cfg = &Configuration::default();
let params = CreateResourceParams {
    // parameters
};
create_resource(cfg, params)

Parameters

Name Type Description Required Notes
service_id String Alphanumeric string identifying the service. [required]
version_id i32 Integer identifying a service version. [required]
resource_id Option<String> The ID of the underlying linked resource.
name Option<String> The name of the resource link.

Return type

crate::models::ResourceResponse

Authorization

token

HTTP request headers

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

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

delete_resource

Delete a link between a resource and a service version.

let cfg = &Configuration::default();
let params = DeleteResourceParams {
    // parameters
};
delete_resource(cfg, params)

Parameters

Name Type Description Required Notes
service_id String Alphanumeric string identifying the service. [required]
version_id i32 Integer identifying a service version. [required]
id String An alphanumeric string identifying the resource link. [required]

Return type

crate::models::InlineResponse200

Authorization

token

HTTP request headers

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

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

get_resource

Display a resource link by its identifier.

let cfg = &Configuration::default();
let params = GetResourceParams {
    // parameters
};
get_resource(cfg, params)

Parameters

Name Type Description Required Notes
service_id String Alphanumeric string identifying the service. [required]
version_id i32 Integer identifying a service version. [required]
id String An alphanumeric string identifying the resource link. [required]

Return type

crate::models::ResourceResponse

Authorization

token

HTTP request headers

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

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

list_resources

List links between resources and services

let cfg = &Configuration::default();
let params = ListResourcesParams {
    // parameters
};
list_resources(cfg, params)

Parameters

Name Type Description Required Notes
service_id String Alphanumeric string identifying the service. [required]
version_id i32 Integer identifying a service version. [required]

Return type

Vec<crate::models::ResourceResponse>

Authorization

token

HTTP request headers

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

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

update_resource

Update a link between a resource and a service version.

let cfg = &Configuration::default();
let params = UpdateResourceParams {
    // parameters
};
update_resource(cfg, params)

Parameters

Name Type Description Required Notes
service_id String Alphanumeric string identifying the service. [required]
version_id i32 Integer identifying a service version. [required]
id String An alphanumeric string identifying the resource link. [required]
resource_id Option<String> The ID of the underlying linked resource.
name Option<String> The name of the resource link.

Return type

crate::models::ResourceResponse

Authorization

token

HTTP request headers

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

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