Skip to content

Latest commit

 

History

History
161 lines (106 loc) · 4.16 KB

File metadata and controls

161 lines (106 loc) · 4.16 KB

HyperstackApi.BucketsApi

All URIs are relative to https://infrahub-api.nexgencloud.com/v1

Method HTTP request Description
deleteBucketEndpoint DELETE /object-storage/buckets/{bucket_name} Delete a bucket
listBucketsEndpoint GET /object-storage/buckets List buckets
retrieveBucketEndpoint GET /object-storage/buckets/{bucket_name} Retrieve a bucket

deleteBucketEndpoint

ObjectStorageDeleteResponse deleteBucketEndpoint(bucketName, region)

Delete a bucket

Example

import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

let apiInstance = new HyperstackApi.BucketsApi();
let bucketName = "bucketName_example"; // String | 
let region = "region_example"; // String | 
apiInstance.deleteBucketEndpoint(bucketName, region).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
bucketName String
region String

Return type

ObjectStorageDeleteResponse

Authorization

apiKey

HTTP request headers

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

listBucketsEndpoint

ObjectStorageBucketListResponse listBucketsEndpoint(opts)

List buckets

Example

import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

let apiInstance = new HyperstackApi.BucketsApi();
let opts = {
  'search': "search_example" // String | 
};
apiInstance.listBucketsEndpoint(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
search String [optional]

Return type

ObjectStorageBucketListResponse

Authorization

apiKey

HTTP request headers

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

retrieveBucketEndpoint

ObjectStorageBucketResponse retrieveBucketEndpoint(bucketName, region)

Retrieve a bucket

Example

import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

let apiInstance = new HyperstackApi.BucketsApi();
let bucketName = "bucketName_example"; // String | 
let region = "region_example"; // String | 
apiInstance.retrieveBucketEndpoint(bucketName, region).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
bucketName String
region String

Return type

ObjectStorageBucketResponse

Authorization

apiKey

HTTP request headers

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