getDatasetCapacity
Acquisition of contract capacity and usage capacity.
GET /v2/api/ba/dataset/(capacity)[;MatrixParameter] Access target: Node server BASIC certified version of he dataset API. # Return Value ## JSON Format ```json { "result": 0, "dataset": { "__ROOT__": { "quota": 3286723723264, "used": 54774784, } } } ``` - result If successful, 0. An error code will be sent internally with any other result. Treat as a system error number. - dataset Information connected to the dataset - \_\_ROOT\_\_ The dataset's root. Follow the parameters below. - quota User's contract capacity(Unit: Byte). - used Capacity used (Unit: Byte). ※It is possible to increase the output parameters due to future expansions.
/v2/api/ba/dataset/(capacity)
Usage and SDK Samples
curl -X GET -H "Authorization: Basic [[basicHash]]" -H "X-TeraCLOUD-API-KEY: [[apiKey]]" "https://api.teracloud.jp/v2/api/ba/dataset/(capacity)"
curl -X GET -H "Authorization: Basic [[basicHash]]" -H "X-TeraCLOUD-API-KEY: [[apiKey]]" "https://api.teracloud.jp/v2/api/ba/dataset/(capacity)"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.BaDatasetApi;
import java.io.File;
import java.util.*;
public class BaDatasetApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: BASIC_AUTH
HttpBasicAuth BASIC_AUTH = (HttpBasicAuth) defaultClient.getAuthentication("BASIC_AUTH");
BASIC_AUTH.setUsername("YOUR USERNAME");
BASIC_AUTH.setPassword("YOUR PASSWORD");
// Configure API key authorization: HEADER_APIKEY
ApiKeyAuth HEADER_APIKEY = (ApiKeyAuth) defaultClient.getAuthentication("HEADER_APIKEY");
HEADER_APIKEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//HEADER_APIKEY.setApiKeyPrefix("Token");
// Configure API key authorization: MATRIX_APIKEY
ApiKeyAuth MATRIX_APIKEY = (ApiKeyAuth) defaultClient.getAuthentication("MATRIX_APIKEY");
MATRIX_APIKEY.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//MATRIX_APIKEY.setApiKeyPrefix("Token");
BaDatasetApi apiInstance = new BaDatasetApi();
try {
apiInstance.getDatasetCapacity();
} catch (ApiException e) {
System.err.println("Exception when calling BaDatasetApi#getDatasetCapacity");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.BaDatasetApi;
public class BaDatasetApiExample {
public static void main(String[] args) {
BaDatasetApi apiInstance = new BaDatasetApi();
try {
apiInstance.getDatasetCapacity();
} catch (ApiException e) {
System.err.println("Exception when calling BaDatasetApi#getDatasetCapacity");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: BASIC_AUTH)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
// Configure API key authorization: (authentication scheme: HEADER_APIKEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-TeraCLOUD-API-KEY"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-TeraCLOUD-API-KEY"];
// Configure API key authorization: (authentication scheme: MATRIX_APIKEY)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
BaDatasetApi *apiInstance = [[BaDatasetApi alloc] init];
// 契約容量と利用容量の取得
[apiInstance getDatasetCapacityWithCompletionHandler:
^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var MuramasaInfiniCloudWebEngineV20 = require('muramasa__infini_cloud_web_engine_v20');
var defaultClient = MuramasaInfiniCloudWebEngineV20.ApiClient.instance;
// Configure HTTP basic authorization: BASIC_AUTH
var BASIC_AUTH = defaultClient.authentications['BASIC_AUTH'];
BASIC_AUTH.username = 'YOUR USERNAME'
BASIC_AUTH.password = 'YOUR PASSWORD'
// Configure API key authorization: HEADER_APIKEY
var HEADER_APIKEY = defaultClient.authentications['HEADER_APIKEY'];
HEADER_APIKEY.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//HEADER_APIKEY.apiKeyPrefix['X-TeraCLOUD-API-KEY'] = "Token"
// Configure API key authorization: MATRIX_APIKEY
var MATRIX_APIKEY = defaultClient.authentications['MATRIX_APIKEY'];
MATRIX_APIKEY.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//MATRIX_APIKEY.apiKeyPrefix['api_key'] = "Token"
var api = new MuramasaInfiniCloudWebEngineV20.BaDatasetApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.getDatasetCapacity(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class getDatasetCapacityExample
{
public void main()
{
// Configure HTTP basic authorization: BASIC_AUTH
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
// Configure API key authorization: HEADER_APIKEY
Configuration.Default.ApiKey.Add("X-TeraCLOUD-API-KEY", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-TeraCLOUD-API-KEY", "Bearer");
// Configure API key authorization: MATRIX_APIKEY
Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");
var apiInstance = new BaDatasetApi();
try
{
// 契約容量と利用容量の取得
apiInstance.getDatasetCapacity();
}
catch (Exception e)
{
Debug.Print("Exception when calling BaDatasetApi.getDatasetCapacity: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BASIC_AUTH
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
// Configure API key authorization: HEADER_APIKEY
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-TeraCLOUD-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-TeraCLOUD-API-KEY', 'Bearer');
// Configure API key authorization: MATRIX_APIKEY
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');
$api_instance = new OpenAPITools\Client\Api\BaDatasetApi();
try {
$api_instance->getDatasetCapacity();
} catch (Exception $e) {
echo 'Exception when calling BaDatasetApi->getDatasetCapacity: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::BaDatasetApi;
# Configure HTTP basic authorization: BASIC_AUTH
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';
# Configure API key authorization: HEADER_APIKEY
$WWW::OPenAPIClient::Configuration::api_key->{'X-TeraCLOUD-API-KEY'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-TeraCLOUD-API-KEY'} = "Bearer";
# Configure API key authorization: MATRIX_APIKEY
$WWW::OPenAPIClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
my $api_instance = WWW::OPenAPIClient::BaDatasetApi->new();
eval {
$api_instance->getDatasetCapacity();
};
if ($@) {
warn "Exception when calling BaDatasetApi->getDatasetCapacity: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BASIC_AUTH
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: HEADER_APIKEY
openapi_client.configuration.api_key['X-TeraCLOUD-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-TeraCLOUD-API-KEY'] = 'Bearer'
# Configure API key authorization: MATRIX_APIKEY
openapi_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['api_key'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.BaDatasetApi()
try:
# 契約容量と利用容量の取得
api_instance.get_dataset_capacity()
except ApiException as e:
print("Exception when calling BaDatasetApi->getDatasetCapacity: %s\n" % e)
extern crate BaDatasetApi;
pub fn main() {
let mut context = BaDatasetApi::Context::default();
let result = client.getDatasetCapacity(&context).wait();
println!("{:?}", result);
}