3DS OUTSCALE API v1.28.7

Welcome to the OUTSCALE API documentation.
The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.

Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.
Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.

You can learn more about errors returned by the API in the dedicated errors page.

Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are differences in resource names between AWS and the OUTSCALE API.
You can also manage your resources using the Cockpit web interface.

An OpenAPI description of the OUTSCALE API is also available in this GitHub repository.

Base URLs:

Terms of service. Email: support@outscale.com. License: BSD 3 Clause.

Authentication Schemes

Access Key/Secret Key

The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.
The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in Signature of API Requests.

In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.

For example, if you use OSC CLI:

  1. You need to create an ~/.osc/config.json file to specify your access key, secret key, and the Region of your account.
  2. You then specify the --profile option when executing OSC CLI commands.

For more information, see Installing and Configuring OSC CLI.

See the code samples in each section of this documentation for specific examples in different programming languages.
For more information about access keys, see About Access Keys.

If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes.

Login/Password

For certain API actions, you can also use basic authentication with the login (email address) and password of your TINA account.
This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.
In most cases, however, you can use the Cockpit web interface to retrieve them.

For example, if you use OSC CLI:

  1. You need to create an ~/.osc/config.json file to specify the Region of your account, but you leave the access key value and secret key value empty ("").
  2. You then specify the --profile, --authentication-method, --login, and --password options when executing OSC CLI commands.

See the code samples in each section of this documentation for specific examples in different programming languages.

If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes.

No Authentication

A few API actions do not require any authentication. They are indicated as such in this documentation.

Other Security Mechanisms

In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.
For more information, see Managing Your API Accesses.

AccessKey

CreateAccessKey

POST /CreateAccessKey

Creates an access key for either your root account or an EIM user. The new key is automatically set to ACTIVE.

For more information, see About Access Keys.

Code samples

# Example with access key/secret key authentication

osc-cli api CreateAccessKey --profile "default" \
  --ExpirationDate "2063-04-05"

# Example with login/password authentication

osc-cli api CreateAccessKey --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --ExpirationDate "2063-04-05"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateAccessKey \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ExpirationDate": "2063-04-05"
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateAccessKey \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "ExpirationDate": "2063-04-05"
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.CreateAccessKey(
    ExpirationDate="2063-04-05",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.AccessKeyApi(config);

    const result = await api.createAccessKey({
        createAccessKeyRequest: {
            expirationDate: "2063-04-05",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ExpirationDate string (date-time or date) The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
UserName string The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateAccessKeyResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "AccessKey": {
    "State": "ACTIVE",
    "AccessKeyId": "ABCDEFGHIJ0123456789",
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "ExpirationDate": "2063-04-05T00:00:00.000+0000",
    "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "LastModificationDate": "2010-10-01T12:34:56.789+0000"
  }
}

DeleteAccessKey

POST /DeleteAccessKey

Deletes the specified access key of either your root account or an EIM user.

The access key of an EIM user must be in the INACTIVE state to be deleted.

Code samples

# Deleting one of your own access keys (if you are the root account or an EIM user)

osc-cli api DeleteAccessKey --profile "default" \
  --AccessKeyId "ABCDEFGHIJ0123456789"
# Deleting the access key of a specific EIM user

osc-cli api DeleteAccessKey --profile "default" \
  --AccessKeyId "ABCDEFGHIJ0123456789" \
  --UserName "example-user"

# Example with login/password authentication

osc-cli api DeleteAccessKey --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --AccessKeyId "ABCDEFGHIJ0123456789" \
  --UserName "example-user"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Deleting one of your own access keys (if you are the root account or an EIM user)

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteAccessKey \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AccessKeyId": "ABCDEFGHIJ0123456789"
  }'
# Deleting the access key of a specific EIM user

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteAccessKey \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AccessKeyId": "ABCDEFGHIJ0123456789",
    "UserName": "example-user"
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteAccessKey \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "AccessKeyId": "ABCDEFGHIJ0123456789",
    "UserName": "example-user"
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

# Deleting one of your own access keys (if you are the root account or an EIM user)
result = gw.DeleteAccessKey(
    AccessKeyId="ABCDEFGHIJ0123456789",
)
print(result)

# Deleting the access key of a specific EIM user
result = gw.DeleteAccessKey(
    AccessKeyId="ABCDEFGHIJ0123456789",
    UserName="example-user",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.AccessKeyApi(config);

    /* Deleting one of your own access keys (if you are the root account or an EIM user) */
    const result = await api.deleteAccessKey({
        deleteAccessKeyRequest: {
            accessKeyId: "ABCDEFGHIJ0123456789",
        },
    });
    console.log(result);

    /* Deleting the access key of a specific EIM user */
    const result2 = await api.deleteAccessKey({
        deleteAccessKeyRequest: {
            accessKeyId: "ABCDEFGHIJ0123456789",
            userName: "example-user",
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
AccessKeyId (required) string The ID of the access key you want to delete.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
UserName string The name of the EIM user the access key you want to delete is associated with. By default, the user who sends the request (which can be the root account).

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteAccessKeyResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadAccessKeys

POST /ReadAccessKeys

Lists the access key IDs of either your root account or an EIM user.

Code samples

# Example with access key/secret key authentication

osc-cli api ReadAccessKeys --profile "default" \
  --Filters '{
      "States": ["ACTIVE"],
    }'

# Example with login/password authentication

osc-cli api ReadAccessKeys --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --Filters '{
      "States": ["ACTIVE"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadAccessKeys \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "States": ["ACTIVE"]
    }
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadAccessKeys \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "States": ["ACTIVE"]
    }
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.ReadAccessKeys(
    Filters={
        "States": ["ACTIVE"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.AccessKeyApi(config);

    const result = await api.readAccessKeys({
        readAccessKeysRequest: {
            filters: {
                states: ["ACTIVE"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersAccessKeys One or more filters.
» AccessKeyIds [string] The IDs of the access keys.
» States [string] The states of the access keys (ACTIVE | INACTIVE).
UserName string The name of the EIM user. By default, the user who sends the request (which can be the root account).

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadAccessKeysResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "AccessKeys": [
    {
      "State": "ACTIVE",
      "AccessKeyId": "ABCDEFGHIJ0123456789",
      "CreationDate": "2010-10-01T12:34:56.789+0000",
      "ExpirationDate": "2063-04-05T00:00:00.000+0000",
      "LastModificationDate": "2010-10-01T12:34:56.789+0000"
    }
  ]
}

ReadSecretAccessKey

POST /ReadSecretAccessKey

Lists information about the specified access key of your root account, including its secret key.

Code samples

# Example with access key/secret key authentication

osc-cli api ReadSecretAccessKey --profile "default" \
  --AccessKeyId "ABCDEFGHIJ0123456789"

# Example with login/password authentication

osc-cli api ReadSecretAccessKey --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --AccessKeyId "ABCDEFGHIJ0123456789"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSecretAccessKey \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AccessKeyId": "ABCDEFGHIJ0123456789"
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSecretAccessKey \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "AccessKeyId": "ABCDEFGHIJ0123456789"
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.ReadSecretAccessKey(
    AccessKeyId="ABCDEFGHIJ0123456789",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.AccessKeyApi(config);

    const result = await api.readSecretAccessKey({
        readSecretAccessKeyRequest: {
            accessKeyId: "ABCDEFGHIJ0123456789",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
AccessKeyId (required) string The ID of the access key.
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadSecretAccessKeyResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "AccessKey": {
    "State": "ACTIVE",
    "AccessKeyId": "ABCDEFGHIJ0123456789",
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "ExpirationDate": "2063-04-05T00:00:00.000+0000",
    "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "LastModificationDate": "2010-10-01T12:34:56.789+0000"
  }
}

UpdateAccessKey

POST /UpdateAccessKey

Modifies the attributes of the specified access key of either your root account or an EIM user.

Code samples

# Updating the expiration date of the access key

osc-cli api UpdateAccessKey --profile "default" \
  --AccessKeyId "ABCDEFGHIJ0123456789" \
  --State "ACTIVE" \
  --ExpirationDate "2063-04-05"
# Updating one of your own access keys (if you are the root account or an EIM user)

osc-cli api UpdateAccessKey --profile "default" \
  --AccessKeyId "ABCDEFGHIJ0123456789" \
  --State "ACTIVE"
# Updating the access key of a specific EIM user

osc-cli api UpdateAccessKey --profile "default" \
  --AccessKeyId "ABCDEFGHIJ0123456789" \
  --State "ACTIVE" \
  --UserName "example-user"

# Example with login/password authentication

osc-cli api UpdateAccessKey --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --AccessKeyId "ABCDEFGHIJ0123456789" \
  --State "ACTIVE" \
  --UserName "example-user"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Updating the expiration date of the access key

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateAccessKey \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AccessKeyId": "ABCDEFGHIJ0123456789",
    "State": "ACTIVE",
    "ExpirationDate": "2063-04-05"
  }'
# Updating one of your own access keys (if you are the root account or an EIM user)

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateAccessKey \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AccessKeyId": "ABCDEFGHIJ0123456789",
    "State": "ACTIVE"
  }'
# Updating the access key of a specific EIM user

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateAccessKey \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AccessKeyId": "ABCDEFGHIJ0123456789",
    "State": "ACTIVE",
    "UserName": "example-user"
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateAccessKey \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "AccessKeyId": "ABCDEFGHIJ0123456789",
    "State": "ACTIVE",
    "UserName": "example-user"
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

# Updating the expiration date of the access key
result = gw.UpdateAccessKey(
    AccessKeyId="ABCDEFGHIJ0123456789",
    State="ACTIVE",
    ExpirationDate="2063-04-05",
)
print(result)

# Updating one of your own access keys (if you are the root account or an EIM user)
result = gw.UpdateAccessKey(
    AccessKeyId="ABCDEFGHIJ0123456789",
    State="ACTIVE",
)
print(result)

# Updating the access key of a specific EIM user
result = gw.UpdateAccessKey(
    AccessKeyId="ABCDEFGHIJ0123456789",
    State="ACTIVE",
    UserName="example-user",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.AccessKeyApi(config);

    /* Updating the expiration date of the access key */
    const result = await api.updateAccessKey({
        updateAccessKeyRequest: {
            accessKeyId: "ABCDEFGHIJ0123456789",
            state: "ACTIVE",
            expirationDate: "2063-04-05",
        },
    });
    console.log(result);

    /* Updating one of your own access keys (if you are the root account or an EIM user) */
    const result2 = await api.updateAccessKey({
        updateAccessKeyRequest: {
            accessKeyId: "ABCDEFGHIJ0123456789",
            state: "ACTIVE",
        },
    });
    console.log(result2);

    /* Updating the access key of a specific EIM user */
    const result3 = await api.updateAccessKey({
        updateAccessKeyRequest: {
            accessKeyId: "ABCDEFGHIJ0123456789",
            state: "ACTIVE",
            userName: "example-user",
        },
    });
    console.log(result3);

}

main();

Available Parameters

Name Type Description
AccessKeyId (required) string The ID of the access key.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ExpirationDate string (date-time or date) The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z or 2020-06-14). If not specified, the access key is set to not expire.
State (required) string The new state for the access key (ACTIVE | INACTIVE). When set to ACTIVE, the access key is enabled and can be used to send requests. When set to INACTIVE, the access key is disabled.
UserName string The name of the EIM user that the access key you want to modify is associated with. If you do not specify a user name, this action modifies the access key of the user who sends the request (which can be the root account).

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateAccessKeyResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "AccessKey": {
    "State": "ACTIVE",
    "AccessKeyId": "ABCDEFGHIJ0123456789",
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "ExpirationDate": "2063-04-05T00:00:00.000+0000",
    "LastModificationDate": "2017-05-10T12:34:56.789+0000"
  }
}

Account

CheckAuthentication

POST /CheckAuthentication

Validates the authenticity of the account.

Code samples

osc-cli api CheckAuthentication --profile "default" \
  --Login "example@example.com" \
  --Password "$OSC_PASSWORD"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CheckAuthentication \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Login": "example@example.com",
    "Password": "'$OSC_PASSWORD'"
  }'

from osc_sdk_python import Gateway
import os

gw = Gateway(**{"profile": "default"})

result = gw.CheckAuthentication(
    Login="example@example.com",
    Password=os.environ.get("OSC_PASSWORD"),
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.AccountApi(config);

    const result = await api.checkAuthentication({
        checkAuthenticationRequest: {
            login: "example@example.com",
            password: process.env.OSC_PASSWORD,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Login (required) string The email address of the account.
Password (required) string The password of the account.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CheckAuthenticationResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

CreateAccount

POST /CreateAccount

Creates an OUTSCALE account.

[IMPORTANT]

  • You need OUTSCALE credentials and the appropriate quotas to create an account via API. To get quotas, you can send an email to sales@outscale.com.
  • If you want to pass a numeral value as a string instead of an integer, you must wrap your string in additional quotes (for example, '"92000"').

For more information, see About Your Account.

Code samples

osc-cli api CreateAccount --profile "default" \
  --City "SAINT-CLOUD" \
  --CompanyName "EXAMPLE SAS" \
  --Country "FRANCE" \
  --CustomerId '"87654321"' \
  --Email "example@example.com" \
  --FirstName "JEAN" \
  --LastName "DUPONT" \
  --ZipCode '"92210"'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateAccount \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "City": "SAINT-CLOUD",
    "CompanyName": "EXAMPLE SAS",
    "Country": "FRANCE",
    "CustomerId": "87654321",
    "Email": "example@example.com",
    "FirstName": "JEAN",
    "LastName": "DUPONT",
    "ZipCode": "92210"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateAccount(
    City="SAINT-CLOUD",
    CompanyName="EXAMPLE SAS",
    Country="FRANCE",
    CustomerId="87654321",
    Email="example@example.com",
    FirstName="JEAN",
    LastName="DUPONT",
    ZipCode="92210",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.AccountApi(config);

    const result = await api.createAccount({
        createAccountRequest: {
            city: "SAINT-CLOUD",
            companyName: "EXAMPLE SAS",
            country: "FRANCE",
            customerId: "87654321",
            email: "example@example.com",
            firstName: "JEAN",
            lastName: "DUPONT",
            zipCode: "92210",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
AdditionalEmails [string] One or more additional email addresses for the account. These addresses are used for notifications only. If you already have a list of additional emails registered, you cannot add to it, only replace it. To remove all registered additional emails, specify an empty list.
City (required) string The city of the account owner.
CompanyName (required) string The name of the company for the account.
Country (required) string The country of the account owner.
CustomerId (required) string The ID of the customer. It must be 8 digits.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Email (required) string The main email address for the account. This address is used for your credentials and notifications.
FirstName (required) string The first name of the account owner.
JobTitle string The job title of the account owner.
LastName (required) string The last name of the account owner.
MobileNumber string The mobile phone number of the account owner.
PhoneNumber string The landline phone number of the account owner.
StateProvince string The state/province of the account.
VatNumber string The value added tax (VAT) number for the account.
ZipCode (required) string The ZIP code of the city.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateAccountResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Account": {
    "ZipCode": "92210",
    "CompanyName": "EXAMPLE SAS",
    "FirstName": "JEAN",
    "City": "SAINT-CLOUD",
    "Country": "FRANCE",
    "LastName": "DUPONT",
    "AccountId": "123456789012",
    "Email": "example@example.com"
  }
}

ReadAccounts

POST /ReadAccounts

Gets information about the account that sent the request.

Code samples

osc-cli api ReadAccounts --profile "default"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadAccounts \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadAccounts()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.AccountApi(config);

    const result = await api.readAccounts({
        readAccountsRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadAccountsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Accounts": [
    {
      "ZipCode": "92210",
      "CompanyName": "EXAMPLE SAS",
      "FirstName": "JEAN",
      "City": "SAINT-CLOUD",
      "Country": "FRANCE",
      "LastName": "DUPONT",
      "AccountId": "123456789012",
      "CustomerId": "87654321",
      "Email": "example@example.com"
    }
  ]
}

ReadConsumptionAccount

POST /ReadConsumptionAccount

Gets information about the consumption of your account for each billable resource within the specified time period.

Code samples

osc-cli api ReadConsumptionAccount --profile "default" \
  --FromDate "2023-06-01" \
  --ToDate "2023-07-01" \
  --ShowPrice True

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadConsumptionAccount \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "FromDate": "2023-06-01",
    "ToDate": "2023-07-01",
    "ShowPrice": true
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadConsumptionAccount(
    FromDate="2023-06-01",
    ToDate="2023-07-01",
    ShowPrice=True,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.AccountApi(config);

    const result = await api.readConsumptionAccount({
        readConsumptionAccountRequest: {
            fromDate: "2023-06-01",
            toDate: "2023-07-01",
            showPrice: true,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
FromDate (required) string (date or date-time) The beginning of the time period, in ISO 8601 date format (for example, 2020-06-14). The date-time format is also accepted, but only with a time set to midnight (for example, 2020-06-14T00:00:00.000Z). This value is included in the time period.
Overall boolean By default or if false, returns only the consumption of the specific account that sends this request. If true, returns either the overall consumption of your paying account and all linked accounts (if the account that sends this request is a paying account) or returns nothing (if the account that sends this request is a linked account).
ShowPrice boolean If true, the response also includes the unit price of the consumed resource (UnitPrice) and the total price of the consumed resource during the specified time period (Price), in the currency of the Region's catalog.
ToDate (required) string (date or date-time) The end of the time period, in ISO 8601 date format (for example, 2020-06-30). The date-time format is also accepted, but only with a time set to midnight (for example, 2020-06-30T00:00:00.000Z). This value is excluded from the time period, and must be set to a later date than FromDate.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadConsumptionAccountResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ConsumptionEntries": [
    {
      "FromDate": "2023-06-01T00:00:00.000+0000",
      "SubregionName": "eu-west-2a",
      "Value": 720,
      "Title": "Instance - On demand - tinav4.c2r4 high performance - par heure",
      "Category": "compute",
      "ToDate": "2023-06-30T00:00:00.000+0000",
      "Service": "TinaOS-FCU",
      "AccountId": "123456789012",
      "PayingAccountId": "123456789012",
      "Operation": "RunInstances-OD",
      "Type": "BoxUsage:tinav4.c2r4p2"
    }
  ]
}

UpdateAccount

POST /UpdateAccount

Updates the account information for the account that sends the request.

Code samples

osc-cli api UpdateAccount --profile "default" \
  --AdditionalEmails '["another@example.com", "yet.another@example.com"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateAccount \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AdditionalEmails": ["another@example.com", "yet.another@example.com"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateAccount(
    AdditionalEmails=["another@example.com","yet.another@example.com"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.AccountApi(config);

    const result = await api.updateAccount({
        updateAccountRequest: {
            additionalEmails: ["another@example.com", "yet.another@example.com"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
AdditionalEmails [string] One or more additional email addresses for the account. These addresses are used for notifications only. If you already have a list of additional emails registered, you cannot add to it, only replace it. To remove all registered additional emails, specify an empty list.
City string The new city of the account owner.
CompanyName string The new name of the company for the account.
Country string The new country of the account owner.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Email string The main email address for the account. This address is used for your credentials and notifications.
FirstName string The new first name of the account owner.
JobTitle string The new job title of the account owner.
LastName string The new last name of the account owner.
MobileNumber string The new mobile phone number of the account owner.
PhoneNumber string The new landline phone number of the account owner.
StateProvince string The new state/province of the account owner.
VatNumber string The new value added tax (VAT) number for the account.
ZipCode string The new ZIP code of the city.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateAccountResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Account": {
    "ZipCode": "92210",
    "CompanyName": "EXAMPLE SAS",
    "FirstName": "JEAN",
    "AdditionalEmails": [
      "another@example.com",
      "yet.another@example.com"
    ],
    "City": "SAINT-CLOUD",
    "Country": "FRANCE",
    "LastName": "DUPONT",
    "AccountId": "123456789012",
    "CustomerId": "87654321",
    "Email": "example@example.com"
  }
}

ApiAccessPolicy

ReadApiAccessPolicy

POST /ReadApiAccessPolicy

Gets information about the API access policy of your account.

For more information, see About Your API Access Policy.

Code samples

# Example with access key/secret key authentication

osc-cli api ReadApiAccessPolicy --profile "default"

# Example with login/password authentication

osc-cli api ReadApiAccessPolicy --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadApiAccessPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{}'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadApiAccessPolicy \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.ReadApiAccessPolicy()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.ApiAccessPolicyApi(config);

    const result = await api.readApiAccessPolicy({
        readApiAccessPolicyRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadApiAccessPolicyResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ApiAccessPolicy": {
    "RequireTrustedEnv": false,
    "MaxAccessKeyExpirationSeconds": 0
  }
}

UpdateApiAccessPolicy

POST /UpdateApiAccessPolicy

Updates the API access policy of your account.

[IMPORTANT]
Only one API access policy can be associated with your account.

Code samples

# Require expiration dates of maximum 1 year

osc-cli api UpdateApiAccessPolicy --profile "default" \
  --MaxAccessKeyExpirationSeconds 31536000 \
  --RequireTrustedEnv False
# Require expiration dates of maximum 100 years and activate a trusted session

osc-cli api UpdateApiAccessPolicy --profile "default" \
  --MaxAccessKeyExpirationSeconds 3153600000 \
  --RequireTrustedEnv True
# Do not require expiration dates and deactivate a trusted session

osc-cli api UpdateApiAccessPolicy --profile "default" \
  --MaxAccessKeyExpirationSeconds 0 \
  --RequireTrustedEnv False

# Example with login/password authentication

osc-cli api UpdateApiAccessPolicy --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --MaxAccessKeyExpirationSeconds 0 \
  --RequireTrustedEnv False

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Require expiration dates of maximum 1 year

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateApiAccessPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "MaxAccessKeyExpirationSeconds": 31536000,
    "RequireTrustedEnv": false
  }'
# Require expiration dates of maximum 100 years and activate a trusted session

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateApiAccessPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "MaxAccessKeyExpirationSeconds": 3153600000,
    "RequireTrustedEnv": true
  }'
# Do not require expiration dates and deactivate a trusted session

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateApiAccessPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "MaxAccessKeyExpirationSeconds": 0,
    "RequireTrustedEnv": false
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateApiAccessPolicy \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "MaxAccessKeyExpirationSeconds": 0,
    "RequireTrustedEnv": false
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

# Require expiration dates of maximum 1 year
result = gw.UpdateApiAccessPolicy(
    MaxAccessKeyExpirationSeconds=31536000,
    RequireTrustedEnv=False,
)
print(result)

# Require expiration dates of maximum 100 years and activate a trusted session
result = gw.UpdateApiAccessPolicy(
    MaxAccessKeyExpirationSeconds=3153600000,
    RequireTrustedEnv=True,
)
print(result)

# Do not require expiration dates and deactivate a trusted session
result = gw.UpdateApiAccessPolicy(
    MaxAccessKeyExpirationSeconds=0,
    RequireTrustedEnv=False,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.ApiAccessPolicyApi(config);

    /* Require expiration dates of maximum 1 year */
    const result = await api.updateApiAccessPolicy({
        updateApiAccessPolicyRequest: {
            maxAccessKeyExpirationSeconds: 31536000,
            requireTrustedEnv: false,
        },
    });
    console.log(result);

    /* Require expiration dates of maximum 100 years and activate a trusted session */
    const result2 = await api.updateApiAccessPolicy({
        updateApiAccessPolicyRequest: {
            maxAccessKeyExpirationSeconds: 3153600000,
            requireTrustedEnv: true,
        },
    });
    console.log(result2);

    /* Do not require expiration dates and deactivate a trusted session */
    const result3 = await api.updateApiAccessPolicy({
        updateApiAccessPolicyRequest: {
            maxAccessKeyExpirationSeconds: 0,
            requireTrustedEnv: false,
        },
    });
    console.log(result3);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
MaxAccessKeyExpirationSeconds (required) integer (int64) The maximum possible lifetime for your access keys, in seconds (between 0 and 3153600000, both included). If set to O, your access keys can have unlimited lifetimes, but a trusted session cannot be activated. Otherwise, all your access keys must have an expiration date. This value must be greater than the remaining lifetime of each access key of your account.
RequireTrustedEnv (required) boolean If true, a trusted session is activated, provided that you specify the MaxAccessKeyExpirationSeconds parameter with a value greater than 0.
Enabling this will require you and all your users to log in to Cockpit v2 using the WebAuthn method for multi-factor authentication. For more information, see About Authentication > Multi-Factor Authentication.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateApiAccessPolicyResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Require expiration dates of maximum 1 year
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ApiAccessPolicy": {
    "RequireTrustedEnv": false,
    "MaxAccessKeyExpirationSeconds": 31536000
  }
}
# Require expiration dates of maximum 100 years and activate a trusted session
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ApiAccessPolicy": {
    "RequireTrustedEnv": true,
    "MaxAccessKeyExpirationSeconds": 3153600000
  }
}
# Do not require expiration dates and deactivate a trusted session
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ApiAccessPolicy": {
    "RequireTrustedEnv": false,
    "MaxAccessKeyExpirationSeconds": 0
  }
}

ApiAccessRule

CreateApiAccessRule

POST /CreateApiAccessRule

Creates a rule to allow access to the API from your account.
You need to specify at least the CaIds or the IpRanges parameter.

[NOTE]
By default, your account has a set of rules allowing global access, that you can delete.

For more information, see About API Access Rules.

Code samples

# Creating an API access rule based on IPs

osc-cli api CreateApiAccessRule --profile "default" \
  --IpRanges '["192.0.2.0", "198.51.100.0/24"]' \
  --Description "Basic API Access Rule with IPs"
# Creating an API access rule based on IPs and Certificate Authority (CA)

osc-cli api CreateApiAccessRule --profile "default" \
  --IpRanges '["192.0.2.0", "198.51.100.0/24"]' \
  --CaIds '["ca-fedcba0987654321fedcba0987654321"]' \
  --Description "API Access Rule with IPs and CA"

# Example with login/password authentication

osc-cli api CreateApiAccessRule --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --IpRanges '["192.0.2.0", "198.51.100.0/24"]' \
  --CaIds '["ca-fedcba0987654321fedcba0987654321"]' \
  --Description "API Access Rule with IPs and CA"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating an API access rule based on IPs

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateApiAccessRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "IpRanges": ["192.0.2.0", "198.51.100.0/24"],
    "Description": "Basic API Access Rule with IPs"
  }'
# Creating an API access rule based on IPs and Certificate Authority (CA)

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateApiAccessRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "IpRanges": ["192.0.2.0", "198.51.100.0/24"],
    "CaIds": ["ca-fedcba0987654321fedcba0987654321"],
    "Description": "API Access Rule with IPs and CA"
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateApiAccessRule \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "IpRanges": ["192.0.2.0", "198.51.100.0/24"],
    "CaIds": ["ca-fedcba0987654321fedcba0987654321"],
    "Description": "API Access Rule with IPs and CA"
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

# Creating an API access rule based on IPs
result = gw.CreateApiAccessRule(
    IpRanges=["192.0.2.0","198.51.100.0/24"],
    Description="Basic API Access Rule with IPs",
)
print(result)

# Creating an API access rule based on IPs and Certificate Authority (CA)
result = gw.CreateApiAccessRule(
    IpRanges=["192.0.2.0","198.51.100.0/24"],
    CaIds=["ca-fedcba0987654321fedcba0987654321"],
    Description="API Access Rule with IPs and CA",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.ApiAccessRuleApi(config);

    /* Creating an API access rule based on IPs */
    const result = await api.createApiAccessRule({
        createApiAccessRuleRequest: {
            ipRanges: ["192.0.2.0", "198.51.100.0/24"],
            description: "Basic API Access Rule with IPs",
        },
    });
    console.log(result);

    /* Creating an API access rule based on IPs and Certificate Authority (CA) */
    const result2 = await api.createApiAccessRule({
        createApiAccessRuleRequest: {
            ipRanges: ["192.0.2.0", "198.51.100.0/24"],
            caIds: ["ca-fedcba0987654321fedcba0987654321"],
            description: "API Access Rule with IPs and CA",
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
CaIds [string] One or more IDs of Client Certificate Authorities (CAs).
Cns [string] One or more Client Certificate Common Names (CNs). If this parameter is specified, you must also specify the CaIds parameter.
Description string A description for the API access rule.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
IpRanges [string] One or more IPs or CIDR blocks (for example, 192.0.2.0/16).

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateApiAccessRuleResponse

Example responses

# Creating an API access rule based on IPs
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ApiAccessRule": {
    "IpRanges": [
      "192.0.2.0",
      "198.51.100.0/24"
    ],
    "ApiAccessRuleId": "aar-fedcba0987654321fedcba0987654321",
    "CaIds": [],
    "Cns": [],
    "Description": "Basic API Access Rule with IPs"
  }
}
# Creating an API access rule based on IPs and Certificate Authority (CA)
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ApiAccessRule": {
    "IpRanges": [
      "192.0.2.0",
      "198.51.100.0/24"
    ],
    "ApiAccessRuleId": "aar-fedcba0987654321fedcba0987654321",
    "CaIds": [
      "ca-fedcba0987654321fedcba0987654321"
    ],
    "Cns": [],
    "Description": "API Access Rule with IPs and CA"
  }
}

DeleteApiAccessRule

POST /DeleteApiAccessRule

Deletes a specified API access rule.

[IMPORTANT]
You cannot delete the last remaining API access rule. However, if you delete all the API access rules that allow you to access the APIs, you need to contact the Support team to regain access. For more information, see Technical Support.

Code samples

# Example with access key/secret key authentication

osc-cli api DeleteApiAccessRule --profile "default" \
  --ApiAccessRuleId "aar-1234567890abcdef1234567890abcdef"

# Example with login/password authentication

osc-cli api DeleteApiAccessRule --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --ApiAccessRuleId "aar-1234567890abcdef1234567890abcdef"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteApiAccessRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ApiAccessRuleId": "aar-1234567890abcdef1234567890abcdef"
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteApiAccessRule \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "ApiAccessRuleId": "aar-1234567890abcdef1234567890abcdef"
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.DeleteApiAccessRule(
    ApiAccessRuleId="aar-1234567890abcdef1234567890abcdef",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.ApiAccessRuleApi(config);

    const result = await api.deleteApiAccessRule({
        deleteApiAccessRuleRequest: {
            apiAccessRuleId: "aar-1234567890abcdef1234567890abcdef",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
ApiAccessRuleId (required) string The ID of the API access rule you want to delete.
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteApiAccessRuleResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadApiAccessRules

POST /ReadApiAccessRules

Lists one or more API access rules.

Code samples

# Example with access key/secret key authentication

osc-cli api ReadApiAccessRules --profile "default" \
  --Filters '{
      "ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"],
    }'

# Example with login/password authentication

osc-cli api ReadApiAccessRules --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --Filters '{
      "ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadApiAccessRules \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"]
    }
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadApiAccessRules \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"]
    }
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.ReadApiAccessRules(
    Filters={
        "ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.ApiAccessRuleApi(config);

    const result = await api.readApiAccessRules({
        readApiAccessRulesRequest: {
            filters: {
                apiAccessRuleIds: ["aar-1234567890abcdef1234567890abcdef"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersApiAccessRule One or more filters.
» ApiAccessRuleIds [string] One or more IDs of API access rules.
» CaIds [string] One or more IDs of Client Certificate Authorities (CAs).
» Cns [string] One or more Client Certificate Common Names (CNs).
» Descriptions [string] One or more descriptions of API access rules.
» IpRanges [string] One or more IPs or CIDR blocks (for example, 192.0.2.0/16).

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadApiAccessRulesResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ApiAccessRules": [
    {
      "IpRanges": [
        "0.0.0.0/0"
      ],
      "ApiAccessRuleId": "aar-1234567890abcdef1234567890abcdef",
      "CaIds": [],
      "Cns": [],
      "Description": "Allows all IPv4 domain"
    },
    {
      "IpRanges": [
        "46.231.144.178/32"
      ],
      "ApiAccessRuleId": "aar-abcdef1234567890abcdef1234567890",
      "CaIds": [],
      "Cns": [],
      "Description": "Allows Outscale Cockpit of this region"
    }
  ]
}

UpdateApiAccessRule

POST /UpdateApiAccessRule

Modifies a specified API access rule.

[WARNING]

  • The new rule you specify fully replaces the old rule. Therefore, for a parameter that is not specified, any previously set value is deleted.
  • If, as result of your modification, you no longer have access to the APIs, you will need to contact the Support team to regain access. For more information, see Technical Support.

Code samples

# Example with access key/secret key authentication

osc-cli api UpdateApiAccessRule --profile "default" \
  --ApiAccessRuleId "aar-1234567890abcdef1234567890abcdef" \
  --IpRanges '["0.0.0.0/0"]' \
  --Description "Allows all Ipv4 domain"

# Example with login/password authentication

osc-cli api UpdateApiAccessRule --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --ApiAccessRuleId "aar-1234567890abcdef1234567890abcdef" \
  --IpRanges '["0.0.0.0/0"]' \
  --Description "Allows all Ipv4 domain"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateApiAccessRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ApiAccessRuleId": "aar-1234567890abcdef1234567890abcdef",
    "IpRanges": ["0.0.0.0/0"],
    "Description": "Allows all Ipv4 domain"
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateApiAccessRule \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "ApiAccessRuleId": "aar-1234567890abcdef1234567890abcdef",
    "IpRanges": ["0.0.0.0/0"],
    "Description": "Allows all Ipv4 domain"
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.UpdateApiAccessRule(
    ApiAccessRuleId="aar-1234567890abcdef1234567890abcdef",
    IpRanges=["0.0.0.0/0"],
    Description="Allows all Ipv4 domain",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.ApiAccessRuleApi(config);

    const result = await api.updateApiAccessRule({
        updateApiAccessRuleRequest: {
            apiAccessRuleId: "aar-1234567890abcdef1234567890abcdef",
            ipRanges: ["0.0.0.0/0"],
            description: "Allows all Ipv4 domain",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
ApiAccessRuleId (required) string The ID of the API access rule you want to update.
CaIds [string] One or more IDs of Client Certificate Authorities (CAs).
Cns [string] One or more Client Certificate Common Names (CNs).
Description string A new description for the API access rule.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
IpRanges [string] One or more IPs or CIDR blocks (for example, 192.0.2.0/16).

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateApiAccessRuleResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ApiAccessRule": {
    "IpRanges": [
      "0.0.0.0/0"
    ],
    "ApiAccessRuleId": "aar-1234567890abcdef1234567890abcdef",
    "CaIds": [],
    "Cns": [],
    "Description": "Allows all IPv4 domain"
  }
}

ApiLog

ReadApiLogs

POST /ReadApiLogs

Lists the logs of the API calls you have performed with this account.

[IMPORTANT]
Past logs are accessible for up to 32 days.
By default, the retrieved interval is 48 hours. If neither of the QueryDateBefore nor QueryDateAfter parameters are specified, logs from the past 48 hours are retrieved. If you only specify one of two, logs are retrieved from a 2-day interval based on the date you provided. To retrieve logs beyond a 2-day interval, specify both parameters.

For more information, see About OUTSCALE Monitoring Services (OMS).

Code samples

osc-cli api ReadApiLogs --profile "default" \
  --Filters '{
      "QueryIpAddresses": ["192.0.2.0", "198.51.100.0"],
      "QueryDateAfter": "2017-05-10",
      "QueryDateBefore": "2017-05-10",
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadApiLogs \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "QueryIpAddresses": ["192.0.2.0", "198.51.100.0"],
      "QueryDateAfter": "2017-05-10",
      "QueryDateBefore": "2017-05-10"
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadApiLogs(
    Filters={
        "QueryIpAddresses": ["192.0.2.0","198.51.100.0"],
        "QueryDateAfter": "2017-05-10",
        "QueryDateBefore": "2017-05-10",
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ApiLogApi(config);

    const result = await api.readApiLogs({
        readApiLogsRequest: {
            filters: {
                queryIpAddresses: ["192.0.2.0", "198.51.100.0"],
                queryDateAfter: "2017-05-10",
                queryDateBefore: "2017-05-10",
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersApiLog One or more filters.
» QueryAccessKeys [string] The access keys used for the logged calls.
» QueryApiNames [string] The names of the APIs of the logged calls (always oapi for the OUTSCALE API).
» QueryCallNames [string] The names of the logged calls.
» QueryDateAfter string (date-time or date) The date and time, or the date, after which you want to retrieve logged calls, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z or 2020-06-14). By default, this date is set to 48 hours before the QueryDateBefore parameter value.
» QueryDateBefore string (date-time or date) The date and time, or the date, before which you want to retrieve logged calls, in ISO 8601 format (for example, 2020-06-30T00:00:00.000Z or 2020-06-14). By default, this date is set to now, or 48 hours after the QueryDateAfter parameter value.
» QueryIpAddresses [string] The IPs used for the logged calls.
» QueryUserAgents [string] The user agents of the HTTP requests of the logged calls.
» RequestIds [string] The request IDs provided in the responses of the logged calls.
» ResponseStatusCodes [integer] The HTTP status codes of the logged calls.
NextPageToken string The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.
With With The information to display in each returned log.
» AccountId boolean By default or if set to true, the account ID is displayed.
» CallDuration boolean By default or if set to true, the duration of the call is displayed.
» QueryAccessKey boolean By default or if set to true, the access key is displayed.
» QueryApiName boolean By default or if set to true, the name of the API is displayed.
» QueryApiVersion boolean By default or if set to true, the version of the API is displayed.
» QueryCallName boolean By default or if set to true, the name of the call is displayed.
» QueryDate boolean By default or if set to true, the date of the call is displayed.
» QueryHeaderRaw boolean By default or if set to true, the raw header of the HTTP request is displayed.
» QueryHeaderSize boolean By default or if set to true, the size of the raw header of the HTTP request is displayed.
» QueryIpAddress boolean By default or if set to true, the IP is displayed.
» QueryPayloadRaw boolean By default or if set to true, the raw payload of the HTTP request is displayed.
» QueryPayloadSize boolean By default or if set to true, the size of the raw payload of the HTTP request is displayed.
» QueryUserAgent boolean By default or if set to true, the user agent of the HTTP request is displayed.
» RequestId boolean By default or if set to true, the request ID is displayed.
» ResponseSize boolean By default or if set to true, the size of the response is displayed.
» ResponseStatusCode boolean By default or if set to true, the HTTP status code of the response is displayed.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadApiLogsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Logs": [
    {
      "ResponseStatusCode": 200,
      "ResponseSize": 1887,
      "QueryPayloadRaw": "{}",
      "QueryApiName": "oapi",
      "QueryIpAddress": "192.0.2.0",
      "QueryUserAgent": "oAPI CLI v0.1 - 2018-09-28",
      "CallDuration": 47,
      "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157",
      "QueryApiVersion": "1.27",
      "AccountId": "123456789012",
      "QueryPayloadSize": 2,
      "QueryCallName": "ReadAccessKeys",
      "QueryAccessKey": "ABCDEFGHIJ0123456789",
      "QueryHeaderSize": 287,
      "QueryDate": "2017-05-10T12:34:56.789Z",
      "QueryHeaderRaw": "Host: api.eu-west-2.outscale.com\\nAccept: */*\\nConnection: close\\nUser-Agent: oAPI CLI v0.1 - 2018-09-28\\nX-Osc-Date: 20170510T000000Z\\nContent-Type: application/json; charset=utf-8\\nAuthorization: *****\\nContent-Length: 2\\nAccept-Encoding: gzip, deflate\\nX-Forwarded-For: 192.0.2.0"
    }
  ]
}

Ca

CreateCa

POST /CreateCa

Creates a Client Certificate Authority (CA).

For more information, see About API Access Rules.

Code samples

# Example with access key/secret key authentication

osc-cli api CreateCa --profile "default" \
  --CaPem="$(cat ca-certificate.pem)" \
  --Description "CA example"

# Example with login/password authentication

osc-cli api CreateCa --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --CaPem="$(cat ca-certificate.pem)" \
  --Description "CA example"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateCa \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "CaPem": "XXXX",
    "Description": "CA example"
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateCa \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "CaPem": "XXXX",
    "Description": "CA example"
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.CreateCa(
    CaPem="XXXX",
    Description="CA example",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.CaApi(config);

    const result = await api.createCa({
        createCaRequest: {
            caPem: "XXXX",
            description: "CA example",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
CaPem (required) string The CA in PEM format.
With OSC CLI, use the following syntax to make sure your CA file is correctly parsed: --CaPem="$(cat FILENAME)".
Description string The description of the CA.
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateCaResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Ca": {
    "Description": "CA example",
    "CaId": "ca-fedcba0987654321fedcba0987654321",
    "CaFingerprint": "1234567890abcdef1234567890abcdef12345678"
  }
}

DeleteCa

POST /DeleteCa

Deletes a specified Client Certificate Authority (CA).

Code samples

# Example with access key/secret key authentication

osc-cli api DeleteCa --profile "default" \
  --CaId "ca-fedcba0987654321fedcba0987654321"

# Example with login/password authentication

osc-cli api DeleteCa --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --CaId "ca-fedcba0987654321fedcba0987654321"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteCa \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "CaId": "ca-fedcba0987654321fedcba0987654321"
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteCa \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "CaId": "ca-fedcba0987654321fedcba0987654321"
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.DeleteCa(
    CaId="ca-fedcba0987654321fedcba0987654321",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.CaApi(config);

    const result = await api.deleteCa({
        deleteCaRequest: {
            caId: "ca-fedcba0987654321fedcba0987654321",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
CaId (required) string The ID of the CA you want to delete.
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteCaResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadCas

POST /ReadCas

Gets information about one or more of your Client Certificate Authorities (CAs).

Code samples

# Example with access key/secret key authentication

osc-cli api ReadCas --profile "default" \
  --Filters '{
      "CaIds": ["ca-fedcba0987654321fedcba0987654321"],
    }'

# Example with login/password authentication

osc-cli api ReadCas --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --Filters '{
      "CaIds": ["ca-fedcba0987654321fedcba0987654321"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadCas \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "CaIds": ["ca-fedcba0987654321fedcba0987654321"]
    }
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadCas \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "CaIds": ["ca-fedcba0987654321fedcba0987654321"]
    }
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.ReadCas(
    Filters={
        "CaIds": ["ca-fedcba0987654321fedcba0987654321"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.CaApi(config);

    const result = await api.readCas({
        readCasRequest: {
            filters: {
                caIds: ["ca-fedcba0987654321fedcba0987654321"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersCa One or more filters.
» CaFingerprints [string] The fingerprints of the CAs.
» CaIds [string] The IDs of the CAs.
» Descriptions [string] The descriptions of the CAs.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadCasResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Cas": [
    {
      "Description": "CA example",
      "CaId": "ca-fedcba0987654321fedcba0987654321",
      "CaFingerprint": "1234567890abcdef1234567890abcdef12345678"
    }
  ]
}

UpdateCa

POST /UpdateCa

Modifies the specified attribute of a Client Certificate Authority (CA).

Code samples

# Example with access key/secret key authentication

osc-cli api UpdateCa --profile "default" \
  --CaId "ca-fedcba0987654321fedcba0987654321" \
  --Description "New description"

# Example with login/password authentication

osc-cli api UpdateCa --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
  --CaId "ca-fedcba0987654321fedcba0987654321" \
  --Description "New description"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Example with access key/secret key authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateCa \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "CaId": "ca-fedcba0987654321fedcba0987654321",
    "Description": "New description"
  }'

# Example with login/password authentication

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateCa \
  --header "Authorization: Basic $(echo -n "$OSC_EMAIL:$OSC_PASSWORD" | base64)" \
  --header "X-Osc-Date: $(TZ=GMT date +%Y%m%dT%H%M%SZ)" \
  --header 'Content-Type: application/json' \
  --data '{
    "CaId": "ca-fedcba0987654321fedcba0987654321",
    "Description": "New description"
  }'

from osc_sdk_python import Gateway
# import os

gw = Gateway(**{"profile": "default"})  # For access key/secret key authentication
# gw = Gateway(email=os.environ.get("OSC_EMAIL"), password=os.environ.get("OSC_PASSWORD"))  # For login/password authentication

result = gw.UpdateCa(
    CaId="ca-fedcba0987654321fedcba0987654321",
    Description="New description",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
        /* For login/password authentication, replace the above awsV4SignParameters key with: */
        /* username: process.env.OSC_USERNAME, */
        /* password: process.env.OSC_PASSWORD, */
    });
    const api = new osc.CaApi(config);

    const result = await api.updateCa({
        updateCaRequest: {
            caId: "ca-fedcba0987654321fedcba0987654321",
            description: "New description",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
CaId (required) string The ID of the CA.
Description string The description of the CA.
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateCaResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Ca": {
    "Description": "New description",
    "CaId": "ca-fedcba0987654321fedcba0987654321",
    "CaFingerprint": "1234567890abcdef1234567890abcdef12345678"
  }
}

Catalog

ReadCatalog

POST /ReadCatalog

Returns the price list of OUTSCALE services for the current Region.

Code samples

osc-cli api ReadCatalog --profile "default"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadCatalog \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadCatalog()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.CatalogApi(config);

    const result = await api.readCatalog({
        readCatalogRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadCatalogResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Catalog": {
    "Entries": [
      {
        "UnitPrice": 0.04,
        "Type": "CustomCore:v5-p1",
        "Title": "Instance - On demand - Unite de vCore pour une instance Tina v5 CxRy Performance highest - par heure",
        "SubregionName": "eu-west-2",
        "Category": "compute",
        "Service": "TinaOS-FCU",
        "Operation": "RunInstances-OD"
      }
    ]
  }
}

ReadCatalogs

POST /ReadCatalogs

Returns the price list of OUTSCALE services for the current Region within a specific time period.

Code samples

osc-cli api ReadCatalogs --profile "default" \
  --Filters '{
      "CurrentCatalogOnly": True,
      "FromDate": "2021-01-01",
      "ToDate": "2023-01-01",
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadCatalogs \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "CurrentCatalogOnly": true,
      "FromDate": "2021-01-01",
      "ToDate": "2023-01-01"
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadCatalogs(
    Filters={
        "CurrentCatalogOnly": True,
        "FromDate": "2021-01-01",
        "ToDate": "2023-01-01",
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.CatalogApi(config);

    const result = await api.readCatalogs({
        readCatalogsRequest: {
            filters: {
                currentCatalogOnly: true,
                fromDate: "2021-01-01",
                toDate: "2023-01-01",
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersCatalogs One or more filters.
» CurrentCatalogOnly boolean By default or if set to true, only returns the current catalog. If false, returns the current catalog and past catalogs.
» FromDate string (date) The beginning of the time period, in ISO 8601 date format (for example, 2020-06-14). This date cannot be older than 3 years. You must specify the parameters FromDate and ToDate together.
» ToDate string (date) The end of the time period, in ISO 8601 date format (for example, 2020-06-30). You must specify the parameters FromDate and ToDate together.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadCatalogsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Catalogs": [
    {
      "State": "CURRENT",
      "FromDate": "2021-01-01T00:00:00.000+0000",
      "Entries": [
        {
          "UnitPrice": 0.04,
          "Type": "CustomCore:v5-p1",
          "Title": "Instance - On demand - Unite de vCore pour une instance Tina v5 CxRy Performance highest - par heure",
          "SubregionName": "eu-west-2",
          "Category": "compute",
          "Service": "TinaOS-FCU",
          "Operation": "RunInstances-OD"
        }
      ]
    }
  ]
}

ClientGateway

CreateClientGateway

POST /CreateClientGateway

Provides information about your client gateway.
This action registers information to identify the client gateway that you deployed in your network.
To open a tunnel to the client gateway, you must provide the communication protocol type, the fixed public IP of the gateway, and an Autonomous System Number (ASN).

For more information, see About Client Gateways.

Code samples

osc-cli api CreateClientGateway --profile "default" \
  --ConnectionType "ipsec.1" \
  --PublicIp "192.0.2.0" \
  --BgpAsn 65000

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateClientGateway \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ConnectionType": "ipsec.1",
    "PublicIp": "192.0.2.0",
    "BgpAsn": 65000
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateClientGateway(
    ConnectionType="ipsec.1",
    PublicIp="192.0.2.0",
    BgpAsn=65000,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ClientGatewayApi(config);

    const result = await api.createClientGateway({
        createClientGatewayRequest: {
            connectionType: "ipsec.1",
            publicIp: "192.0.2.0",
            bgpAsn: 65000,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
BgpAsn (required) integer The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the path to your client gateway through the Internet.
This number must be between 1 and 4294967295. If you do not have an ASN, you can choose one between 64512 and 65534, or between 4200000000 and 4294967294.
ConnectionType (required) string The communication protocol used to establish tunnel with your client gateway (only ipsec.1 is supported).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
PublicIp (required) string The public fixed IPv4 address of your client gateway.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateClientGatewayResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ClientGateway": {
    "State": "available",
    "BgpAsn": 65000,
    "Tags": [],
    "ClientGatewayId": "cgw-12345678",
    "ConnectionType": "ipsec.1",
    "PublicIp": "192.0.2.0"
  }
}

DeleteClientGateway

POST /DeleteClientGateway

Deletes a client gateway.
You must delete the VPN connection before deleting the client gateway.

Code samples

osc-cli api DeleteClientGateway --profile "default" \
  --ClientGatewayId "cgw-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteClientGateway \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ClientGatewayId": "cgw-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteClientGateway(
    ClientGatewayId="cgw-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ClientGatewayApi(config);

    const result = await api.deleteClientGateway({
        deleteClientGatewayRequest: {
            clientGatewayId: "cgw-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
ClientGatewayId (required) string The ID of the client gateway you want to delete.
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteClientGatewayResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadClientGateways

POST /ReadClientGateways

Lists one or more of your client gateways.

Code samples

osc-cli api ReadClientGateways --profile "default" \
  --Filters '{
      "ClientGatewayIds": ["cgw-12345678"],
    }'
osc-cli api ReadClientGateways --profile "default" \
  --Filters '{
      "BgpAsns": [65000],
      "PublicIps": ["192.0.2.0", "198.51.100.0"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadClientGateways \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ClientGatewayIds": ["cgw-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadClientGateways \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "BgpAsns": [65000],
      "PublicIps": ["192.0.2.0", "198.51.100.0"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadClientGateways(
    Filters={
        "ClientGatewayIds": ["cgw-12345678"],
    },
)
print(result)

result = gw.ReadClientGateways(
    Filters={
        "BgpAsns": [65000],
        "PublicIps": ["192.0.2.0","198.51.100.0"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ClientGatewayApi(config);

    const result = await api.readClientGateways({
        readClientGatewaysRequest: {
            filters: {
                clientGatewayIds: ["cgw-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readClientGateways({
        readClientGatewaysRequest: {
            filters: {
                bgpAsns: [65000],
                publicIps: ["192.0.2.0", "198.51.100.0"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersClientGateway One or more filters.
» BgpAsns [integer] The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of the connections.
» ClientGatewayIds [string] The IDs of the client gateways.
» ConnectionTypes [string] The types of communication tunnels used by the client gateways (only ipsec.1 is supported).
» PublicIps [string] The public IPv4 addresses of the client gateways.
» States [string] The states of the client gateways (pending | available | deleting | deleted).
» TagKeys [string] The keys of the tags associated with the client gateways.
» TagValues [string] The values of the tags associated with the client gateways.
» Tags [string] The key/value combination of the tags associated with the client gateways, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadClientGatewaysResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ClientGateways": [
    {
      "State": "available",
      "BgpAsn": 65000,
      "Tags": [],
      "ClientGatewayId": "cgw-12345678",
      "ConnectionType": "ipsec.1",
      "PublicIp": "192.0.2.0"
    }
  ]
}

DedicatedGroup

CreateDedicatedGroup

POST /CreateDedicatedGroup

[WARNING]
This feature is currently in beta.

Creates a dedicated group for virtual machines (VMs).

For more information, see About Dedicated Groups.

Code samples

osc-cli api CreateDedicatedGroup --profile "default" \
  --CpuGeneration 4 \
  --Name "dedicated-group-example" \
  --SubregionName "eu-west-2a"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateDedicatedGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "CpuGeneration": 4,
    "Name": "dedicated-group-example",
    "SubregionName": "eu-west-2a"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateDedicatedGroup(
    CpuGeneration=4,
    Name="dedicated-group-example",
    SubregionName="eu-west-2a",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DedicatedGroupApi(config);

    const result = await api.createDedicatedGroup({
        createDedicatedGroupRequest: {
            cpuGeneration: 4,
            name: "dedicated-group-example",
            subregionName: "eu-west-2a",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
CpuGeneration (required) integer The processor generation for the VMs in the dedicated group (for example, 4).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Name (required) string A name for the dedicated group.
SubregionName (required) string The Subregion in which you want to create the dedicated group.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateDedicatedGroupResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DedicatedGroup": {
    "VmIds": [],
    "NetIds": [],
    "AccountId": "123456789012",
    "CpuGeneration": 4,
    "Name": "dedicated-group-example",
    "SubregionName": "eu-west-2a",
    "DedicatedGroupId": "ded-12345678"
  }
}

DeleteDedicatedGroup

POST /DeleteDedicatedGroup

[WARNING]
This feature is currently in beta.

Deletes a specified dedicated group of virtual machines (VMs).

[WARNING]
A dedicated group can be deleted only if no VM or Net is in the dedicated group. Otherwise, you need to force the deletion.
If you force the deletion:

  • all VMs are terminated.
  • all Nets are deleted, and all resources associated with Nets are detached.

Code samples

# Deleting a dedicated group without any resource in it.

osc-cli api DeleteDedicatedGroup --profile "default" \
  --DedicatedGroupId "ded-12345678"
# Forcing the deletion of a dedicated group and all resources in it.

osc-cli api DeleteDedicatedGroup --profile "default" \
  --DedicatedGroupId "ded-12345678" \
  --Force True

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Deleting a dedicated group without any resource in it.

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteDedicatedGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DedicatedGroupId": "ded-12345678"
  }'
# Forcing the deletion of a dedicated group and all resources in it.

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteDedicatedGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DedicatedGroupId": "ded-12345678",
    "Force": true
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Deleting a dedicated group without any resource in it.
result = gw.DeleteDedicatedGroup(
    DedicatedGroupId="ded-12345678",
)
print(result)

# Forcing the deletion of a dedicated group and all resources in it.
result = gw.DeleteDedicatedGroup(
    DedicatedGroupId="ded-12345678",
    Force=True,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DedicatedGroupApi(config);

    /* Deleting a dedicated group without any resource in it. */
    const result = await api.deleteDedicatedGroup({
        deleteDedicatedGroupRequest: {
            dedicatedGroupId: "ded-12345678",
        },
    });
    console.log(result);

    /* Forcing the deletion of a dedicated group and all resources in it. */
    const result2 = await api.deleteDedicatedGroup({
        deleteDedicatedGroupRequest: {
            dedicatedGroupId: "ded-12345678",
            force: true,
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DedicatedGroupId (required) string The ID of the dedicated group you want to delete.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Force boolean If true, forces the deletion of the dedicated group and all its dependencies.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteDedicatedGroupResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadDedicatedGroups

POST /ReadDedicatedGroups

[WARNING]
This feature is currently in beta.

List one or more dedicated groups of virtual machines (VMs).

Code samples

# Filtering on a specific dedicated group

osc-cli api ReadDedicatedGroups --profile "default" \
  --Filters '{
      "DedicatedGroupIds": ["ded-12345678"],
    }'
# Filtering on a specific Subregion and CPU generation

osc-cli api ReadDedicatedGroups --profile "default" \
  --Filters '{
      "SubregionNames": ["eu-west-2a"],
      "CpuGenerations": [4],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Filtering on a specific dedicated group

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadDedicatedGroups \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "DedicatedGroupIds": ["ded-12345678"]
    }
  }'
# Filtering on a specific Subregion and CPU generation

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadDedicatedGroups \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "SubregionNames": ["eu-west-2a"],
      "CpuGenerations": [4]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Filtering on a specific dedicated group
result = gw.ReadDedicatedGroups(
    Filters={
        "DedicatedGroupIds": ["ded-12345678"],
    },
)
print(result)

# Filtering on a specific Subregion and CPU generation
result = gw.ReadDedicatedGroups(
    Filters={
        "SubregionNames": ["eu-west-2a"],
        "CpuGenerations": [4],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DedicatedGroupApi(config);

    /* Filtering on a specific dedicated group */
    const result = await api.readDedicatedGroups({
        readDedicatedGroupsRequest: {
            filters: {
                dedicatedGroupIds: ["ded-12345678"],
            },
        },
    });
    console.log(result);

    /* Filtering on a specific Subregion and CPU generation */
    const result2 = await api.readDedicatedGroups({
        readDedicatedGroupsRequest: {
            filters: {
                subregionNames: ["eu-west-2a"],
                cpuGenerations: [4],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersDedicatedGroup One or more filters.
» CpuGenerations [integer] The processor generation for the VMs in the dedicated group (for example, 4).
» DedicatedGroupIds [string] The IDs of the dedicated groups.
» Names [string] The names of the dedicated groups.
» SubregionNames [string] The names of the Subregions in which the dedicated groups are located.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadDedicatedGroupsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DedicatedGroups": [
    {
      "VmIds": [
        "i-12345678"
      ],
      "NetIds": [],
      "AccountId": "123456789012",
      "CpuGeneration": 4,
      "Name": "dedicated-group-example",
      "SubregionName": "eu-west-2a",
      "DedicatedGroupId": "ded-12345678"
    }
  ]
}

UpdateDedicatedGroup

POST /UpdateDedicatedGroup

[WARNING]
This feature is currently in beta.

Modifies the name of a specified dedicated group.

Code samples

osc-cli api UpdateDedicatedGroup --profile "default" \
  --DedicatedGroupId "ded-12345678" \
  --Name "New-dedicated-group-name"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateDedicatedGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DedicatedGroupId": "ded-12345678",
    "Name": "New-dedicated-group-name"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateDedicatedGroup(
    DedicatedGroupId="ded-12345678",
    Name="New-dedicated-group-name",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DedicatedGroupApi(config);

    const result = await api.updateDedicatedGroup({
        updateDedicatedGroupRequest: {
            dedicatedGroupId: "ded-12345678",
            name: "New-dedicated-group-name",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DedicatedGroupId (required) string The ID of the dedicated group you want to update.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Name (required) string The new name of the dedicated group.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateDedicatedGroupResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DedicatedGroup": {
    "VmIds": [
      "i-12345678"
    ],
    "NetIds": [
      "vpc-12345678"
    ],
    "AccountId": "123456789012",
    "CpuGeneration": 4,
    "Name": "New-dedicated-group-name",
    "SubregionName": "eu-west-2a",
    "DedicatedGroupId": "ded-12345678"
  }
}

DhcpOption

CreateDhcpOptions

POST /CreateDhcpOptions

Creates a set of DHCP options, that you can then associate with a Net using the UpdateNet method.

For more information, see About DHCP Options.

Code samples

osc-cli api CreateDhcpOptions --profile "default" \
  --DomainName "example.com" \
  --DomainNameServers '["192.0.2.0", "198.51.100.0"]' \
  --NtpServers '["203.0.113.0", "203.0.113.1"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateDhcpOptions \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DomainName": "example.com",
    "DomainNameServers": ["192.0.2.0", "198.51.100.0"],
    "NtpServers": ["203.0.113.0", "203.0.113.1"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateDhcpOptions(
    DomainName="example.com",
    DomainNameServers=["192.0.2.0","198.51.100.0"],
    NtpServers=["203.0.113.0","203.0.113.1"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DhcpOptionApi(config);

    const result = await api.createDhcpOptions({
        createDhcpOptionsRequest: {
            domainName: "example.com",
            domainNameServers: ["192.0.2.0", "198.51.100.0"],
            ntpServers: ["203.0.113.0", "203.0.113.1"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DomainName string Specify a domain name (for example, MyCompany.com). You can specify only one domain name. You must specify at least one of the following parameters: DomainName, DomainNameServers, LogServers, or NtpServers.
DomainNameServers [string] The IPs of domain name servers. If no IPs are specified, the OutscaleProvidedDNS value is set by default. You must specify at least one of the following parameters: DomainName, DomainNameServers, LogServers, or NtpServers.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LogServers [string] The IPs of the log servers. You must specify at least one of the following parameters: DomainName, DomainNameServers, LogServers, or NtpServers.
NtpServers [string] The IPs of the Network Time Protocol (NTP) servers. You must specify at least one of the following parameters: DomainName, DomainNameServers, LogServers, or NtpServers.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateDhcpOptionsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DhcpOptionsSet": {
    "Tags": [],
    "NtpServers": [
      "203.0.113.0",
      "203.0.113.1"
    ],
    "Default": false,
    "DhcpOptionsSetId": "dopt-12345678",
    "DomainName": "example.com",
    "DomainNameServers": [
      "192.0.2.0",
      "198.51.100.0"
    ]
  }
}

DeleteDhcpOptions

POST /DeleteDhcpOptions

Deletes a specified DHCP options set.
Before deleting a DHCP options set, you must disassociate it from the Nets you associated it with. To do so, you need to associate with each Net a new set of DHCP options, or the default one if you do not want to associate any DHCP options with the Net.

[IMPORTANT]
You cannot delete the default set.

Code samples

osc-cli api DeleteDhcpOptions --profile "default" \
  --DhcpOptionsSetId "dopt-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteDhcpOptions \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DhcpOptionsSetId": "dopt-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteDhcpOptions(
    DhcpOptionsSetId="dopt-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DhcpOptionApi(config);

    const result = await api.deleteDhcpOptions({
        deleteDhcpOptionsRequest: {
            dhcpOptionsSetId: "dopt-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DhcpOptionsSetId (required) string The ID of the DHCP options set you want to delete.
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteDhcpOptionsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadDhcpOptions

POST /ReadDhcpOptions

Gets information about the content of one or more DHCP options sets.

Code samples

osc-cli api ReadDhcpOptions --profile "default" \
  --Filters '{
      "DhcpOptionsSetIds": ["dopt-12345678"],
    }'
osc-cli api ReadDhcpOptions --profile "default" \
  --Filters '{
      "DomainNameServers": ["192.0.2.0", "198.51.100.0"],
      "DomainNames": ["example.com"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadDhcpOptions \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "DhcpOptionsSetIds": ["dopt-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadDhcpOptions \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "DomainNameServers": ["192.0.2.0", "198.51.100.0"],
      "DomainNames": ["example.com"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadDhcpOptions(
    Filters={
        "DhcpOptionsSetIds": ["dopt-12345678"],
    },
)
print(result)

result = gw.ReadDhcpOptions(
    Filters={
        "DomainNameServers": ["192.0.2.0","198.51.100.0"],
        "DomainNames": ["example.com"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DhcpOptionApi(config);

    const result = await api.readDhcpOptions({
        readDhcpOptionsRequest: {
            filters: {
                dhcpOptionsSetIds: ["dopt-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readDhcpOptions({
        readDhcpOptionsRequest: {
            filters: {
                domainNameServers: ["192.0.2.0", "198.51.100.0"],
                domainNames: ["example.com"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersDhcpOptions One or more filters.
» Default boolean If true, lists all default DHCP options set. If false, lists all non-default DHCP options set.
» DhcpOptionsSetIds [string] The IDs of the DHCP options sets.
» DomainNameServers [string] The IPs of the domain name servers used for the DHCP options sets.
» DomainNames [string] The domain names used for the DHCP options sets.
» LogServers [string] The IPs of the log servers used for the DHCP options sets.
» NtpServers [string] The IPs of the Network Time Protocol (NTP) servers used for the DHCP options sets.
» TagKeys [string] The keys of the tags associated with the DHCP options sets.
» TagValues [string] The values of the tags associated with the DHCP options sets.
» Tags [string] The key/value combination of the tags associated with the DHCP options sets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadDhcpOptionsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DhcpOptionsSets": [
    {
      "Tags": [],
      "NtpServers": [
        "203.0.113.0",
        "203.0.113.1"
      ],
      "Default": false,
      "DhcpOptionsSetId": "dopt-12345678",
      "DomainName": "example.com",
      "DomainNameServers": [
        "192.0.2.0",
        "198.51.100.0"
      ]
    }
  ]
}

DirectLink

POST /CreateDirectLink

Creates a DirectLink between a customer network and a specified DirectLink location.

For more information, see About DirectLink.

Code samples

osc-cli api CreateDirectLink --profile "default" \
  --Location "PAR1" \
  --Bandwidth "1Gbps" \
  --DirectLinkName "Connection to Outscale"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateDirectLink \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Location": "PAR1",
    "Bandwidth": "1Gbps",
    "DirectLinkName": "Connection to Outscale"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateDirectLink(
    Location="PAR1",
    Bandwidth="1Gbps",
    DirectLinkName="Connection to Outscale",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DirectLinkApi(config);

    const result = await api.createDirectLink({
        createDirectLinkRequest: {
            location: "PAR1",
            bandwidth: "1Gbps",
            directLinkName: "Connection to Outscale",
        },
    });
    console.log(result);

}

main();

Name Type Description
Bandwidth (required) string The bandwidth of the DirectLink (1Gbps | 10Gbps).
DirectLinkName (required) string The name of the DirectLink.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Location (required) string The code of the requested location for the DirectLink, returned by the ReadLocations method.
Status Description Schema
200 The HTTP 200 response (OK). CreateDirectLinkResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DirectLink": {
    "AccountId": "123456789012",
    "Bandwidth": "1Gbps",
    "DirectLinkId": "dxcon-12345678",
    "DirectLinkName": "Connection to Outscale",
    "Location": "PAR1",
    "RegionName": "eu-west-2",
    "State": "requested"
  }
}

POST /DeleteDirectLink

Deletes a specified DirectLink.
Before deleting a DirectLink, ensure that all your DirectLink interfaces related to this DirectLink are deleted.

Code samples

osc-cli api DeleteDirectLink --profile "default" \
  --DirectLinkId "dxcon-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteDirectLink \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DirectLinkId": "dxcon-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteDirectLink(
    DirectLinkId="dxcon-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DirectLinkApi(config);

    const result = await api.deleteDirectLink({
        deleteDirectLinkRequest: {
            directLinkId: "dxcon-12345678",
        },
    });
    console.log(result);

}

main();

Name Type Description
DirectLinkId (required) string The ID of the DirectLink you want to delete.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Status Description Schema
200 The HTTP 200 response (OK). DeleteDirectLinkResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

POST /ReadDirectLinks

Lists all DirectLinks in the Region.

Code samples

osc-cli api ReadDirectLinks --profile "default" \
  --Filters '{
      "DirectLinkIds": ["dxcon-12345678"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadDirectLinks \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "DirectLinkIds": ["dxcon-12345678"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadDirectLinks(
    Filters={
        "DirectLinkIds": ["dxcon-12345678"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DirectLinkApi(config);

    const result = await api.readDirectLinks({
        readDirectLinksRequest: {
            filters: {
                directLinkIds: ["dxcon-12345678"],
            },
        },
    });
    console.log(result);

}

main();

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersDirectLink One or more filters.
» DirectLinkIds [string] The IDs of the DirectLinks.
Status Description Schema
200 The HTTP 200 response (OK). ReadDirectLinksResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DirectLinks": [
    {
      "AccountId": "123456789012",
      "Bandwidth": "1Gbps",
      "DirectLinkId": "dxcon-12345678",
      "DirectLinkName": "Connection to Outscale",
      "Location": "PAR1",
      "RegionName": "eu-west-2",
      "State": "available"
    }
  ]
}

DirectLinkInterface

CreateDirectLinkInterface

POST /CreateDirectLinkInterface

Creates a DirectLink interface.
DirectLink interfaces enable you to reach one of your Nets through a virtual gateway.

For more information, see About DirectLink.

Code samples

osc-cli api CreateDirectLinkInterface --profile "default" \
  --DirectLinkId "dxcon-12345678" \
  --DirectLinkInterface '{
      "DirectLinkInterfaceName": "MyDirectLinkInterface",
      "Vlan": 101,
      "BgpAsn": 65000,
      "BgpKey": "tgyn26example",
      "OutscalePrivateIp": "172.16.0.4/30",
      "ClientPrivateIp": "172.16.0.5/30",
      "VirtualGatewayId": "vgw-12345678",
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateDirectLinkInterface \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DirectLinkId": "dxcon-12345678",
    "DirectLinkInterface": {
      "DirectLinkInterfaceName": "MyDirectLinkInterface",
      "Vlan": 101,
      "BgpAsn": 65000,
      "BgpKey": "tgyn26example",
      "OutscalePrivateIp": "172.16.0.4/30",
      "ClientPrivateIp": "172.16.0.5/30",
      "VirtualGatewayId": "vgw-12345678"
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateDirectLinkInterface(
    DirectLinkId="dxcon-12345678",
    DirectLinkInterface={
        "DirectLinkInterfaceName": "MyDirectLinkInterface",
        "Vlan": 101,
        "BgpAsn": 65000,
        "BgpKey": "tgyn26example",
        "OutscalePrivateIp": "172.16.0.4/30",
        "ClientPrivateIp": "172.16.0.5/30",
        "VirtualGatewayId": "vgw-12345678",
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DirectLinkInterfaceApi(config);

    const result = await api.createDirectLinkInterface({
        createDirectLinkInterfaceRequest: {
            directLinkId: "dxcon-12345678",
            directLinkInterface: {
                directLinkInterfaceName: "MyDirectLinkInterface",
                vlan: 101,
                bgpAsn: 65000,
                bgpKey: "tgyn26example",
                outscalePrivateIp: "172.16.0.4/30",
                clientPrivateIp: "172.16.0.5/30",
                virtualGatewayId: "vgw-12345678",
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DirectLinkId (required) string The ID of the existing DirectLink for which you want to create the DirectLink interface.
DirectLinkInterface (required) DirectLinkInterface Information about the DirectLink interface.
» BgpAsn (required) integer The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side of the DirectLink interface. This number must be between 64512 and 65534.
» BgpKey string The BGP authentication key.
» ClientPrivateIp string The IP on the customer's side of the DirectLink interface.
» DirectLinkInterfaceName (required) string The name of the DirectLink interface.
» OutscalePrivateIp string The IP on the OUTSCALE side of the DirectLink interface.
» VirtualGatewayId (required) string The ID of the target virtual gateway.
» Vlan (required) integer The VLAN number associated with the DirectLink interface. This number must be unique and be between 2 and 4094.
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateDirectLinkInterfaceResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DirectLinkInterface": {
    "Vlan": 101,
    "OutscalePrivateIp": "172.16.0.4/30",
    "DirectLinkInterfaceId": "dxvif-12345678",
    "BgpAsn": 65000,
    "AccountId": "123456789012",
    "ClientPrivateIp": "172.16.0.5/30",
    "VirtualGatewayId": "vgw-12345678",
    "DirectLinkInterfaceName": "MyDirectLinkInterface",
    "DirectLinkId": "dxcon-12345678",
    "Mtu": 1500,
    "State": "pending",
    "InterfaceType": "private",
    "Location": "PAR1"
  }
}

DeleteDirectLinkInterface

POST /DeleteDirectLinkInterface

Deletes a specified DirectLink interface.

Code samples

osc-cli api DeleteDirectLinkInterface --profile "default" \
  --DirectLinkInterfaceId "dxvif-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteDirectLinkInterface \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DirectLinkInterfaceId": "dxvif-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteDirectLinkInterface(
    DirectLinkInterfaceId="dxvif-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DirectLinkInterfaceApi(config);

    const result = await api.deleteDirectLinkInterface({
        deleteDirectLinkInterfaceRequest: {
            directLinkInterfaceId: "dxvif-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DirectLinkInterfaceId (required) string The ID of the DirectLink interface you want to delete.
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteDirectLinkInterfaceResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadDirectLinkInterfaces

POST /ReadDirectLinkInterfaces

Lists one or more of your DirectLink interfaces.

Code samples

osc-cli api ReadDirectLinkInterfaces --profile "default" \
  --Filters '{
      "DirectLinkInterfaceIds": ["dxvif-12345678"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadDirectLinkInterfaces \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "DirectLinkInterfaceIds": ["dxvif-12345678"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadDirectLinkInterfaces(
    Filters={
        "DirectLinkInterfaceIds": ["dxvif-12345678"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DirectLinkInterfaceApi(config);

    const result = await api.readDirectLinkInterfaces({
        readDirectLinkInterfacesRequest: {
            filters: {
                directLinkInterfaceIds: ["dxvif-12345678"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersDirectLinkInterface One or more filters.
» DirectLinkIds [string] The IDs of the DirectLinks.
» DirectLinkInterfaceIds [string] The IDs of the DirectLink interfaces.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadDirectLinkInterfacesResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DirectLinkInterfaces": [
    {
      "Vlan": 101,
      "OutscalePrivateIp": "172.16.0.4/30",
      "DirectLinkInterfaceId": "dxvif-12345678",
      "BgpAsn": 65000,
      "AccountId": "123456789012",
      "ClientPrivateIp": "172.16.0.5/30",
      "VirtualGatewayId": "vgw-12345678",
      "DirectLinkInterfaceName": "MyDirectLinkInterface",
      "DirectLinkId": "dxcon-12345678",
      "Mtu": 1500,
      "State": "available",
      "InterfaceType": "private",
      "Location": "PAR1"
    }
  ]
}

UpdateDirectLinkInterface

POST /UpdateDirectLinkInterface

Modifies the maximum transmission unit (MTU) of a DirectLink interface.

Code samples

osc-cli api UpdateDirectLinkInterface --profile "default" \
  --DirectLinkInterfaceId "dxvif-12345678" \
  --Mtu 1500

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateDirectLinkInterface \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DirectLinkInterfaceId": "dxvif-12345678",
    "Mtu": 1500
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateDirectLinkInterface(
    DirectLinkInterfaceId="dxvif-12345678",
    Mtu=1500,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.DirectLinkInterfaceApi(config);

    const result = await api.updateDirectLinkInterface({
        updateDirectLinkInterfaceRequest: {
            directLinkInterfaceId: "dxvif-12345678",
            mtu: 1500,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DirectLinkInterfaceId (required) string The ID of the DirectLink interface you want to update.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Mtu (required) integer The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always 1500).

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateDirectLinkInterfaceResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DirectLinkInterface": {
    "Vlan": 101,
    "OutscalePrivateIp": "172.16.0.4/30",
    "DirectLinkInterfaceId": "dxvif-12345678",
    "BgpAsn": 65000,
    "AccountId": "123456789012",
    "ClientPrivateIp": "172.16.0.5/30",
    "VirtualGatewayId": "vgw-12345678",
    "DirectLinkInterfaceName": "MyDirectLinkInterface",
    "DirectLinkId": "dxcon-12345678",
    "Mtu": 1500,
    "State": "available",
    "InterfaceType": "private",
    "Location": "PAR1"
  }
}

FlexibleGpu

CreateFlexibleGpu

POST /CreateFlexibleGpu

Allocates a flexible GPU (fGPU) to your account.
You can then attach this fGPU to a virtual machine (VM).

For more information, see About Flexible GPUs.

Code samples

osc-cli api CreateFlexibleGpu --profile "default" \
  --ModelName "nvidia-p100" \
  --Generation "v5" \
  --SubregionName "eu-west-2a" \
  --DeleteOnVmDeletion True

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateFlexibleGpu \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ModelName": "nvidia-p100",
    "Generation": "v5",
    "SubregionName": "eu-west-2a",
    "DeleteOnVmDeletion": true
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateFlexibleGpu(
    ModelName="nvidia-p100",
    Generation="v5",
    SubregionName="eu-west-2a",
    DeleteOnVmDeletion=True,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.FlexibleGpuApi(config);

    const result = await api.createFlexibleGpu({
        createFlexibleGpuRequest: {
            modelName: "nvidia-p100",
            generation: "v5",
            subregionName: "eu-west-2a",
            deleteOnVmDeletion: true,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DeleteOnVmDeletion boolean If true, the fGPU is deleted when the VM is terminated.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Generation string The processor generation that the fGPU must be compatible with. If not specified, the oldest possible processor generation is selected (as provided by ReadFlexibleGpuCatalog for the specified model of fGPU).
ModelName (required) string The model of fGPU you want to allocate. For more information, see About Flexible GPUs.
SubregionName (required) string The Subregion in which you want to create the fGPU.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateFlexibleGpuResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "FlexibleGpu": {
    "SubregionName": "eu-west-2a",
    "DeleteOnVmDeletion": true,
    "Generation": "v5",
    "ModelName": "nvidia-p100",
    "State": "allocated",
    "FlexibleGpuId": "fgpu-12345678"
  }
}

DeleteFlexibleGpu

POST /DeleteFlexibleGpu

Releases a flexible GPU (fGPU) from your account.
The fGPU becomes free to be used by someone else.

Code samples

osc-cli api DeleteFlexibleGpu --profile "default" \
  --FlexibleGpuId "fgpu-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteFlexibleGpu \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "FlexibleGpuId": "fgpu-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteFlexibleGpu(
    FlexibleGpuId="fgpu-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.FlexibleGpuApi(config);

    const result = await api.deleteFlexibleGpu({
        deleteFlexibleGpuRequest: {
            flexibleGpuId: "fgpu-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
FlexibleGpuId (required) string The ID of the fGPU you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteFlexibleGpuResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

LinkFlexibleGpu

POST /LinkFlexibleGpu

Attaches one of your allocated flexible GPUs (fGPUs) to one of your virtual machines (VMs).
The fGPU is in the attaching state until the VM is stopped, after which it becomes attached.

[NOTE]
You can attach fGPUs only to VMs with the highest (1) performance flag. For more information see About Flexible GPUs and VM Types.

Code samples

osc-cli api LinkFlexibleGpu --profile "default" \
  --FlexibleGpuId "fgpu-12345678" \
  --VmId "i-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkFlexibleGpu \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "FlexibleGpuId": "fgpu-12345678",
    "VmId": "i-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.LinkFlexibleGpu(
    FlexibleGpuId="fgpu-12345678",
    VmId="i-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.FlexibleGpuApi(config);

    const result = await api.linkFlexibleGpu({
        linkFlexibleGpuRequest: {
            flexibleGpuId: "fgpu-12345678",
            vmId: "i-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
FlexibleGpuId (required) string The ID of the fGPU you want to attach.
VmId (required) string The ID of the VM you want to attach the fGPU to.

Responses

Status Description Schema
200 The HTTP 200 response (OK). LinkFlexibleGpuResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadFlexibleGpuCatalog

POST /ReadFlexibleGpuCatalog

Lists all flexible GPUs available in the public catalog.

Code samples

osc-cli api ReadFlexibleGpuCatalog --profile "default"

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadFlexibleGpuCatalog \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadFlexibleGpuCatalog()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
    });
    const api = new osc.FlexibleGpuApi(config);

    const result = await api.readFlexibleGpuCatalog({
        readFlexibleGpuCatalogRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadFlexibleGpuCatalogResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "FlexibleGpuCatalog": [
    {
      "VRam": 16000,
      "Generations": [
        "v5"
      ],
      "MaxCpu": 80,
      "MaxRam": 512,
      "ModelName": "nvidia-p100"
    }
  ]
}

ReadFlexibleGpus

POST /ReadFlexibleGpus

Lists one or more flexible GPUs (fGPUs) allocated to your account.

Code samples

osc-cli api ReadFlexibleGpus --profile "default" \
  --Filters '{
      "FlexibleGpuIds": ["fgpu-12345678"],
    }'
osc-cli api ReadFlexibleGpus --profile "default" \
  --Filters '{
      "ModelNames": ["nvidia-p6", "nvidia-p100"],
      "States": ["attached"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadFlexibleGpus \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "FlexibleGpuIds": ["fgpu-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadFlexibleGpus \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ModelNames": ["nvidia-p6", "nvidia-p100"],
      "States": ["attached"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadFlexibleGpus(
    Filters={
        "FlexibleGpuIds": ["fgpu-12345678"],
    },
)
print(result)

result = gw.ReadFlexibleGpus(
    Filters={
        "ModelNames": ["nvidia-p6","nvidia-p100"],
        "States": ["attached"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.FlexibleGpuApi(config);

    const result = await api.readFlexibleGpus({
        readFlexibleGpusRequest: {
            filters: {
                flexibleGpuIds: ["fgpu-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readFlexibleGpus({
        readFlexibleGpusRequest: {
            filters: {
                modelNames: ["nvidia-p6", "nvidia-p100"],
                states: ["attached"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersFlexibleGpu One or more filters.
» DeleteOnVmDeletion boolean Indicates whether the fGPU is deleted when terminating the VM.
» FlexibleGpuIds [string] One or more IDs of fGPUs.
» Generations [string] The processor generations that the fGPUs are compatible with.
» ModelNames [string] One or more models of fGPUs. For more information, see About Flexible GPUs.
» States [string] The states of the fGPUs (allocated | attaching | attached | detaching).
» SubregionNames [string] The Subregions where the fGPUs are located.
» VmIds [string] One or more IDs of VMs.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadFlexibleGpusResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "FlexibleGpus": [
    {
      "DeleteOnVmDeletion": true,
      "FlexibleGpuId": "fgpu-12345678",
      "Generation": "v5",
      "ModelName": "nvidia-p100",
      "State": "attached",
      "SubregionName": "eu-west-2a",
      "VmId": "i-12345678"
    }
  ]
}

UnlinkFlexibleGpu

POST /UnlinkFlexibleGpu

Detaches a flexible GPU (fGPU) from a virtual machine (VM).
The fGPU is in the detaching state until the VM is stopped, after which it becomes available for allocation again.

Code samples

osc-cli api UnlinkFlexibleGpu --profile "default" \
  --FlexibleGpuId "fgpu-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkFlexibleGpu \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "FlexibleGpuId": "fgpu-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UnlinkFlexibleGpu(
    FlexibleGpuId="fgpu-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.FlexibleGpuApi(config);

    const result = await api.unlinkFlexibleGpu({
        unlinkFlexibleGpuRequest: {
            flexibleGpuId: "fgpu-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
FlexibleGpuId (required) string The ID of the fGPU you want to detach from your VM.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UnlinkFlexibleGpuResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateFlexibleGpu

POST /UpdateFlexibleGpu

Modifies a flexible GPU (fGPU) behavior.

Code samples

osc-cli api UpdateFlexibleGpu --profile "default" \
  --FlexibleGpuId "fgpu-12345678" \
  --DeleteOnVmDeletion False

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateFlexibleGpu \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "FlexibleGpuId": "fgpu-12345678",
    "DeleteOnVmDeletion": false
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateFlexibleGpu(
    FlexibleGpuId="fgpu-12345678",
    DeleteOnVmDeletion=False,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.FlexibleGpuApi(config);

    const result = await api.updateFlexibleGpu({
        updateFlexibleGpuRequest: {
            flexibleGpuId: "fgpu-12345678",
            deleteOnVmDeletion: false,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DeleteOnVmDeletion boolean If true, the fGPU is deleted when the VM is terminated.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
FlexibleGpuId (required) string The ID of the fGPU you want to modify.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateFlexibleGpuResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "FlexibleGpu": {
    "DeleteOnVmDeletion": false,
    "FlexibleGpuId": "fgpu-12345678",
    "Generation": "v5",
    "ModelName": "nvidia-p100",
    "State": "allocated",
    "SubregionName": "eu-west-2a"
  }
}

Image

CreateImage

POST /CreateImage

Creates an OUTSCALE machine image (OMI).
You can use this method in different ways:

  • Creating from a VM: You create an OMI from one of your virtual machines (VMs).
  • Copying an OMI: You copy an existing OMI. The source OMI can be one of your own OMIs, or an OMI owned by another account that has granted you permission via the UpdateImage method.
  • Registering from a snapshot: You register an OMI from an existing snapshot. The source snapshot can be one of your own snapshots, or a snapshot owned by another account that has granted you permission via the UpdateSnapshot method.
  • Registering from a bucket by using a manifest file: You register an OMI from the manifest file of an OMI that was exported to an OUTSCALE Object Storage (OOS) bucket. First, the owner of the source OMI must export it to the bucket by using the CreateImageExportTask method. Then, they must grant you permission to read the manifest file via a pre-signed URL or Access Control Lists. For more information, see Managing Access to Your Buckets and Objects.
  • Registering from a bucket without using a manifest file: This is similar to the previous case but you manually specify all the information that would be in a manifest file instead of using a manifest file.

[TIP]
Registering from a bucket enables you to copy an OMI across Regions.

For more information, see About OMIs.

Code samples

# Creating from a VM

osc-cli api CreateImage --profile "default" \
  --ImageName "create-image-example" \
  --VmId "i-12345678" \
  --NoReboot True
# Copying an OMI

osc-cli api CreateImage --profile "default" \
  --ImageName "copy-image-example" \
  --SourceImageId "ami-12345678" \
  --SourceRegionName "eu-west-2"
# Registering from a snapshot

osc-cli api CreateImage --profile "default" \
  --ImageName "register-image-from-snapshot-example" \
  --BlockDeviceMappings '[
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {"SnapshotId": "snap-12345678", "VolumeSize": 120, "VolumeType": "io1", "Iops": 150, "DeleteOnVmDeletion": True},
      },
    ]' \
  --RootDeviceName "/dev/sda1"
# Registering from a bucket by using a manifest file

osc-cli api CreateImage --profile "default" \
  --ImageName "register-image-from-bucket-example" \
  --FileLocation "https://oos.eu-west-2.outscale.com/BUCKET/KEY?AWSAccessKeyId=ABCDEFGHIJ0123456789&Expires=1493372309&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating from a VM

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateImage \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageName": "create-image-example",
    "VmId": "i-12345678",
    "NoReboot": true
  }'
# Copying an OMI

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateImage \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageName": "copy-image-example",
    "SourceImageId": "ami-12345678",
    "SourceRegionName": "eu-west-2"
  }'
# Registering from a snapshot

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateImage \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageName": "register-image-from-snapshot-example",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {"SnapshotId": "snap-12345678", "VolumeSize": 120, "VolumeType": "io1", "Iops": 150, "DeleteOnVmDeletion": true}
      }
    ],
    "RootDeviceName": "/dev/sda1"
  }'
# Registering from a bucket by using a manifest file

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateImage \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageName": "register-image-from-bucket-example",
    "FileLocation": "https://oos.eu-west-2.outscale.com/BUCKET/KEY?AWSAccessKeyId=ABCDEFGHIJ0123456789&Expires=1493372309&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating from a VM
result = gw.CreateImage(
    ImageName="create-image-example",
    VmId="i-12345678",
    NoReboot=True,
)
print(result)

# Copying an OMI
result = gw.CreateImage(
    ImageName="copy-image-example",
    SourceImageId="ami-12345678",
    SourceRegionName="eu-west-2",
)
print(result)

# Registering from a snapshot
result = gw.CreateImage(
    ImageName="register-image-from-snapshot-example",
    BlockDeviceMappings=[
        {
            "DeviceName": "/dev/sda1",
            "Bsu": {
                "SnapshotId": "snap-12345678",
                "VolumeSize": 120,
                "VolumeType": "io1",
                "Iops": 150,
                "DeleteOnVmDeletion": True,
            },
        },
    ],
    RootDeviceName="/dev/sda1",
)
print(result)

# Registering from a bucket by using a manifest file
result = gw.CreateImage(
    ImageName="register-image-from-bucket-example",
    FileLocation="https://oos.eu-west-2.outscale.com/BUCKET/KEY?AWSAccessKeyId=ABCDEFGHIJ0123456789&Expires=1493372309&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ImageApi(config);

    /* Creating from a VM */
    const result = await api.createImage({
        createImageRequest: {
            imageName: "create-image-example",
            vmId: "i-12345678",
            noReboot: true,
        },
    });
    console.log(result);

    /* Copying an OMI */
    const result2 = await api.createImage({
        createImageRequest: {
            imageName: "copy-image-example",
            sourceImageId: "ami-12345678",
            sourceRegionName: "eu-west-2",
        },
    });
    console.log(result2);

    /* Registering from a snapshot */
    const result3 = await api.createImage({
        createImageRequest: {
            imageName: "register-image-from-snapshot-example",
            blockDeviceMappings: [
                {
                    deviceName: "/dev/sda1",
                    bsu: {
                        snapshotId: "snap-12345678",
                        volumeSize: 120,
                        volumeType: "io1",
                        iops: 150,
                        deleteOnVmDeletion: true,
                    },
                },
            ],
            rootDeviceName: "/dev/sda1",
        },
    });
    console.log(result3);

    /* Registering from a bucket by using a manifest file */
    const result4 = await api.createImage({
        createImageRequest: {
            imageName: "register-image-from-bucket-example",
            fileLocation: "https://oos.eu-west-2.outscale.com/BUCKET/KEY?AWSAccessKeyId=ABCDEFGHIJ0123456789&Expires=1493372309&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        },
    });
    console.log(result4);

}

main();

Available Parameters

Name Type Description
Architecture string (when registering from a snapshot, or from a bucket without using a manifest file) The architecture of the OMI (i386 or x86_64).
BlockDeviceMappings [BlockDeviceMappingImage] (when registering from a snapshot, or from a bucket without using a manifest file) One or more block device mappings.
» Bsu BsuToCreate Information about the BSU volume to create.
»» DeleteOnVmDeletion boolean By default or if set to true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
»» Iops integer The number of I/O operations per second (IOPS). This parameter must be specified only if you create an io1 volume. The maximum number of IOPS allowed for io1 volumes is 13000 with a maximum performance ratio of 300 IOPS per gibibyte.
»» SnapshotId string The ID of the snapshot used to create the volume.
»» VolumeSize integer The size of the volume, in gibibytes (GiB).
If you specify a snapshot ID, the volume size must be at least equal to the snapshot size.
If you specify a snapshot ID but no volume size, the volume is created with a size similar to the snapshot one.
»» VolumeType string The type of the volume (standard | io1 | gp2). If not specified in the request, a standard volume is created.
For more information about volume types, see About Volumes > Volume Types and IOPS.
» DeviceName string The device name for the volume. For a root device, you must use /dev/sda1. For other volumes, you must use /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX (where the first X is a letter between b and z, and the second X is a letter between a and z).
» VirtualDeviceName string The name of the virtual device (ephemeralN).
Description string A description for the new OMI.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
FileLocation string (when registering from a bucket by using a manifest file) The pre-signed URL of the manifest file for the OMI you want to register. For more information, see Configuring a Pre-signed URL or Managing Access to Your Buckets and Objects.
You can also specify the normal URL of the OMI if you have permission on the OOS bucket, without using the manifest file, but in that case, you need to manually specify through the other parameters all the information that would otherwise be read from the manifest file.
ImageName string A unique name for the new OMI.
Constraints: 3-128 alphanumeric characters, underscores (_), spaces ( ), parentheses (()), slashes (/), periods (.), or dashes (-).
NoReboot boolean (when creating from a VM) If false, the VM shuts down before creating the OMI and then reboots. If true, the VM does not.
ProductCodes [string] The product codes associated with the OMI.
RootDeviceName string (when registering from a snapshot, or from a bucket without using a manifest file) The name of the root device for the new OMI.
SourceImageId string (when copying an OMI) The ID of the OMI you want to copy.
SourceRegionName string (when copying an OMI) The name of the source Region (always the same as the Region of your account).
VmId string (when creating from a VM) The ID of the VM from which you want to create the OMI.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateImageResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Creating from a VM
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Image": {
    "StateComment": {},
    "State": "pending",
    "RootDeviceType": "bsu",
    "RootDeviceName": "/dev/sda1",
    "ProductCodes": [
      "0001"
    ],
    "PermissionsToLaunch": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "AccountId": "123456789012",
    "Tags": [],
    "Description": "",
    "ImageId": "ami-12345678",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeType": "standard",
          "DeleteOnVmDeletion": true,
          "VolumeSize": 50,
          "SnapshotId": "snap-12345678"
        }
      }
    ],
    "ImageType": "machine",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "FileLocation": "123456789012/create-image-example",
    "Architecture": "x86_64",
    "ImageName": "create-image-example"
  }
}
# Copying an OMI
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Image": {
    "StateComment": {},
    "State": "available",
    "RootDeviceType": "bsu",
    "RootDeviceName": "/dev/sda1",
    "ProductCodes": [
      "0001"
    ],
    "PermissionsToLaunch": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "AccountId": "123456789012",
    "Tags": [],
    "Description": "",
    "ImageId": "ami-12345678",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeType": "standard",
          "DeleteOnVmDeletion": true,
          "VolumeSize": 50,
          "SnapshotId": "snap-12345678"
        }
      }
    ],
    "ImageType": "machine",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "FileLocation": "123456789012/copy-image-example",
    "Architecture": "x86_64",
    "ImageName": "copy-image-example"
  }
}
# Registering from a snapshot
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Image": {
    "StateComment": {},
    "State": "available",
    "RootDeviceType": "bsu",
    "RootDeviceName": "/dev/sda1",
    "ProductCodes": [
      "0001"
    ],
    "PermissionsToLaunch": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "AccountId": "123456789012",
    "Tags": [],
    "Description": "",
    "ImageId": "ami-12345678",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeType": "io1",
          "DeleteOnVmDeletion": true,
          "VolumeSize": 120,
          "Iops": 150,
          "SnapshotId": "snap-12345678"
        }
      }
    ],
    "ImageType": "machine",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "FileLocation": "123456789012/register-image-from-snapshot-example",
    "Architecture": "x86_64",
    "ImageName": "register-image-from-snapshot-example"
  }
}
# Registering from a bucket by using a manifest file
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Image": {
    "StateComment": {},
    "State": "pending",
    "RootDeviceType": "bsu",
    "RootDeviceName": "/dev/sda1",
    "ProductCodes": [
      "0001"
    ],
    "PermissionsToLaunch": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "AccountId": "123456789012",
    "Tags": [],
    "Description": "",
    "ImageId": "ami-12345678",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeType": "standard",
          "DeleteOnVmDeletion": true,
          "VolumeSize": 50,
          "SnapshotId": "snap-12345678"
        }
      }
    ],
    "ImageType": "machine",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "FileLocation": "https://oos.eu-west-2.outscale.com/BUCKET/KEY?AWSAccessKeyId=ABCDEFGHIJ0123456789&Expires=1493372309&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "Architecture": "x86_64",
    "ImageName": "register-image-from-bucket-example"
  }
}

CreateImageExportTask

POST /CreateImageExportTask

Exports an Outscale machine image (OMI) to an OUTSCALE Object Storage (OOS) bucket.
This action enables you to copy an OMI between accounts in different Regions. To copy an OMI in the same Region, you can also use the CreateImage method.
The copy of the OMI belongs to you and is independent from the source OMI.

[IMPORTANT]
You cannot export a shared or public OMI, as they do not belong to you. To do so, you must first copy it to your account. The copy then belongs to you and you can export it.

For more information, see About OMIs.

Code samples

osc-cli api CreateImageExportTask --profile "default" \
  --ImageId "ami-12345678" \
  --OsuExport '{
      "DiskImageFormat": "qcow2",
      "OsuBucket": "BUCKET",
      "OsuPrefix": "PREFIX",
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateImageExportTask \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageId": "ami-12345678",
    "OsuExport": {
      "DiskImageFormat": "qcow2",
      "OsuBucket": "BUCKET",
      "OsuPrefix": "PREFIX"
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateImageExportTask(
    ImageId="ami-12345678",
    OsuExport={
        "DiskImageFormat": "qcow2",
        "OsuBucket": "BUCKET",
        "OsuPrefix": "PREFIX",
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ImageApi(config);

    const result = await api.createImageExportTask({
        createImageExportTaskRequest: {
            imageId: "ami-12345678",
            osuExport: {
                diskImageFormat: "qcow2",
                osuBucket: "BUCKET",
                osuPrefix: "PREFIX",
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ImageId (required) string The ID of the OMI to export.
OsuExport (required) OsuExportToCreate Information about the OOS export task to create.
» DiskImageFormat (required) string The format of the export disk (qcow2 | raw).
» OsuApiKey OsuApiKey Information about the OOS API key.
»» ApiKeyId string The API key of the OOS account that enables you to access the bucket.
»» SecretKey string The secret key of the OOS account that enables you to access the bucket.
» OsuBucket (required) string The name of the OOS bucket where you want to export the object.
» OsuManifestUrl string The URL of the manifest file.
» OsuPrefix string The prefix for the key of the OOS object.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateImageExportTaskResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ImageExportTask": {
    "Tags": [],
    "ImageId": "ami-12345678",
    "TaskId": "image-export-12345678",
    "Comment": "Export of image ami-12345678",
    "OsuExport": {
      "OsuPrefix": "PREFIX/ami-12345678/",
      "OsuBucket": "BUCKET",
      "DiskImageFormat": "qcow2"
    },
    "State": "pending/queued",
    "Progress": 0
  }
}

DeleteImage

POST /DeleteImage

Deletes an OUTSCALE machine image (OMI) so that you cannot use it anymore to launch virtual machines (VMs). However, you can still use VMs already launched from this OMI.

Code samples

osc-cli api DeleteImage --profile "default" \
  --ImageId "ami-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteImage \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageId": "ami-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteImage(
    ImageId="ami-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ImageApi(config);

    const result = await api.deleteImage({
        deleteImageRequest: {
            imageId: "ami-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ImageId (required) string The ID of the OMI you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteImageResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadImageExportTasks

POST /ReadImageExportTasks

Lists one or more image export tasks.

Code samples

osc-cli api ReadImageExportTasks --profile "default" \
  --Filters '{
      "TaskIds": ["image-export-12345678"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadImageExportTasks \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "TaskIds": ["image-export-12345678"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadImageExportTasks(
    Filters={
        "TaskIds": ["image-export-12345678"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ImageApi(config);

    const result = await api.readImageExportTasks({
        readImageExportTasksRequest: {
            filters: {
                taskIds: ["image-export-12345678"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersExportTask One or more filters.
» TaskIds [string] The IDs of the export tasks.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadImageExportTasksResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ImageExportTasks": [
    {
      "Tags": [],
      "ImageId": "ami-12345678",
      "TaskId": "image-export-12345678",
      "Comment": "Export of image ami-12345678",
      "OsuExport": {
        "OsuPrefix": "PREFIX/ami-12345678/",
        "OsuBucket": "BUCKET",
        "DiskImageFormat": "qcow2"
      },
      "State": "pending/queued",
      "Progress": 0
    }
  ]
}

ReadImages

POST /ReadImages

Lists one or more OUTSCALE machine images (OMIs) you can use.

Code samples

# Reading a specific image

osc-cli api ReadImages --profile "default" \
  --Filters '{
      "ImageIds": ["ami-12345678"],
    }'
# Reading Ubuntu and RockyLinux images created by Outscale

osc-cli api ReadImages --profile "default" \
  --Filters '{
      "AccountAliases": ["Outscale"],
      "ImageNames": ["Ubuntu*", "RockyLinux*"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Reading a specific image

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadImages \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ImageIds": ["ami-12345678"]
    }
  }'
# Reading Ubuntu and RockyLinux images created by Outscale

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadImages \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "AccountAliases": ["Outscale"],
      "ImageNames": ["Ubuntu*", "RockyLinux*"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Reading a specific image
result = gw.ReadImages(
    Filters={
        "ImageIds": ["ami-12345678"],
    },
)
print(result)

# Reading Ubuntu and RockyLinux images created by Outscale
result = gw.ReadImages(
    Filters={
        "AccountAliases": ["Outscale"],
        "ImageNames": ["Ubuntu*","RockyLinux*"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ImageApi(config);

    /* Reading a specific image */
    const result = await api.readImages({
        readImagesRequest: {
            filters: {
                imageIds: ["ami-12345678"],
            },
        },
    });
    console.log(result);

    /* Reading Ubuntu and RockyLinux images created by Outscale */
    const result2 = await api.readImages({
        readImagesRequest: {
            filters: {
                accountAliases: ["Outscale"],
                imageNames: ["Ubuntu*", "RockyLinux*"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersImage One or more filters.
» AccountAliases [string] The account aliases of the owners of the OMIs.
» AccountIds [string] The account IDs of the owners of the OMIs. By default, all the OMIs for which you have launch permissions are described.
» Architectures [string] The architectures of the OMIs (i386 | x86_64).
» BlockDeviceMappingDeleteOnVmDeletion boolean Whether the volumes are deleted or not when terminating the VM.
» BlockDeviceMappingDeviceNames [string] The device names for the volumes.
» BlockDeviceMappingSnapshotIds [string] The IDs of the snapshots used to create the volumes.
» BlockDeviceMappingVolumeSizes [integer] The sizes of the volumes, in gibibytes (GiB).
» BlockDeviceMappingVolumeTypes [string] The types of volumes (standard | gp2 | io1).
» Descriptions [string] The descriptions of the OMIs, provided when they were created.
» FileLocations [string] The locations of the buckets where the OMI files are stored.
» Hypervisors [string] The hypervisor type of the OMI (always xen).
» ImageIds [string] The IDs of the OMIs.
» ImageNames [string] The names of the OMIs, provided when they were created.
» PermissionsToLaunchAccountIds [string] The account IDs which have launch permissions for the OMIs.
» PermissionsToLaunchGlobalPermission boolean If true, lists all public OMIs. If false, lists all private OMIs.
» ProductCodeNames [string] The names of the product codes associated with the OMI.
» ProductCodes [string] The product codes associated with the OMI.
» RootDeviceNames [string] The name of the root device. This value must be /dev/sda1.
» RootDeviceTypes [string] The types of root device used by the OMIs (bsu or ebs).
» States [string] The states of the OMIs (pending | available | failed).
» TagKeys [string] The keys of the tags associated with the OMIs.
» TagValues [string] The values of the tags associated with the OMIs.
» Tags [string] The key/value combination of the tags associated with the OMIs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» VirtualizationTypes [string] The virtualization types (always hvm).
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadImagesResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Reading a specific image
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Images": [
    {
      "StateComment": {},
      "State": "available",
      "RootDeviceType": "bsu",
      "RootDeviceName": "/dev/sda1",
      "ProductCodes": [
        "0001"
      ],
      "PermissionsToLaunch": {
        "GlobalPermission": false,
        "AccountIds": []
      },
      "AccountId": "123456789012",
      "Tags": [],
      "Description": "",
      "ImageId": "ami-12345678",
      "BlockDeviceMappings": [
        {
          "DeviceName": "/dev/sda1",
          "Bsu": {
            "VolumeType": "standard",
            "DeleteOnVmDeletion": true,
            "VolumeSize": 50,
            "SnapshotId": "snap-12345678"
          }
        }
      ],
      "ImageType": "machine",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "FileLocation": "123456789012/create-image-example",
      "Architecture": "x86_64",
      "ImageName": "create-image-example"
    }
  ]
}
# Reading Ubuntu and RockyLinux images created by Outscale
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Images": [
    {
      "StateComment": {},
      "State": "available",
      "RootDeviceType": "bsu",
      "RootDeviceName": "/dev/sda1",
      "ProductCodes": [
        "0001"
      ],
      "PermissionsToLaunch": {
        "GlobalPermission": true,
        "AccountIds": []
      },
      "AccountId": "123456789012",
      "Tags": [],
      "Description": "",
      "ImageId": "ami-12345678",
      "BlockDeviceMappings": [
        {
          "DeviceName": "/dev/sda1",
          "Bsu": {
            "VolumeType": "standard",
            "DeleteOnVmDeletion": true,
            "VolumeSize": 10,
            "SnapshotId": "snap-12345678"
          }
        }
      ],
      "ImageType": "machine",
      "AccountAlias": "Outscale",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "FileLocation": "Outscale/Ubuntu-2010.10.01-0",
      "Architecture": "x86_64",
      "ImageName": "Ubuntu-2010.10.01-0"
    },
    {
      "StateComment": {},
      "State": "available",
      "RootDeviceType": "bsu",
      "RootDeviceName": "/dev/sda1",
      "ProductCodes": [
        "0001"
      ],
      "PermissionsToLaunch": {
        "GlobalPermission": true,
        "AccountIds": []
      },
      "AccountId": "123456789012",
      "Tags": [],
      "Description": "",
      "ImageId": "ami-12345678",
      "BlockDeviceMappings": [
        {
          "DeviceName": "/dev/sda1",
          "Bsu": {
            "VolumeType": "standard",
            "DeleteOnVmDeletion": true,
            "VolumeSize": 10,
            "SnapshotId": "snap-12345678"
          }
        }
      ],
      "ImageType": "machine",
      "AccountAlias": "Outscale",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "FileLocation": "Outscale/RockyLinux-2010.10.01-0",
      "Architecture": "x86_64",
      "ImageName": "RockyLinux-2010.10.01-0"
    }
  ]
}

UpdateImage

POST /UpdateImage

Modifies the access permissions for an OUTSCALE machine image (OMI).
You must specify either the Additions or the Removals parameter.
After sharing an OMI with an account, the other account can create a copy of it that they own. For more information about copying OMIs, see CreateImage.

Code samples

# Adding permission

osc-cli api UpdateImage --profile "default" \
  --ImageId "ami-12345678" \
  --PermissionsToLaunch '{
      "Additions": {
        "AccountIds": ["987654321098"],
      },
    }'
# Removing permission

osc-cli api UpdateImage --profile "default" \
  --ImageId "ami-12345678" \
  --PermissionsToLaunch '{
      "Removals": {
        "AccountIds": ["987654321098"],
      },
    }'
# Making an image public to everyone

osc-cli api UpdateImage --profile "default" \
  --ImageId "ami-12345678" \
  --PermissionsToLaunch '{
      "Additions": {
        "GlobalPermission": True,
      },
    }'
# Making an image private to everyone

osc-cli api UpdateImage --profile "default" \
  --ImageId "ami-12345678" \
  --PermissionsToLaunch '{
      "Removals": {
        "GlobalPermission": True,
      },
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Adding permission

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateImage \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageId": "ami-12345678",
    "PermissionsToLaunch": {
      "Additions": {
        "AccountIds": ["987654321098"]
      }
    }
  }'
# Removing permission

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateImage \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageId": "ami-12345678",
    "PermissionsToLaunch": {
      "Removals": {
        "AccountIds": ["987654321098"]
      }
    }
  }'
# Making an image public to everyone

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateImage \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageId": "ami-12345678",
    "PermissionsToLaunch": {
      "Additions": {
        "GlobalPermission": true
      }
    }
  }'
# Making an image private to everyone

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateImage \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageId": "ami-12345678",
    "PermissionsToLaunch": {
      "Removals": {
        "GlobalPermission": true
      }
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Adding permission
result = gw.UpdateImage(
    ImageId="ami-12345678",
    PermissionsToLaunch={
        "Additions": {
            "AccountIds": ["987654321098"],
        },
    },
)
print(result)

# Removing permission
result = gw.UpdateImage(
    ImageId="ami-12345678",
    PermissionsToLaunch={
        "Removals": {
            "AccountIds": ["987654321098"],
        },
    },
)
print(result)

# Making an image public to everyone
result = gw.UpdateImage(
    ImageId="ami-12345678",
    PermissionsToLaunch={
        "Additions": {
            "GlobalPermission": True,
        },
    },
)
print(result)

# Making an image private to everyone
result = gw.UpdateImage(
    ImageId="ami-12345678",
    PermissionsToLaunch={
        "Removals": {
            "GlobalPermission": True,
        },
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ImageApi(config);

    /* Adding permission */
    const result = await api.updateImage({
        updateImageRequest: {
            imageId: "ami-12345678",
            permissionsToLaunch: {
                additions: {
                    accountIds: ["987654321098"],
                },
            },
        },
    });
    console.log(result);

    /* Removing permission */
    const result2 = await api.updateImage({
        updateImageRequest: {
            imageId: "ami-12345678",
            permissionsToLaunch: {
                removals: {
                    accountIds: ["987654321098"],
                },
            },
        },
    });
    console.log(result2);

    /* Making an image public to everyone */
    const result3 = await api.updateImage({
        updateImageRequest: {
            imageId: "ami-12345678",
            permissionsToLaunch: {
                additions: {
                    globalPermission: true,
                },
            },
        },
    });
    console.log(result3);

    /* Making an image private to everyone */
    const result4 = await api.updateImage({
        updateImageRequest: {
            imageId: "ami-12345678",
            permissionsToLaunch: {
                removals: {
                    globalPermission: true,
                },
            },
        },
    });
    console.log(result4);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ImageId (required) string The ID of the OMI you want to modify.
PermissionsToLaunch (required) PermissionsOnResourceCreation Information about the permissions for the resource.
Specify either the Additions or the Removals parameter.
» Additions PermissionsOnResource Permissions for the resource.
»» AccountIds [string] One or more account IDs that the permission is associated with.
»» GlobalPermission boolean A global permission for all accounts.
(Request) Set this parameter to true to make the resource public (if the parent parameter is Additions) or to make the resource private (if the parent parameter is Removals).
(Response) If true, the resource is public. If false, the resource is private.
» Removals PermissionsOnResource Permissions for the resource.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateImageResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Adding permission
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Image": {
    "StateComment": {},
    "State": "available",
    "RootDeviceType": "bsu",
    "RootDeviceName": "/dev/sda1",
    "ProductCodes": [
      "0001"
    ],
    "PermissionsToLaunch": {
      "GlobalPermission": false,
      "AccountIds": [
        "987654321098"
      ]
    },
    "AccountId": "123456789012",
    "Tags": [],
    "Description": "",
    "ImageId": "ami-12345678",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeType": "standard",
          "DeleteOnVmDeletion": true,
          "VolumeSize": 50,
          "SnapshotId": "snap-12345678"
        }
      }
    ],
    "ImageType": "machine",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "FileLocation": "123456789012/image-example",
    "Architecture": "x86_64",
    "ImageName": "image-example"
  }
}
# Removing permission
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Image": {
    "StateComment": {},
    "State": "available",
    "RootDeviceType": "bsu",
    "RootDeviceName": "/dev/sda1",
    "ProductCodes": [
      "0001"
    ],
    "PermissionsToLaunch": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "AccountId": "123456789012",
    "Tags": [],
    "Description": "",
    "ImageId": "ami-12345678",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeType": "standard",
          "DeleteOnVmDeletion": true,
          "VolumeSize": 50,
          "SnapshotId": "snap-12345678"
        }
      }
    ],
    "ImageType": "machine",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "FileLocation": "123456789012/image-example",
    "Architecture": "x86_64",
    "ImageName": "image-example"
  }
}
# Making an image public to everyone
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Image": {
    "StateComment": {},
    "State": "available",
    "RootDeviceType": "bsu",
    "RootDeviceName": "/dev/sda1",
    "ProductCodes": [
      "0001"
    ],
    "PermissionsToLaunch": {
      "GlobalPermission": true,
      "AccountIds": []
    },
    "AccountId": "123456789012",
    "Tags": [],
    "Description": "",
    "ImageId": "ami-12345678",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeType": "standard",
          "DeleteOnVmDeletion": true,
          "VolumeSize": 50,
          "SnapshotId": "snap-12345678"
        }
      }
    ],
    "ImageType": "machine",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "FileLocation": "123456789012/image-example",
    "Architecture": "x86_64",
    "ImageName": "image-example"
  }
}
# Making an image private to everyone
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Image": {
    "StateComment": {},
    "State": "available",
    "RootDeviceType": "bsu",
    "RootDeviceName": "/dev/sda1",
    "ProductCodes": [
      "0001"
    ],
    "PermissionsToLaunch": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "AccountId": "123456789012",
    "Tags": [],
    "Description": "",
    "ImageId": "ami-12345678",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeType": "standard",
          "DeleteOnVmDeletion": true,
          "VolumeSize": 50,
          "SnapshotId": "snap-12345678"
        }
      }
    ],
    "ImageType": "machine",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "FileLocation": "123456789012/image-example",
    "Architecture": "x86_64",
    "ImageName": "image-example"
  }
}

InternetService

CreateInternetService

POST /CreateInternetService

Creates an Internet service you can use with a Net.
An Internet service enables your virtual machines (VMs) launched in a Net to connect to the Internet. By default, a Net includes an Internet service, and each Subnet is public. Every VM launched within a default Subnet has a private IP and a public IP.

For more information, see About Internet Services.

Code samples

osc-cli api CreateInternetService --profile "default"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateInternetService \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateInternetService()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.InternetServiceApi(config);

    const result = await api.createInternetService({
        createInternetServiceRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateInternetServiceResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "InternetService": {
    "Tags": [],
    "InternetServiceId": "igw-12345678"
  }
}

DeleteInternetService

POST /DeleteInternetService

Deletes an Internet service.
Before deleting an Internet service, you must detach it from any Net it is attached to.

Code samples

osc-cli api DeleteInternetService --profile "default" \
  --InternetServiceId "igw-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteInternetService \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "InternetServiceId": "igw-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteInternetService(
    InternetServiceId="igw-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.InternetServiceApi(config);

    const result = await api.deleteInternetService({
        deleteInternetServiceRequest: {
            internetServiceId: "igw-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
InternetServiceId (required) string The ID of the Internet service you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteInternetServiceResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

LinkInternetService

POST /LinkInternetService

Attaches an Internet service to a Net.
To enable the connection between the Internet and a Net, you must attach an Internet service to this Net.

Code samples

osc-cli api LinkInternetService --profile "default" \
  --InternetServiceId "igw-12345678" \
  --NetId "vpc-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkInternetService \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "InternetServiceId": "igw-12345678",
    "NetId": "vpc-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.LinkInternetService(
    InternetServiceId="igw-12345678",
    NetId="vpc-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.InternetServiceApi(config);

    const result = await api.linkInternetService({
        linkInternetServiceRequest: {
            internetServiceId: "igw-12345678",
            netId: "vpc-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
InternetServiceId (required) string The ID of the Internet service you want to attach.
NetId (required) string The ID of the Net to which you want to attach the Internet service.

Responses

Status Description Schema
200 The HTTP 200 response (OK). LinkInternetServiceResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadInternetServices

POST /ReadInternetServices

Lists one or more of your Internet services.
An Internet service enables your virtual machines (VMs) launched in a Net to connect to the Internet. By default, a Net includes an Internet service, and each Subnet is public. Every VM launched within a default Subnet has a private IP and a public IP.

Code samples

osc-cli api ReadInternetServices --profile "default" \
  --Filters '{
      "InternetServiceIds": ["igw-12345678"],
    }'
osc-cli api ReadInternetServices --profile "default" \
  --Filters '{
      "TagKeys": ["env"],
      "TagValues": ["prod", "test"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadInternetServices \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "InternetServiceIds": ["igw-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadInternetServices \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "TagKeys": ["env"],
      "TagValues": ["prod", "test"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadInternetServices(
    Filters={
        "InternetServiceIds": ["igw-12345678"],
    },
)
print(result)

result = gw.ReadInternetServices(
    Filters={
        "TagKeys": ["env"],
        "TagValues": ["prod","test"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.InternetServiceApi(config);

    const result = await api.readInternetServices({
        readInternetServicesRequest: {
            filters: {
                internetServiceIds: ["igw-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readInternetServices({
        readInternetServicesRequest: {
            filters: {
                tagKeys: ["env"],
                tagValues: ["prod", "test"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersInternetService One or more filters.
» InternetServiceIds [string] The IDs of the Internet services.
» LinkNetIds [string] The IDs of the Nets the Internet services are attached to.
» LinkStates [string] The current states of the attachments between the Internet services and the Nets (only available, if the Internet gateway is attached to a Net).
» TagKeys [string] The keys of the tags associated with the Internet services.
» TagValues [string] The values of the tags associated with the Internet services.
» Tags [string] The key/value combination of the tags associated with the Internet services, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadInternetServicesResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "InternetServices": [
    {
      "Tags": [
        {
          "Value": "prod",
          "Key": "env"
        }
      ],
      "State": "available",
      "NetId": "vpc-12345678",
      "InternetServiceId": "igw-12345678"
    }
  ]
}

UnlinkInternetService

POST /UnlinkInternetService

Detaches an Internet service from a Net.
This action disables and detaches an Internet service from a Net. The Net must not contain virtual machines (VMs) using public IPs nor internet-facing load balancers.

Code samples

osc-cli api UnlinkInternetService --profile "default" \
  --InternetServiceId "igw-12345678" \
  --NetId "vpc-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkInternetService \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "InternetServiceId": "igw-12345678",
    "NetId": "vpc-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UnlinkInternetService(
    InternetServiceId="igw-12345678",
    NetId="vpc-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.InternetServiceApi(config);

    const result = await api.unlinkInternetService({
        unlinkInternetServiceRequest: {
            internetServiceId: "igw-12345678",
            netId: "vpc-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
InternetServiceId (required) string The ID of the Internet service you want to detach.
NetId (required) string The ID of the Net from which you want to detach the Internet service.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UnlinkInternetServiceResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Keypair

CreateKeypair

POST /CreateKeypair

Creates a keypair to use with your virtual machines (VMs).
You can use this method in two different ways:

  • Creating a keypair: In that case, 3DS OUTSCALE creates a 2048-bit RSA keypair, stores its public key in your account, and returns its private key in the response of the call so that you can save it in a file.
    When you save the returned private key, make sure you replace the \n escape sequences with real line breaks.
  • Importing a keypair created locally: If you already have a keypair that you have created locally with a third-party tool, you can import its public key in your account. The following types of key can be imported: RSA (2048 bits or preferably 4096 bits), Ed25519, and ECDSA (256 bits, 384 bits, or 521 bits). The following formats can be used: PEM, PKCS8, RFC4716, and OpenSSH.

For more information, see About Keypairs.

Code samples

# Creating a keypair

osc-cli api CreateKeypair --profile "default" \
  --KeypairName "create-keypair-example"
# Importing a keypair created locally

osc-cli api CreateKeypair --profile "default" \
  --KeypairName "import-keypair-example" \
  --PublicKey "$(base64 -i key_name.pub)"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating a keypair

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateKeypair \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "KeypairName": "create-keypair-example"
  }'
# Importing a keypair created locally

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateKeypair \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "KeypairName": "import-keypair-example",
    "PublicKey": "..."
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating a keypair
result = gw.CreateKeypair(
    KeypairName="create-keypair-example",
)
print(result)

# Importing a keypair created locally
result = gw.CreateKeypair(
    KeypairName="import-keypair-example",
    PublicKey="...",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.KeypairApi(config);

    /* Creating a keypair */
    const result = await api.createKeypair({
        createKeypairRequest: {
            keypairName: "create-keypair-example",
        },
    });
    console.log(result);

    /* Importing a keypair created locally */
    const result2 = await api.createKeypair({
        createKeypairRequest: {
            keypairName: "import-keypair-example",
            publicKey: "...",
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
KeypairName (required) string A unique name for the keypair, with a maximum length of 255 ASCII printable characters.
PublicKey string The public key to import in your account, if you are importing an existing keypair. This value must be Base64-encoded.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateKeypairResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
409 The HTTP 409 response (Conflict). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Creating a keypair
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Keypair": {
    "PrivateKey": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----",
    "KeypairType": "ssh-rsa",
    "KeypairName": "create-keypair-example",
    "KeypairFingerprint": "11:22:33:44:55:66:77:88:99:00:aa:bb:cc:dd:ee:ff"
  }
}
# Importing a keypair created locally
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Keypair": {
    "KeypairType": "ssh-rsa",
    "KeypairName": "create-keypair-example",
    "KeypairFingerprint": "11:22:33:44:55:66:77:88:99:00:aa:bb:cc:dd:ee:ff"
  }
}

DeleteKeypair

POST /DeleteKeypair

Deletes the specified keypair.
This action deletes the public key stored by 3DS OUTSCALE, thus deleting the keypair.

Code samples

osc-cli api DeleteKeypair --profile "default" \
  --KeypairName "keypair-example"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteKeypair \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "KeypairName": "keypair-example"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteKeypair(
    KeypairName="keypair-example",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.KeypairApi(config);

    const result = await api.deleteKeypair({
        deleteKeypairRequest: {
            keypairName: "keypair-example",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
KeypairName (required) string The name of the keypair you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteKeypairResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadKeypairs

POST /ReadKeypairs

Lists one or more of your keypairs.

Code samples

osc-cli api ReadKeypairs --profile "default" \
  --Filters '{
      "KeypairNames": ["keypair-example"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadKeypairs \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "KeypairNames": ["keypair-example"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadKeypairs(
    Filters={
        "KeypairNames": ["keypair-example"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.KeypairApi(config);

    const result = await api.readKeypairs({
        readKeypairsRequest: {
            filters: {
                keypairNames: ["keypair-example"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersKeypair One or more filters.
» KeypairFingerprints [string] The fingerprints of the keypairs.
» KeypairNames [string] The names of the keypairs.
» KeypairTypes [string] The types of the keypairs (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadKeypairsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Keypairs": [
    {
      "KeypairType": "ssh-rsa",
      "KeypairName": "keypair-example",
      "KeypairFingerprint": "11:22:33:44:55:66:77:88:99:00:aa:bb:cc:dd:ee:ff"
    }
  ]
}

Listener

CreateListenerRule

POST /CreateListenerRule

Creates a rule for traffic redirection for the specified listener. Each rule must have either the HostNamePattern or PathPattern parameter specified. Rules are treated in priority order, from the highest value to the lowest value.
Once the rule is created, you need to register backend VMs with it. For more information, see the RegisterVmsInLoadBalancer method.

For more information, see About Load Balancers.

Code samples

# Creating a listener rule based on a host pattern

osc-cli api CreateListenerRule --profile "default" \
  --Listener '{
      "LoadBalancerName": "example-lbu",
      "LoadBalancerPort": 80,
    }' \
  --ListenerRule '{
      "Action": "forward",
      "HostNamePattern": "*.example.com",
      "ListenerRuleName": "example-listener-rule",
      "Priority": 10,
    }' \
  --VmIds '["i-12345678"]'
# Creating a listener rule based on a path pattern

osc-cli api CreateListenerRule --profile "default" \
  --Listener '{
      "LoadBalancerName": "example-lbu",
      "LoadBalancerPort": 80,
    }' \
  --ListenerRule '{
      "Action": "forward",
      "PathPattern": "/docs/*",
      "ListenerRuleName": "example-listener-rule",
      "Priority": 100,
    }' \
  --VmIds '["i-12345678"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating a listener rule based on a host pattern

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateListenerRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Listener": {
      "LoadBalancerName": "example-lbu",
      "LoadBalancerPort": 80
    },
    "ListenerRule": {
      "Action": "forward",
      "HostNamePattern": "*.example.com",
      "ListenerRuleName": "example-listener-rule",
      "Priority": 10
    },
    "VmIds": ["i-12345678"]
  }'
# Creating a listener rule based on a path pattern

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateListenerRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Listener": {
      "LoadBalancerName": "example-lbu",
      "LoadBalancerPort": 80
    },
    "ListenerRule": {
      "Action": "forward",
      "PathPattern": "/docs/*",
      "ListenerRuleName": "example-listener-rule",
      "Priority": 100
    },
    "VmIds": ["i-12345678"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating a listener rule based on a host pattern
result = gw.CreateListenerRule(
    Listener={
        "LoadBalancerName": "example-lbu",
        "LoadBalancerPort": 80,
    },
    ListenerRule={
        "Action": "forward",
        "HostNamePattern": "*.example.com",
        "ListenerRuleName": "example-listener-rule",
        "Priority": 10,
    },
    VmIds=["i-12345678"],
)
print(result)

# Creating a listener rule based on a path pattern
result = gw.CreateListenerRule(
    Listener={
        "LoadBalancerName": "example-lbu",
        "LoadBalancerPort": 80,
    },
    ListenerRule={
        "Action": "forward",
        "PathPattern": "/docs/*",
        "ListenerRuleName": "example-listener-rule",
        "Priority": 100,
    },
    VmIds=["i-12345678"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ListenerApi(config);

    /* Creating a listener rule based on a host pattern */
    const result = await api.createListenerRule({
        createListenerRuleRequest: {
            listener: {
                loadBalancerName: "example-lbu",
                loadBalancerPort: 80,
            },
            listenerRule: {
                action: "forward",
                hostNamePattern: "*.example.com",
                listenerRuleName: "example-listener-rule",
                priority: 10,
            },
            vmIds: ["i-12345678"],
        },
    });
    console.log(result);

    /* Creating a listener rule based on a path pattern */
    const result2 = await api.createListenerRule({
        createListenerRuleRequest: {
            listener: {
                loadBalancerName: "example-lbu",
                loadBalancerPort: 80,
            },
            listenerRule: {
                action: "forward",
                pathPattern: "/docs/*",
                listenerRuleName: "example-listener-rule",
                priority: 100,
            },
            vmIds: ["i-12345678"],
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Listener (required) LoadBalancerLight Information about the load balancer.
» LoadBalancerName (required) string The name of the load balancer to which the listener is attached.
» LoadBalancerPort (required) integer The port of load balancer on which the load balancer is listening (between 1 and 65535 both included).
ListenerRule (required) ListenerRuleForCreation Information about the listener rule.
» Action string The type of action for the rule (always forward).
» HostNamePattern string A host-name pattern for the rule, with a maximum length of 128 characters. This host-name pattern supports maximum three wildcards, and must not contain any special characters except [-.?].
» ListenerRuleName (required) string A human-readable name for the listener rule.
» PathPattern string A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except [_-.$/~"'@:+?].
» Priority (required) integer The priority level of the listener rule, between 1 and 19999 both included. Each rule must have a unique priority level. Otherwise, an error is returned.
VmIds (required) [string] The IDs of the backend VMs.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateListenerRuleResponse

Example responses

# Creating a listener rule based on a host pattern
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ListenerRule": {
    "Priority": 10,
    "VmIds": [
      "i-12345678"
    ],
    "ListenerRuleName": "example-listener-rule",
    "Action": "forward",
    "ListenerId": 123456,
    "HostNamePattern": "*.example.com",
    "ListenerRuleId": 1234
  }
}
# Creating a listener rule based on a path pattern
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ListenerRule": {
    "Priority": 100,
    "VmIds": [
      "i-12345678"
    ],
    "ListenerRuleName": "example-listener-rule",
    "Action": "forward",
    "ListenerId": 123456,
    "PathPattern": "/docs/*",
    "ListenerRuleId": 1234
  }
}

CreateLoadBalancerListeners

POST /CreateLoadBalancerListeners

Creates one or more listeners for a specified load balancer.

For more information, see About Load Balancers.

Code samples

osc-cli api CreateLoadBalancerListeners --profile "default" \
  --LoadBalancerName "example-lbu" \
  --Listeners '[
      {
        "BackendPort": 58,
        "BackendProtocol": "TCP",
        "LoadBalancerPort": 62,
        "LoadBalancerProtocol": "TCP",
      },
    ]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateLoadBalancerListeners \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "Listeners": [
      {
        "BackendPort": 58,
        "BackendProtocol": "TCP",
        "LoadBalancerPort": 62,
        "LoadBalancerProtocol": "TCP"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateLoadBalancerListeners(
    LoadBalancerName="example-lbu",
    Listeners=[
        {
            "BackendPort": 58,
            "BackendProtocol": "TCP",
            "LoadBalancerPort": 62,
            "LoadBalancerProtocol": "TCP",
        },
    ],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ListenerApi(config);

    const result = await api.createLoadBalancerListeners({
        createLoadBalancerListenersRequest: {
            loadBalancerName: "example-lbu",
            listeners: [
                {
                    backendPort: 58,
                    backendProtocol: "TCP",
                    loadBalancerPort: 62,
                    loadBalancerProtocol: "TCP",
                },
            ],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Listeners (required) [ListenerForCreation] One or more listeners for the load balancer.
» BackendPort (required) integer The port on which the backend VM is listening (between 1 and 65535, both included).
» BackendProtocol string The protocol for routing traffic to backend VMs (HTTP | HTTPS | TCP | SSL).
» LoadBalancerPort (required) integer The port on which the load balancer is listening (between 1 and 65535, both included).
» LoadBalancerProtocol (required) string The routing protocol (HTTP | HTTPS | TCP | SSL).
» ServerCertificateId string The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
LoadBalancerName (required) string The name of the load balancer for which you want to create listeners.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateLoadBalancerListenersResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "security-group-example",
      "SecurityGroupAccountId": "123456789012"
    },
    "SecuredCookies": false,
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internal",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "internal-example-lbu.123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "BackendPort": 58,
        "BackendProtocol": "TCP",
        "LoadBalancerPort": 62,
        "LoadBalancerProtocol": "TCP"
      },
      {
        "BackendPort": 80,
        "BackendProtocol": "TCP",
        "LoadBalancerPort": 80,
        "LoadBalancerProtocol": "TCP"
      }
    ],
    "LoadBalancerName": "example-lbu"
  }
}

DeleteListenerRule

POST /DeleteListenerRule

Deletes a listener rule.
The previously active rule is disabled after deletion.

Code samples

osc-cli api DeleteListenerRule --profile "default" \
  --ListenerRuleName "example-listener-rule"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteListenerRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ListenerRuleName": "example-listener-rule"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteListenerRule(
    ListenerRuleName="example-listener-rule",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ListenerApi(config);

    const result = await api.deleteListenerRule({
        deleteListenerRuleRequest: {
            listenerRuleName: "example-listener-rule",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ListenerRuleName (required) string The name of the rule you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteListenerRuleResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteLoadBalancerListeners

POST /DeleteLoadBalancerListeners

Deletes listeners of a specified load balancer.

Code samples

osc-cli api DeleteLoadBalancerListeners --profile "default" \
  --LoadBalancerName "example-lbu" \
  --LoadBalancerPorts '[80]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteLoadBalancerListeners \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "LoadBalancerPorts": [80]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteLoadBalancerListeners(
    LoadBalancerName="example-lbu",
    LoadBalancerPorts=[80],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ListenerApi(config);

    const result = await api.deleteLoadBalancerListeners({
        deleteLoadBalancerListenersRequest: {
            loadBalancerName: "example-lbu",
            loadBalancerPorts: [80],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerName (required) string The name of the load balancer for which you want to delete listeners.
LoadBalancerPorts (required) [integer] One or more port numbers of the listeners you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteLoadBalancerListenersResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "security-group-example",
      "SecurityGroupAccountId": "123456789012"
    },
    "SecuredCookies": false,
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internal",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "internal-example-lbu.123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [],
    "LoadBalancerName": "example-lbu"
  }
}

ReadListenerRules

POST /ReadListenerRules

Lists one or more listener rules. By default, this action returns the full list of listener rules for the account.

Code samples

osc-cli api ReadListenerRules --profile "default" \
  --Filters '{
      "ListenerRuleNames": ["example-listener-rule"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadListenerRules \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ListenerRuleNames": ["example-listener-rule"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadListenerRules(
    Filters={
        "ListenerRuleNames": ["example-listener-rule"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ListenerApi(config);

    const result = await api.readListenerRules({
        readListenerRulesRequest: {
            filters: {
                listenerRuleNames: ["example-listener-rule"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersListenerRule One or more filters.
» ListenerRuleNames [string] The names of the listener rules.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadListenerRulesResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ListenerRules": [
    {
      "Priority": 10,
      "VmIds": [
        "i-12345678"
      ],
      "ListenerRuleName": "example-listener-rule",
      "Action": "forward",
      "ListenerId": 123456,
      "HostNamePattern": "*.example.com",
      "ListenerRuleId": 1234
    }
  ]
}

UpdateListenerRule

POST /UpdateListenerRule

Updates the pattern of the listener rule.
This call updates the pattern matching algorithm for incoming traffic.

Code samples

osc-cli api UpdateListenerRule --profile "default" \
  --ListenerRuleName "example-listener-rule" \
  --HostPattern "*.newhost.com"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateListenerRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ListenerRuleName": "example-listener-rule",
    "HostPattern": "*.newhost.com"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateListenerRule(
    ListenerRuleName="example-listener-rule",
    HostPattern="*.newhost.com",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ListenerApi(config);

    const result = await api.updateListenerRule({
        updateListenerRuleRequest: {
            listenerRuleName: "example-listener-rule",
            hostPattern: "*.newhost.com",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
HostPattern string A host-name pattern for the rule, with a maximum length of 128 characters. This host-name pattern supports maximum three wildcards, and must not contain any special characters except [-.?].
ListenerRuleName (required) string The name of the listener rule.
PathPattern string A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except [_-.$/~"'@:+?].

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateListenerRuleResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ListenerRule": {
    "Priority": 10,
    "VmIds": [
      "i-12345678"
    ],
    "ListenerRuleName": "example-listener-rule",
    "Action": "forward",
    "ListenerId": 123456,
    "HostNamePattern": "*.newhost.com",
    "ListenerRuleId": 1234
  }
}

LoadBalancer

CreateLoadBalancer

POST /CreateLoadBalancer

Creates a load balancer.
The load balancer is created with a unique Domain Name Service (DNS) name. It receives the incoming traffic and routes it to its registered virtual machines (VMs).
By default, this action creates an Internet-facing load balancer, resolving to public IPs. To create an internal load balancer in a Net, resolving to private IPs, use the LoadBalancerType parameter.
You must specify either the Subnets or the SubregionNames parameters.

For more information, see About Load Balancers.

Code samples

# Creating an internal load balancer in a Net

osc-cli api CreateLoadBalancer --profile "default" \
  --LoadBalancerName "private-lb-example" \
  --Listeners '[
      {
        "BackendPort": 80,
        "BackendProtocol": "TCP",
        "LoadBalancerPort": 80,
        "LoadBalancerProtocol": "TCP",
      },
    ]' \
  --Subnets '["subnet-12345678"]' \
  --SecurityGroups '["sg-12345678"]' \
  --LoadBalancerType "internal"
# Creating an internet-facing load balancer in a Net

osc-cli api CreateLoadBalancer --profile "default" \
  --LoadBalancerName "private-lb-example" \
  --Listeners '[
      {
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 443,
        "LoadBalancerProtocol": "HTTPS",
        "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/Certificate",
      },
    ]' \
  --Subnets '["subnet-12345678"]' \
  --SecurityGroups '["sg-12345678"]' \
  --LoadBalancerType "internet-facing" \
  --PublicIp "192.0.2.0"
# Creating an internet-facing load balancer in the public Cloud

osc-cli api CreateLoadBalancer --profile "default" \
  --LoadBalancerName "public-lb-example" \
  --SubregionNames '["eu-west-2a"]' \
  --Listeners '[
      {
        "BackendPort": 8080,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 8080,
        "LoadBalancerProtocol": "HTTP",
      },
    ]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating an internal load balancer in a Net

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "private-lb-example",
    "Listeners": [
      {
        "BackendPort": 80,
        "BackendProtocol": "TCP",
        "LoadBalancerPort": 80,
        "LoadBalancerProtocol": "TCP"
      }
    ],
    "Subnets": ["subnet-12345678"],
    "SecurityGroups": ["sg-12345678"],
    "LoadBalancerType": "internal"
  }'
# Creating an internet-facing load balancer in a Net

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "private-lb-example",
    "Listeners": [
      {
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 443,
        "LoadBalancerProtocol": "HTTPS",
        "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/Certificate"
      }
    ],
    "Subnets": ["subnet-12345678"],
    "SecurityGroups": ["sg-12345678"],
    "LoadBalancerType": "internet-facing",
    "PublicIp": "192.0.2.0"
  }'
# Creating an internet-facing load balancer in the public Cloud

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "public-lb-example",
    "SubregionNames": ["eu-west-2a"],
    "Listeners": [
      {
        "BackendPort": 8080,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 8080,
        "LoadBalancerProtocol": "HTTP"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating an internal load balancer in a Net
result = gw.CreateLoadBalancer(
    LoadBalancerName="private-lb-example",
    Listeners=[
        {
            "BackendPort": 80,
            "BackendProtocol": "TCP",
            "LoadBalancerPort": 80,
            "LoadBalancerProtocol": "TCP",
        },
    ],
    Subnets=["subnet-12345678"],
    SecurityGroups=["sg-12345678"],
    LoadBalancerType="internal",
)
print(result)

# Creating an internet-facing load balancer in a Net
result = gw.CreateLoadBalancer(
    LoadBalancerName="private-lb-example",
    Listeners=[
        {
            "BackendPort": 80,
            "BackendProtocol": "HTTP",
            "LoadBalancerPort": 443,
            "LoadBalancerProtocol": "HTTPS",
            "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/Certificate",
        },
    ],
    Subnets=["subnet-12345678"],
    SecurityGroups=["sg-12345678"],
    LoadBalancerType="internet-facing",
    PublicIp="192.0.2.0",
)
print(result)

# Creating an internet-facing load balancer in the public Cloud
result = gw.CreateLoadBalancer(
    LoadBalancerName="public-lb-example",
    SubregionNames=["eu-west-2a"],
    Listeners=[
        {
            "BackendPort": 8080,
            "BackendProtocol": "HTTP",
            "LoadBalancerPort": 8080,
            "LoadBalancerProtocol": "HTTP",
        },
    ],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    /* Creating an internal load balancer in a Net */
    const result = await api.createLoadBalancer({
        createLoadBalancerRequest: {
            loadBalancerName: "private-lb-example",
            listeners: [
                {
                    backendPort: 80,
                    backendProtocol: "TCP",
                    loadBalancerPort: 80,
                    loadBalancerProtocol: "TCP",
                },
            ],
            subnets: ["subnet-12345678"],
            securityGroups: ["sg-12345678"],
            loadBalancerType: "internal",
        },
    });
    console.log(result);

    /* Creating an internet-facing load balancer in a Net */
    const result2 = await api.createLoadBalancer({
        createLoadBalancerRequest: {
            loadBalancerName: "private-lb-example",
            listeners: [
                {
                    backendPort: 80,
                    backendProtocol: "HTTP",
                    loadBalancerPort: 443,
                    loadBalancerProtocol: "HTTPS",
                    serverCertificateId: "orn:ows:idauth::012345678910:server-certificate/Certificate",
                },
            ],
            subnets: ["subnet-12345678"],
            securityGroups: ["sg-12345678"],
            loadBalancerType: "internet-facing",
            publicIp: "192.0.2.0",
        },
    });
    console.log(result2);

    /* Creating an internet-facing load balancer in the public Cloud */
    const result3 = await api.createLoadBalancer({
        createLoadBalancerRequest: {
            loadBalancerName: "public-lb-example",
            subregionNames: ["eu-west-2a"],
            listeners: [
                {
                    backendPort: 8080,
                    backendProtocol: "HTTP",
                    loadBalancerPort: 8080,
                    loadBalancerProtocol: "HTTP",
                },
            ],
        },
    });
    console.log(result3);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Listeners (required) [ListenerForCreation] One or more listeners to create.
» BackendPort (required) integer The port on which the backend VM is listening (between 1 and 65535, both included).
» BackendProtocol string The protocol for routing traffic to backend VMs (HTTP | HTTPS | TCP | SSL).
» LoadBalancerPort (required) integer The port on which the load balancer is listening (between 1 and 65535, both included).
» LoadBalancerProtocol (required) string The routing protocol (HTTP | HTTPS | TCP | SSL).
» ServerCertificateId string The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
LoadBalancerName (required) string The unique name of the load balancer (32 alphanumeric or hyphen characters maximum, but cannot start or end with a hyphen).
LoadBalancerType string The type of load balancer: internet-facing or internal. Use this parameter only for load balancers in a Net.
PublicIp string (internet-facing only) The public IP you want to associate with the load balancer. If not specified, a public IP owned by 3DS OUTSCALE is associated.
SecurityGroups [string] (Net only) One or more IDs of security groups you want to assign to the load balancer. If not specified, the default security group of the Net is assigned to the load balancer.
Subnets [string] (Net only) The ID of the Subnet in which you want to create the load balancer. Regardless of this Subnet, the load balancer can distribute traffic to all Subnets. This parameter is required in a Net.
SubregionNames [string] (public Cloud only) The Subregion in which you want to create the load balancer. Regardless of this Subregion, the load balancer can distribute traffic to all Subregions. This parameter is required in the public Cloud.
Tags [ResourceTag] One or more tags assigned to the load balancer.
» Key (required) string The key of the tag, with a minimum of 1 character.
» Value (required) string The value of the tag, between 0 and 255 characters.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateLoadBalancerResponse

Example responses

# Creating an internal load balancer in a Net
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "security-group-example",
      "SecurityGroupAccountId": "123456789012"
    },
    "SecuredCookies": false,
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internal",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "internal-private-lb-example.123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "BackendPort": 80,
        "BackendProtocol": "TCP",
        "LoadBalancerPort": 80,
        "LoadBalancerProtocol": "TCP"
      }
    ],
    "LoadBalancerName": "private-lb-example"
  }
}
# Creating an internet-facing load balancer in a Net
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "security-group-example",
      "SecurityGroupAccountId": "123456789012"
    },
    "SecuredCookies": false,
    "PublicIp": "192.0.2.0",
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internet-facing",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "private-lb-example.123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/Certificate",
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 443,
        "LoadBalancerProtocol": "HTTPS"
      }
    ],
    "LoadBalancerName": "private-lb-example"
  }
}
# Creating an internet-facing load balancer in the public Cloud
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "outscale-elb-sg",
      "SecurityGroupAccountId": "outscale-elb"
    },
    "SecuredCookies": false,
    "Subnets": [],
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "LoadBalancerType": "internet-facing",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "public-lb-example.123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 8080
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "BackendPort": 8080,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 8080,
        "LoadBalancerProtocol": "HTTP"
      }
    ],
    "LoadBalancerName": "public-lb-example"
  }
}

CreateLoadBalancerTags

POST /CreateLoadBalancerTags

Adds one or more tags to the specified load balancers.
If a tag with the same key already exists for the load balancer, the tag value is replaced.

For more information, see About Tags.

Code samples

osc-cli api CreateLoadBalancerTags --profile "default" \
  --LoadBalancerNames '["private-lb-example"]' \
  --Tags '[
      {
        "Key": "key1",
        "Value": "value1",
      },
    ]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateLoadBalancerTags \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerNames": ["private-lb-example"],
    "Tags": [
      {
        "Key": "key1",
        "Value": "value1"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateLoadBalancerTags(
    LoadBalancerNames=["private-lb-example"],
    Tags=[
        {
            "Key": "key1",
            "Value": "value1",
        },
    ],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    const result = await api.createLoadBalancerTags({
        createLoadBalancerTagsRequest: {
            loadBalancerNames: ["private-lb-example"],
            tags: [
                {
                    key: "key1",
                    value: "value1",
                },
            ],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerNames (required) [string] One or more load balancer names.
Tags (required) [ResourceTag] One or more tags to add to the specified load balancers.
» Key (required) string The key of the tag, with a minimum of 1 character.
» Value (required) string The value of the tag, between 0 and 255 characters.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateLoadBalancerTagsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteLoadBalancer

POST /DeleteLoadBalancer

Deletes a specified load balancer.

Code samples

osc-cli api DeleteLoadBalancer --profile "default" \
  --LoadBalancerName "example-lbu"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteLoadBalancer(
    LoadBalancerName="example-lbu",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    const result = await api.deleteLoadBalancer({
        deleteLoadBalancerRequest: {
            loadBalancerName: "example-lbu",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerName (required) string The name of the load balancer you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteLoadBalancerResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteLoadBalancerTags

POST /DeleteLoadBalancerTags

Deletes one or more tags from the specified load balancers.

Code samples

osc-cli api DeleteLoadBalancerTags --profile "default" \
  --LoadBalancerNames '["example-lbu"]' \
  --Tags '[
      {
        "Key": "key1",
      },
    ]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteLoadBalancerTags \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerNames": ["example-lbu"],
    "Tags": [
      {
        "Key": "key1"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteLoadBalancerTags(
    LoadBalancerNames=["example-lbu"],
    Tags=[
        {
            "Key": "key1",
        },
    ],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    const result = await api.deleteLoadBalancerTags({
        deleteLoadBalancerTagsRequest: {
            loadBalancerNames: ["example-lbu"],
            tags: [
                {
                    key: "key1",
                },
            ],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerNames (required) [string] One or more load balancer names.
Tags (required) [ResourceLoadBalancerTag] One or more tags to delete from the load balancers.
» Key string The key of the tag, with a minimum of 1 character.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteLoadBalancerTagsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeregisterVmsInLoadBalancer

POST /DeregisterVmsInLoadBalancer

Deregisters a specified virtual machine (VM) from a load balancer.

Code samples

osc-cli api DeregisterVmsInLoadBalancer --profile "default" \
  --LoadBalancerName "example-lbu" \
  --BackendVmIds '["i-12345678", "i-87654321"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeregisterVmsInLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "BackendVmIds": ["i-12345678", "i-87654321"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeregisterVmsInLoadBalancer(
    LoadBalancerName="example-lbu",
    BackendVmIds=["i-12345678","i-87654321"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    const result = await api.deregisterVmsInLoadBalancer({
        deregisterVmsInLoadBalancerRequest: {
            loadBalancerName: "example-lbu",
            backendVmIds: ["i-12345678", "i-87654321"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
BackendVmIds (required) [string] One or more IDs of backend VMs.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerName (required) string The name of the load balancer.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeregisterVmsInLoadBalancerResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

LinkLoadBalancerBackendMachines

POST /LinkLoadBalancerBackendMachines

Attaches one or more virtual machines (VMs) to a specified load balancer. You need to specify at least the BackendIps or the BackendVmIds parameter.
The VMs can be in different Subnets and different Subregions than the load balancer, as long as the VMs and load balancers are all in the public Cloud or all in the same Net. It may take a little time for a VM to be registered with the load balancer. Once the VM is registered with a load balancer, it receives traffic and requests from this load balancer and is called a backend VM.

Code samples

# Linking VMs to a load balancer

osc-cli api LinkLoadBalancerBackendMachines --profile "default" \
  --LoadBalancerName "example-lbu" \
  --BackendVmIds '["i-12345678", "i-87654321"]'
# Linking public IPs to a load balancer

osc-cli api LinkLoadBalancerBackendMachines --profile "default" \
  --LoadBalancerName "example-lbu" \
  --BackendIps '["192.0.2.0", "198.51.100.0"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Linking VMs to a load balancer

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkLoadBalancerBackendMachines \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "BackendVmIds": ["i-12345678", "i-87654321"]
  }'
# Linking public IPs to a load balancer

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkLoadBalancerBackendMachines \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "BackendIps": ["192.0.2.0", "198.51.100.0"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Linking VMs to a load balancer
result = gw.LinkLoadBalancerBackendMachines(
    LoadBalancerName="example-lbu",
    BackendVmIds=["i-12345678","i-87654321"],
)
print(result)

# Linking public IPs to a load balancer
result = gw.LinkLoadBalancerBackendMachines(
    LoadBalancerName="example-lbu",
    BackendIps=["192.0.2.0","198.51.100.0"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    /* Linking VMs to a load balancer */
    const result = await api.linkLoadBalancerBackendMachines({
        linkLoadBalancerBackendMachinesRequest: {
            loadBalancerName: "example-lbu",
            backendVmIds: ["i-12345678", "i-87654321"],
        },
    });
    console.log(result);

    /* Linking public IPs to a load balancer */
    const result2 = await api.linkLoadBalancerBackendMachines({
        linkLoadBalancerBackendMachinesRequest: {
            loadBalancerName: "example-lbu",
            backendIps: ["192.0.2.0", "198.51.100.0"],
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
BackendIps [string] One or more public IPs of backend VMs.
BackendVmIds [string] One or more IDs of backend VMs.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerName (required) string The name of the load balancer.

Responses

Status Description Schema
200 The HTTP 200 response (OK). LinkLoadBalancerBackendMachinesResponse

Example responses

# Linking VMs to a load balancer
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Linking public IPs to a load balancer
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadLoadBalancerTags

POST /ReadLoadBalancerTags

Lists the tags associated with one or more specified load balancers.

Code samples

osc-cli api ReadLoadBalancerTags --profile "default" \
  --LoadBalancerNames '["private-lb-example"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadLoadBalancerTags \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerNames": ["private-lb-example"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadLoadBalancerTags(
    LoadBalancerNames=["private-lb-example"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    const result = await api.readLoadBalancerTags({
        readLoadBalancerTagsRequest: {
            loadBalancerNames: ["private-lb-example"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerNames (required) [string] One or more load balancer names.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadLoadBalancerTagsResponse

Example responses

{
  "Tags": [
    {
      "Value": "value1",
      "LoadBalancerName": "private-lb-example",
      "Key": "key1"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadLoadBalancers

POST /ReadLoadBalancers

Lists one or more load balancers and their attributes.

Code samples

osc-cli api ReadLoadBalancers --profile "default" \
  --Filters '{
      "LoadBalancerNames": ["private*"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadLoadBalancers \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "LoadBalancerNames": ["private*"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadLoadBalancers(
    Filters={
        "LoadBalancerNames": ["private*"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    const result = await api.readLoadBalancers({
        readLoadBalancersRequest: {
            filters: {
                loadBalancerNames: ["private*"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersLoadBalancer One or more filters.
» LoadBalancerNames [string] The names of the load balancers.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadLoadBalancersResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancers": [
    {
      "Tags": [],
      "SourceSecurityGroup": {
        "SecurityGroupName": "security-group-example",
        "SecurityGroupAccountId": "123456789012"
      },
      "SecuredCookies": false,
      "PublicIp": "192.0.2.0",
      "Subnets": [
        "subnet-12345678"
      ],
      "NetId": "vpc-12345678",
      "BackendVmIds": [],
      "ApplicationStickyCookiePolicies": [],
      "SecurityGroups": [
        "sg-12345678"
      ],
      "LoadBalancerType": "internet-facing",
      "AccessLog": {
        "PublicationInterval": 60,
        "IsEnabled": false
      },
      "DnsName": "private-lb-example.123456789.eu-west-2.lbu.outscale.com",
      "HealthCheck": {
        "UnhealthyThreshold": 2,
        "Timeout": 5,
        "CheckInterval": 30,
        "Protocol": "TCP",
        "HealthyThreshold": 10,
        "Port": 80
      },
      "LoadBalancerStickyCookiePolicies": [],
      "SubregionNames": [
        "eu-west-2a"
      ],
      "Listeners": [
        {
          "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/Certificate",
          "BackendPort": 80,
          "BackendProtocol": "HTTP",
          "LoadBalancerPort": 443,
          "LoadBalancerProtocol": "HTTPS"
        }
      ],
      "LoadBalancerName": "private-lb-example"
    }
  ]
}

ReadVmsHealth

POST /ReadVmsHealth

Lists the state of one or more backend virtual machines (VMs) registered with a specified load balancer.

Code samples

osc-cli api ReadVmsHealth --profile "default" \
  --LoadBalancerName "example-lbu" \
  --BackendVmIds '["i-12345678", "i-87654321"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVmsHealth \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "BackendVmIds": ["i-12345678", "i-87654321"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadVmsHealth(
    LoadBalancerName="example-lbu",
    BackendVmIds=["i-12345678","i-87654321"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    const result = await api.readVmsHealth({
        readVmsHealthRequest: {
            loadBalancerName: "example-lbu",
            backendVmIds: ["i-12345678", "i-87654321"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
BackendVmIds [string] One or more IDs of backend VMs.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerName (required) string The name of the load balancer.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadVmsHealthResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "BackendVmHealth": [
    {
      "VmId": "i-12345678",
      "State": "UP"
    },
    {
      "VmId": "i-87654321",
      "StateReason": "ELB",
      "State": "DOWN",
      "Description": "Instance registration is pending"
    }
  ]
}

RegisterVmsInLoadBalancer

POST /RegisterVmsInLoadBalancer

Registers one or more virtual machines (VMs) with a specified load balancer.
The VMs can be in different Subnets and different Subregions than the load balancer, as long as the VMs and load balancers are all in the public Cloud or all in the same Net. It may take a little time for a VM to be registered with the load balancer. Once the VM is registered with a load balancer, it receives traffic and requests from this load balancer and is called a backend VM.

Code samples

osc-cli api RegisterVmsInLoadBalancer --profile "default" \
  --LoadBalancerName "example-lbu" \
  --BackendVmIds '["i-12345678", "i-87654321"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/RegisterVmsInLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "BackendVmIds": ["i-12345678", "i-87654321"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.RegisterVmsInLoadBalancer(
    LoadBalancerName="example-lbu",
    BackendVmIds=["i-12345678","i-87654321"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    const result = await api.registerVmsInLoadBalancer({
        registerVmsInLoadBalancerRequest: {
            loadBalancerName: "example-lbu",
            backendVmIds: ["i-12345678", "i-87654321"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
BackendVmIds (required) [string] One or more IDs of backend VMs.
Specifying the same ID several times has no effect as each backend VM has equal weight.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerName (required) string The name of the load balancer.

Responses

Status Description Schema
200 The HTTP 200 response (OK). RegisterVmsInLoadBalancerResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UnlinkLoadBalancerBackendMachines

POST /UnlinkLoadBalancerBackendMachines

Detaches one or more backend virtual machines (VMs) from a load balancer. You need to specify at least the BackendIps or the BackendVmIds parameter.

Code samples

# Unlinking VMs from a load balancer

osc-cli api UnlinkLoadBalancerBackendMachines --profile "default" \
  --LoadBalancerName "example-lbu" \
  --BackendVmIds '["i-12345678", "i-87654321"]'
# Unlinking public IPs from a load balancer

osc-cli api UnlinkLoadBalancerBackendMachines --profile "default" \
  --LoadBalancerName "example-lbu" \
  --BackendIps '["192.0.2.0", "198.51.100.0"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Unlinking VMs from a load balancer

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkLoadBalancerBackendMachines \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "BackendVmIds": ["i-12345678", "i-87654321"]
  }'
# Unlinking public IPs from a load balancer

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkLoadBalancerBackendMachines \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "BackendIps": ["192.0.2.0", "198.51.100.0"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Unlinking VMs from a load balancer
result = gw.UnlinkLoadBalancerBackendMachines(
    LoadBalancerName="example-lbu",
    BackendVmIds=["i-12345678","i-87654321"],
)
print(result)

# Unlinking public IPs from a load balancer
result = gw.UnlinkLoadBalancerBackendMachines(
    LoadBalancerName="example-lbu",
    BackendIps=["192.0.2.0","198.51.100.0"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    /* Unlinking VMs from a load balancer */
    const result = await api.unlinkLoadBalancerBackendMachines({
        unlinkLoadBalancerBackendMachinesRequest: {
            loadBalancerName: "example-lbu",
            backendVmIds: ["i-12345678", "i-87654321"],
        },
    });
    console.log(result);

    /* Unlinking public IPs from a load balancer */
    const result2 = await api.unlinkLoadBalancerBackendMachines({
        unlinkLoadBalancerBackendMachinesRequest: {
            loadBalancerName: "example-lbu",
            backendIps: ["192.0.2.0", "198.51.100.0"],
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
BackendIps [string] One or more public IPs of backend VMs.
BackendVmIds [string] One or more IDs of backend VMs.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerName (required) string The name of the load balancer.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UnlinkLoadBalancerBackendMachinesResponse

Example responses

# Unlinking VMs from a load balancer
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Unlinking public IPs from a load balancer
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateLoadBalancer

POST /UpdateLoadBalancer

Modifies the specified attribute of a load balancer. You can specify only one attribute at a time.

You can set a new SSL certificate to an SSL or HTTPS listener of a load balancer.
This certificate replaces any certificate used on the same load balancer and port.

You can also replace the currently enabled policy for the load balancer with another one.
If the PolicyNames parameter is empty, the currently enabled policy is disabled.

Code samples

# Updating health checks

osc-cli api UpdateLoadBalancer --profile "default" \
  --LoadBalancerName "private-lb-example" \
  --HealthCheck '{
      "HealthyThreshold": 10,
      "CheckInterval": 30,
      "Path": "/index.html",
      "Port": 8080,
      "Protocol": "HTTPS",
      "Timeout": 5,
      "UnhealthyThreshold": 5,
    }'
# Updating access logs

osc-cli api UpdateLoadBalancer --profile "default" \
  --LoadBalancerName "private-lb-example" \
  --AccessLog '{
      "PublicationInterval": 5,
      "IsEnabled": True,
      "OsuBucketName": "BUCKET",
      "OsuBucketPrefix": "PREFIX",
    }'
# Updating policies

osc-cli api UpdateLoadBalancer --profile "default" \
  --LoadBalancerName "private-lb-example" \
  --LoadBalancerPort 443 \
  --PolicyNames '["example-browser-policy"]'
# Updating SSL certificate

osc-cli api UpdateLoadBalancer --profile "default" \
  --LoadBalancerName "private-lb-example" \
  --LoadBalancerPort 443 \
  --ServerCertificateId "orn:ows:idauth::012345678910:server-certificate/AnotherCertificate"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Updating health checks

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "private-lb-example",
    "HealthCheck": {
      "HealthyThreshold": 10,
      "CheckInterval": 30,
      "Path": "/index.html",
      "Port": 8080,
      "Protocol": "HTTPS",
      "Timeout": 5,
      "UnhealthyThreshold": 5
    }
  }'
# Updating access logs

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "private-lb-example",
    "AccessLog": {
      "PublicationInterval": 5,
      "IsEnabled": true,
      "OsuBucketName": "BUCKET",
      "OsuBucketPrefix": "PREFIX"
    }
  }'
# Updating policies

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "private-lb-example",
    "LoadBalancerPort": 443,
    "PolicyNames": ["example-browser-policy"]
  }'
# Updating SSL certificate

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "private-lb-example",
    "LoadBalancerPort": 443,
    "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/AnotherCertificate"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Updating health checks
result = gw.UpdateLoadBalancer(
    LoadBalancerName="private-lb-example",
    HealthCheck={
        "HealthyThreshold": 10,
        "CheckInterval": 30,
        "Path": "/index.html",
        "Port": 8080,
        "Protocol": "HTTPS",
        "Timeout": 5,
        "UnhealthyThreshold": 5,
    },
)
print(result)

# Updating access logs
result = gw.UpdateLoadBalancer(
    LoadBalancerName="private-lb-example",
    AccessLog={
        "PublicationInterval": 5,
        "IsEnabled": True,
        "OsuBucketName": "BUCKET",
        "OsuBucketPrefix": "PREFIX",
    },
)
print(result)

# Updating policies
result = gw.UpdateLoadBalancer(
    LoadBalancerName="private-lb-example",
    LoadBalancerPort=443,
    PolicyNames=["example-browser-policy"],
)
print(result)

# Updating SSL certificate
result = gw.UpdateLoadBalancer(
    LoadBalancerName="private-lb-example",
    LoadBalancerPort=443,
    ServerCertificateId="orn:ows:idauth::012345678910:server-certificate/AnotherCertificate",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerApi(config);

    /* Updating health checks */
    const result = await api.updateLoadBalancer({
        updateLoadBalancerRequest: {
            loadBalancerName: "private-lb-example",
            healthCheck: {
                healthyThreshold: 10,
                checkInterval: 30,
                path: "/index.html",
                port: 8080,
                protocol: "HTTPS",
                timeout: 5,
                unhealthyThreshold: 5,
            },
        },
    });
    console.log(result);

    /* Updating access logs */
    const result2 = await api.updateLoadBalancer({
        updateLoadBalancerRequest: {
            loadBalancerName: "private-lb-example",
            accessLog: {
                publicationInterval: 5,
                isEnabled: true,
                osuBucketName: "BUCKET",
                osuBucketPrefix: "PREFIX",
            },
        },
    });
    console.log(result2);

    /* Updating policies */
    const result3 = await api.updateLoadBalancer({
        updateLoadBalancerRequest: {
            loadBalancerName: "private-lb-example",
            loadBalancerPort: 443,
            policyNames: ["example-browser-policy"],
        },
    });
    console.log(result3);

    /* Updating SSL certificate */
    const result4 = await api.updateLoadBalancer({
        updateLoadBalancerRequest: {
            loadBalancerName: "private-lb-example",
            loadBalancerPort: 443,
            serverCertificateId: "orn:ows:idauth::012345678910:server-certificate/AnotherCertificate",
        },
    });
    console.log(result4);

}

main();

Available Parameters

Name Type Description
AccessLog AccessLog Information about access logs.
» IsEnabled boolean If true, access logs are enabled for your load balancer. If false, they are not. If you set this to true in your request, the OsuBucketName parameter is required.
» OsuBucketName string The name of the OOS bucket for the access logs.
» OsuBucketPrefix string The path to the folder of the access logs in your OOS bucket (by default, the root level of your bucket).
» PublicationInterval integer The time interval for the publication of access logs in the OOS bucket, in minutes. This value can be either 5 or 60 (by default, 60).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
HealthCheck HealthCheck Information about the health check configuration.
» CheckInterval (required) integer The number of seconds between two requests (between 5 and 600 both included).
» HealthyThreshold (required) integer The number of consecutive successful requests before considering the VM as healthy (between 2 and 10 both included).
» Path string If you use the HTTP or HTTPS protocols, the request URL path.
» Port (required) integer The port number (between 1 and 65535, both included).
» Protocol (required) string The protocol for the URL of the VM (HTTP | HTTPS | TCP | SSL).
» Timeout (required) integer The maximum waiting time for a response before considering the VM as unhealthy, in seconds (between 2 and 60 both included).
» UnhealthyThreshold (required) integer The number of consecutive failed requests before considering the VM as unhealthy (between 2 and 10 both included).
LoadBalancerName (required) string The name of the load balancer.
LoadBalancerPort integer The port on which the load balancer is listening (between 1 and 65535, both included). This parameter is required if you want to update the server certificate.
PolicyNames [string] The name of the policy you want to enable for the listener.
PublicIp string (internet-facing only) The public IP you want to associate with the load balancer. The former public IP of the load balancer is then disassociated. If you specify an empty string and the former public IP belonged to you, it is disassociated and replaced by a public IP owned by 3DS OUTSCALE.
SecuredCookies boolean If true, secure cookies are enabled for the load balancer.
SecurityGroups [string] (Net only) One or more IDs of security groups you want to assign to the load balancer. You need to specify the already assigned security groups that you want to keep along with the new ones you are assigning. If the list is empty, the default security group of the Net is assigned to the load balancer.
ServerCertificateId string The Outscale Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > Outscale Resource Names (ORNs). If this parameter is specified, you must also specify the LoadBalancerPort parameter.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateLoadBalancerResponse

Example responses

# Updating health checks
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "security-group-example",
      "SecurityGroupAccountId": "123456789012"
    },
    "SecuredCookies": false,
    "PublicIp": "192.0.2.0",
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internet-facing",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "private-lb-example.123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 5,
      "Timeout": 5,
      "CheckInterval": 30,
      "Path": "/index.html",
      "Protocol": "HTTPS",
      "HealthyThreshold": 10,
      "Port": 8080
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/Certificate",
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 443,
        "LoadBalancerProtocol": "HTTPS"
      }
    ],
    "LoadBalancerName": "private-lb-example"
  }
}
# Updating access logs
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "security-group-example",
      "SecurityGroupAccountId": "123456789012"
    },
    "SecuredCookies": false,
    "PublicIp": "192.0.2.0",
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internet-facing",
    "AccessLog": {
      "PublicationInterval": 5,
      "OsuBucketPrefix": "PREFIX",
      "OsuBucketName": "BUCKET",
      "IsEnabled": true
    },
    "DnsName": "private-lb-example.123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/Certificate",
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 443,
        "LoadBalancerProtocol": "HTTPS"
      }
    ],
    "LoadBalancerName": "private-lb-example"
  }
}
# Updating policies
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "security-group-example",
      "SecurityGroupAccountId": "123456789012"
    },
    "SecuredCookies": false,
    "PublicIp": "192.0.2.0",
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internet-facing",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "private-lb-example.123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [
      {
        "PolicyName": "example-browser-policy",
        "CookieExpirationPeriod": 1
      }
    ],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/Certificate",
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 443,
        "LoadBalancerProtocol": "HTTPS"
      }
    ],
    "LoadBalancerName": "private-lb-example"
  }
}
# Updating SSL certificate
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "security-group-example",
      "SecurityGroupAccountId": "123456789012"
    },
    "SecuredCookies": false,
    "PublicIp": "192.0.2.0",
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internet-facing",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "private-lb-example.123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "ServerCertificateId": "orn:ows:idauth::012345678910:server-certificate/AnotherCertificate",
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 443,
        "LoadBalancerProtocol": "HTTPS"
      }
    ],
    "LoadBalancerName": "private-lb-example"
  }
}

LoadBalancerPolicy

CreateLoadBalancerPolicy

POST /CreateLoadBalancerPolicy

Creates a stickiness policy with sticky session lifetimes defined by the browser lifetime.
The created policy can be used with HTTP or HTTPS listeners only.
If this policy is implemented by a load balancer, this load balancer uses this cookie in all incoming requests to direct them to the specified backend server virtual machine (VM). If this cookie is not present, the load balancer sends the request to any other server according to its load-balancing algorithm.

You can also create a stickiness policy with sticky session lifetimes following the lifetime of an application-generated cookie.
Unlike the other type of stickiness policy, the lifetime of the special Load Balancer Unit (LBU) cookie follows the lifetime of the application-generated cookie specified in the policy configuration. The load balancer inserts a new stickiness cookie only when the application response includes a new application cookie.
The session stops being sticky if the application cookie is removed or expires, until a new application cookie is issued.

For more information, see About Load Balancers.

Code samples

# Creating a load balancer policy based on browser

osc-cli api CreateLoadBalancerPolicy --profile "default" \
  --LoadBalancerName "example-lbu" \
  --PolicyName "example-browser-policy" \
  --PolicyType "load_balancer"
# Creating a load balancer policy based on application cookie

osc-cli api CreateLoadBalancerPolicy --profile "default" \
  --LoadBalancerName "example-lbu" \
  --PolicyName "example-app-policy" \
  --PolicyType "app" \
  --CookieName "example-cookie"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating a load balancer policy based on browser

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateLoadBalancerPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "PolicyName": "example-browser-policy",
    "PolicyType": "load_balancer"
  }'
# Creating a load balancer policy based on application cookie

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateLoadBalancerPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "PolicyName": "example-app-policy",
    "PolicyType": "app",
    "CookieName": "example-cookie"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating a load balancer policy based on browser
result = gw.CreateLoadBalancerPolicy(
    LoadBalancerName="example-lbu",
    PolicyName="example-browser-policy",
    PolicyType="load_balancer",
)
print(result)

# Creating a load balancer policy based on application cookie
result = gw.CreateLoadBalancerPolicy(
    LoadBalancerName="example-lbu",
    PolicyName="example-app-policy",
    PolicyType="app",
    CookieName="example-cookie",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerPolicyApi(config);

    /* Creating a load balancer policy based on browser */
    const result = await api.createLoadBalancerPolicy({
        createLoadBalancerPolicyRequest: {
            loadBalancerName: "example-lbu",
            policyName: "example-browser-policy",
            policyType: "load_balancer",
        },
    });
    console.log(result);

    /* Creating a load balancer policy based on application cookie */
    const result2 = await api.createLoadBalancerPolicy({
        createLoadBalancerPolicyRequest: {
            loadBalancerName: "example-lbu",
            policyName: "example-app-policy",
            policyType: "app",
            cookieName: "example-cookie",
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
CookieExpirationPeriod integer The lifetime of the cookie, in seconds. If not specified, the default value of this parameter is 1, which means that the sticky session lasts for the duration of the browser session.
CookieName string The name of the application cookie used for stickiness. This parameter is required if you create a stickiness policy based on an application-generated cookie.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerName (required) string The name of the load balancer for which you want to create a policy.
PolicyName (required) string The name of the policy. This name must be unique and consist of alphanumeric characters and dashes (-).
PolicyType (required) string The type of stickiness policy you want to create: app or load_balancer.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateLoadBalancerPolicyResponse

Example responses

# Creating a load balancer policy based on browser
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "default",
      "SecurityGroupAccountId": "123456789012"
    },
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internet-facing",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "example-lbu-123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [
      {
        "PolicyName": "example-browser-policy",
        "CookieExpirationPeriod": 1
      }
    ],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 80,
        "LoadBalancerProtocol": "HTTP"
      }
    ],
    "LoadBalancerName": "example-lbu"
  }
}
# Creating a load balancer policy based on application cookie
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "default",
      "SecurityGroupAccountId": "123456789012"
    },
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [
      {
        "PolicyName": "example-app-policy",
        "CookieName": "example-cookie"
      }
    ],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internet-facing",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "example-lbu-123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 80,
        "LoadBalancerProtocol": "HTTP"
      }
    ],
    "LoadBalancerName": "example-lbu"
  }
}

DeleteLoadBalancerPolicy

POST /DeleteLoadBalancerPolicy

Deletes a specified policy from a load balancer.
In order to be deleted, the policy must not be enabled for any listener.

Code samples

osc-cli api DeleteLoadBalancerPolicy --profile "default" \
  --LoadBalancerName "example-lbu" \
  --PolicyName "example-browser-policy"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteLoadBalancerPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LoadBalancerName": "example-lbu",
    "PolicyName": "example-browser-policy"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteLoadBalancerPolicy(
    LoadBalancerName="example-lbu",
    PolicyName="example-browser-policy",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.LoadBalancerPolicyApi(config);

    const result = await api.deleteLoadBalancerPolicy({
        deleteLoadBalancerPolicyRequest: {
            loadBalancerName: "example-lbu",
            policyName: "example-browser-policy",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LoadBalancerName (required) string The name of the load balancer for which you want to delete a policy.
PolicyName (required) string The name of the policy you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteLoadBalancerPolicyResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LoadBalancer": {
    "Tags": [],
    "SourceSecurityGroup": {
      "SecurityGroupName": "default",
      "SecurityGroupAccountId": "123456789012"
    },
    "SecuredCookies": false,
    "PublicIp": "192.0.2.0",
    "Subnets": [
      "subnet-12345678"
    ],
    "NetId": "vpc-12345678",
    "BackendVmIds": [],
    "ApplicationStickyCookiePolicies": [],
    "SecurityGroups": [
      "sg-12345678"
    ],
    "LoadBalancerType": "internet-facing",
    "AccessLog": {
      "PublicationInterval": 60,
      "IsEnabled": false
    },
    "DnsName": "example-lbu-123456789.eu-west-2.lbu.outscale.com",
    "HealthCheck": {
      "UnhealthyThreshold": 2,
      "Timeout": 5,
      "CheckInterval": 30,
      "Protocol": "TCP",
      "HealthyThreshold": 10,
      "Port": 80
    },
    "LoadBalancerStickyCookiePolicies": [],
    "SubregionNames": [
      "eu-west-2a"
    ],
    "Listeners": [
      {
        "BackendPort": 80,
        "BackendProtocol": "HTTP",
        "LoadBalancerPort": 80,
        "LoadBalancerProtocol": "HTTP"
      }
    ],
    "LoadBalancerName": "example-lbu"
  }
}

Location

ReadLocations

POST /ReadLocations

Lists the locations, corresponding to datacenters, where you can set up a DirectLink.

For more information, see About DirectLink.

Code samples

osc-cli api ReadLocations --profile "default"

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadLocations \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadLocations()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
    });
    const api = new osc.LocationApi(config);

    const result = await api.readLocations({
        readLocationsRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadLocationsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Locations": [
    {
      "Name": "Telehouse 3, France",
      "Code": "PAR1"
    },
    {
      "Name": "Equinix Pantin, France",
      "Code": "PAR4"
    }
  ]
}

NatService

CreateNatService

POST /CreateNatService

Creates a network address translation (NAT) service in the specified public Subnet of a Net.
A NAT service enables virtual machines (VMs) placed in the private Subnet of this Net to connect to the Internet, without being accessible from the Internet.
When creating a NAT service, you specify the allocation ID of the public IP you want to use as public IP for the NAT service. Once the NAT service is created, you need to create a route in the route table of the private Subnet, with 0.0.0.0/0 as destination and the ID of the NAT service as target. For more information, see LinkPublicIP and CreateRoute.
This action also enables you to create multiple NAT services in the same Net (one per public Subnet).

[IMPORTANT]
You cannot modify the public IP associated with a NAT service after its creation. To do so, you need to delete the NAT service and create a new one with another public IP.

For more information, see About NAT Services.

Code samples

osc-cli api CreateNatService --profile "default" \
  --SubnetId "subnet-12345678" \
  --PublicIpId "eipalloc-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNatService \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SubnetId": "subnet-12345678",
    "PublicIpId": "eipalloc-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateNatService(
    SubnetId="subnet-12345678",
    PublicIpId="eipalloc-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NatServiceApi(config);

    const result = await api.createNatService({
        createNatServiceRequest: {
            subnetId: "subnet-12345678",
            publicIpId: "eipalloc-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
PublicIpId (required) string The allocation ID of the public IP to associate with the NAT service.
If the public IP is already associated with another resource, you must first disassociate it.
SubnetId (required) string The ID of the Subnet in which you want to create the NAT service.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateNatServiceResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NatService": {
    "Tags": [],
    "SubnetId": "subnet-12345678",
    "NatServiceId": "nat-12345678",
    "PublicIps": [
      {
        "PublicIpId": "eipalloc-12345678",
        "PublicIp": "192.0.2.0"
      }
    ],
    "NetId": "vpc-12345678",
    "State": "available"
  }
}

DeleteNatService

POST /DeleteNatService

Deletes a specified network address translation (NAT) service.
This action disassociates the public IP from the NAT service, but does not release this public IP from your account. However, it does not delete any NAT service routes in your route tables.

Code samples

osc-cli api DeleteNatService --profile "default" \
  --NatServiceId "nat-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteNatService \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NatServiceId": "nat-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteNatService(
    NatServiceId="nat-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NatServiceApi(config);

    const result = await api.deleteNatService({
        deleteNatServiceRequest: {
            natServiceId: "nat-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NatServiceId (required) string The ID of the NAT service you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteNatServiceResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadNatServices

POST /ReadNatServices

Lists one or more network address translation (NAT) services.

Code samples

osc-cli api ReadNatServices --profile "default" \
  --Filters '{
      "NatServiceIds": ["nat-12345678"],
    }'
osc-cli api ReadNatServices --profile "default" \
  --Filters '{
      "NetIds": ["vpc-12345678", "vpc-87654321"],
      "SubnetIds": ["subnet-12345678"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNatServices \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "NatServiceIds": ["nat-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNatServices \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "NetIds": ["vpc-12345678", "vpc-87654321"],
      "SubnetIds": ["subnet-12345678"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadNatServices(
    Filters={
        "NatServiceIds": ["nat-12345678"],
    },
)
print(result)

result = gw.ReadNatServices(
    Filters={
        "NetIds": ["vpc-12345678","vpc-87654321"],
        "SubnetIds": ["subnet-12345678"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NatServiceApi(config);

    const result = await api.readNatServices({
        readNatServicesRequest: {
            filters: {
                natServiceIds: ["nat-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readNatServices({
        readNatServicesRequest: {
            filters: {
                netIds: ["vpc-12345678", "vpc-87654321"],
                subnetIds: ["subnet-12345678"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersNatService One or more filters.
» NatServiceIds [string] The IDs of the NAT services.
» NetIds [string] The IDs of the Nets in which the NAT services are.
» States [string] The states of the NAT services (pending | available | deleting | deleted).
» SubnetIds [string] The IDs of the Subnets in which the NAT services are.
» TagKeys [string] The keys of the tags associated with the NAT services.
» TagValues [string] The values of the tags associated with the NAT services.
» Tags [string] The key/value combination of the tags associated with the NAT services, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadNatServicesResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NatServices": [
    {
      "Tags": [],
      "SubnetId": "subnet-12345678",
      "NatServiceId": "nat-12345678",
      "PublicIps": [
        {
          "PublicIpId": "eipalloc-12345678",
          "PublicIp": "192.0.2.0"
        }
      ],
      "NetId": "vpc-12345678",
      "State": "available"
    }
  ]
}

Net

CreateNet

POST /CreateNet

Creates a Net with a specified IP range.
The IP range (network range) of your Net must be between a /28 netmask (16 IPs) and a /16 netmask (65536 IPs).

For more information, see About Nets.

Code samples

osc-cli api CreateNet --profile "default" \
  --IpRange "10.0.0.0/16"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNet \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "IpRange": "10.0.0.0/16"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateNet(
    IpRange="10.0.0.0/16",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetApi(config);

    const result = await api.createNet({
        createNetRequest: {
            ipRange: "10.0.0.0/16",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
IpRange (required) string The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).
Tenancy string The tenancy options for the VMs:
- default if a VM created in a Net can be launched with any tenancy.
- dedicated if it can be launched with dedicated tenancy VMs running on single-tenant hardware.
- dedicated group ID: if it can be launched in a dedicated group on single-tenant hardware.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateNetResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
409 The HTTP 409 response (Conflict). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Net": {
    "Tags": [],
    "DhcpOptionsSetId": "dopt-12345678",
    "IpRange": "10.0.0.0/16",
    "Tenancy": "default",
    "NetId": "vpc-12345678",
    "State": "available"
  }
}

DeleteNet

POST /DeleteNet

Deletes a specified Net.
Before deleting the Net, you need to delete or detach all the resources associated with the Net:

  • Virtual machines (VMs)
  • Net peerings
  • Custom route tables
  • Public IPs allocated to resources in the Net
  • Network Interface Cards (NICs) created in the Subnets
  • Virtual gateways, Internet services and NAT services
  • Load balancers
  • Security groups
  • Subnets

Code samples

osc-cli api DeleteNet --profile "default" \
  --NetId "vpc-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteNet \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetId": "vpc-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteNet(
    NetId="vpc-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetApi(config);

    const result = await api.deleteNet({
        deleteNetRequest: {
            netId: "vpc-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetId (required) string The ID of the Net you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteNetResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadNets

POST /ReadNets

Lists one or more Nets.

Code samples

osc-cli api ReadNets --profile "default" \
  --Filters '{
      "NetIds": ["vpc-12345678"],
    }'
osc-cli api ReadNets --profile "default" \
  --Filters '{
      "States": ["available"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNets \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "NetIds": ["vpc-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNets \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "States": ["available"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadNets(
    Filters={
        "NetIds": ["vpc-12345678"],
    },
)
print(result)

result = gw.ReadNets(
    Filters={
        "States": ["available"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetApi(config);

    const result = await api.readNets({
        readNetsRequest: {
            filters: {
                netIds: ["vpc-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readNets({
        readNetsRequest: {
            filters: {
                states: ["available"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersNet One or more filters.
» DhcpOptionsSetIds [string] The IDs of the DHCP options sets.
» IpRanges [string] The IP ranges for the Nets, in CIDR notation (for example, 10.0.0.0/16).
» IsDefault boolean If true, the Net used is the default one.
» NetIds [string] The IDs of the Nets.
» States [string] The states of the Nets (pending | available | deleting).
» TagKeys [string] The keys of the tags associated with the Nets.
» TagValues [string] The values of the tags associated with the Nets.
» Tags [string] The key/value combination of the tags associated with the Nets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadNetsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Nets": [
    {
      "Tags": [],
      "DhcpOptionsSetId": "dopt-12345678",
      "IpRange": "10.0.0.0/16",
      "Tenancy": "default",
      "NetId": "vpc-12345678",
      "State": "available"
    }
  ]
}

UpdateNet

POST /UpdateNet

Associates a DHCP options set with a specified Net.

Code samples

osc-cli api UpdateNet --profile "default" \
  --NetId "vpc-12345678" \
  --DhcpOptionsSetId "dopt-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateNet \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetId": "vpc-12345678",
    "DhcpOptionsSetId": "dopt-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateNet(
    NetId="vpc-12345678",
    DhcpOptionsSetId="dopt-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetApi(config);

    const result = await api.updateNet({
        updateNetRequest: {
            netId: "vpc-12345678",
            dhcpOptionsSetId: "dopt-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DhcpOptionsSetId (required) string The ID of the DHCP options set (or default if you want to associate the default one).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetId (required) string The ID of the Net.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateNetResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Net": {
    "Tags": [],
    "DhcpOptionsSetId": "dopt-12345678",
    "IpRange": "10.0.0.0/16",
    "Tenancy": "default",
    "NetId": "vpc-12345678",
    "State": "available"
  }
}

NetAccessPoint

CreateNetAccessPoint

POST /CreateNetAccessPoint

Creates a Net access point to access an OUTSCALE service from this Net without using the Internet and public IPs.
You specify the service using its name. For more information about the available services, see ReadNetAccessPointServices.
To control the routing of traffic between the Net and the specified service, you can specify one or more route tables. Virtual machines placed in Subnets associated with the specified route table thus use the Net access point to access the service. When you specify a route table, a route is automatically added to it with the destination set to the prefix list ID of the service, and the target set to the ID of the access point.

For more information, see About Net Access Points.

Code samples

osc-cli api CreateNetAccessPoint --profile "default" \
  --NetId "vpc-12345678" \
  --RouteTableIds '["rtb-12345678"]' \
  --ServiceName "com.outscale.eu-west-2.oos"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNetAccessPoint \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetId": "vpc-12345678",
    "RouteTableIds": ["rtb-12345678"],
    "ServiceName": "com.outscale.eu-west-2.oos"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateNetAccessPoint(
    NetId="vpc-12345678",
    RouteTableIds=["rtb-12345678"],
    ServiceName="com.outscale.eu-west-2.oos",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetAccessPointApi(config);

    const result = await api.createNetAccessPoint({
        createNetAccessPointRequest: {
            netId: "vpc-12345678",
            routeTableIds: ["rtb-12345678"],
            serviceName: "com.outscale.eu-west-2.oos",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetId (required) string The ID of the Net.
RouteTableIds [string] One or more IDs of route tables to use for the connection.
ServiceName (required) string The name of the service (in the format com.outscale.region.service).

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateNetAccessPointResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NetAccessPoint": {
    "Tags": [],
    "NetAccessPointId": "vpce-12345678",
    "RouteTableIds": [
      "rtb-12345678"
    ],
    "State": "pending",
    "NetId": "vpc-12345678",
    "ServiceName": "com.outscale.eu-west-2.oos"
  }
}

DeleteNetAccessPoint

POST /DeleteNetAccessPoint

Deletes a specified Net access point.
This action also deletes the corresponding routes added to the route tables you specified for the Net access point.

Code samples

osc-cli api DeleteNetAccessPoint --profile "default" \
  --NetAccessPointId "vpce-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteNetAccessPoint \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetAccessPointId": "vpce-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteNetAccessPoint(
    NetAccessPointId="vpce-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetAccessPointApi(config);

    const result = await api.deleteNetAccessPoint({
        deleteNetAccessPointRequest: {
            netAccessPointId: "vpce-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetAccessPointId (required) string The ID of the Net access point.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteNetAccessPointResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadNetAccessPointServices

POST /ReadNetAccessPointServices

Lists OUTSCALE services available to create Net access points.
For more information, see CreateNetAccessPoint.

Code samples

# Listing one or more services according to their service IDs

osc-cli api ReadNetAccessPointServices --profile "default" \
  --Filters '{
      "ServiceIds": ["pl-12345678", "pl-87654321"],
    }'
# Listing one or more services according to their service names

osc-cli api ReadNetAccessPointServices --profile "default" \
  --Filters '{
      "ServiceNames": ["com.outscale.eu-west-2.api"],
    }'

# Listing one or more services according to their service IDs

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNetAccessPointServices \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ServiceIds": ["pl-12345678", "pl-87654321"]
    }
  }'
# Listing one or more services according to their service names

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNetAccessPointServices \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ServiceNames": ["com.outscale.eu-west-2.api"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Listing one or more services according to their service IDs
result = gw.ReadNetAccessPointServices(
    Filters={
        "ServiceIds": ["pl-12345678","pl-87654321"],
    },
)
print(result)

# Listing one or more services according to their service names
result = gw.ReadNetAccessPointServices(
    Filters={
        "ServiceNames": ["com.outscale.eu-west-2.api"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
    });
    const api = new osc.NetAccessPointApi(config);

    /* Listing one or more services according to their service IDs */
    const result = await api.readNetAccessPointServices({
        readNetAccessPointServicesRequest: {
            filters: {
                serviceIds: ["pl-12345678", "pl-87654321"],
            },
        },
    });
    console.log(result);

    /* Listing one or more services according to their service names */
    const result2 = await api.readNetAccessPointServices({
        readNetAccessPointServicesRequest: {
            filters: {
                serviceNames: ["com.outscale.eu-west-2.api"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersService One or more filters.
» ServiceIds [string] The IDs of the services.
» ServiceNames [string] The names of the services.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadNetAccessPointServicesResponse

Example responses

# Listing one or more services according to their service IDs
{
  "Services": [
    {
      "ServiceName": "com.outscale.eu-west-2.api",
      "ServiceId": "pl-12345678",
      "IpRanges": [
        "192.0.2.0"
      ]
    },
    {
      "ServiceName": "com.outscale.eu-west-2.oos",
      "ServiceId": "pl-87654321",
      "IpRanges": [
        "198.51.100.0",
        "203.0.113.0",
        "203.0.113.1"
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Listing one or more services according to their service names
{
  "Services": [
    {
      "ServiceName": "com.outscale.eu-west-2.api",
      "ServiceId": "pl-12345678",
      "IpRanges": [
        "192.0.2.0"
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadNetAccessPoints

POST /ReadNetAccessPoints

Lists one or more Net access points.

Code samples

osc-cli api ReadNetAccessPoints --profile "default" \
  --Filters '{
      "NetAccessPointIds": ["vpce-12345678"],
    }'
osc-cli api ReadNetAccessPoints --profile "default" \
  --Filters '{
      "NetIds": ["vpc-12345678"],
      "States": ["available"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNetAccessPoints \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "NetAccessPointIds": ["vpce-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNetAccessPoints \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "NetIds": ["vpc-12345678"],
      "States": ["available"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadNetAccessPoints(
    Filters={
        "NetAccessPointIds": ["vpce-12345678"],
    },
)
print(result)

result = gw.ReadNetAccessPoints(
    Filters={
        "NetIds": ["vpc-12345678"],
        "States": ["available"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetAccessPointApi(config);

    const result = await api.readNetAccessPoints({
        readNetAccessPointsRequest: {
            filters: {
                netAccessPointIds: ["vpce-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readNetAccessPoints({
        readNetAccessPointsRequest: {
            filters: {
                netIds: ["vpc-12345678"],
                states: ["available"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersNetAccessPoint One or more filters.
» NetAccessPointIds [string] The IDs of the Net access points.
» NetIds [string] The IDs of the Nets.
» ServiceNames [string] The names of the services. For more information, see ReadNetAccessPointServices.
» States [string] The states of the Net access points (pending | available | deleting | deleted).
» TagKeys [string] The keys of the tags associated with the Net access points.
» TagValues [string] The values of the tags associated with the Net access points.
» Tags [string] The key/value combination of the tags associated with the Net access points, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadNetAccessPointsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NetAccessPoints": [
    {
      "Tags": [],
      "NetAccessPointId": "vpce-12345678",
      "RouteTableIds": [
        "rtb-12345678"
      ],
      "State": "available",
      "NetId": "vpc-12345678",
      "ServiceName": "com.outscale.eu-west-2.oos"
    }
  ]
}

UpdateNetAccessPoint

POST /UpdateNetAccessPoint

Modifies the attributes of a Net access point.
This action enables you to add or remove route tables associated with the specified Net access point.

Code samples

# Adding a route table

osc-cli api UpdateNetAccessPoint --profile "default" \
  --NetAccessPointId "vpce-12345678" \
  --AddRouteTableIds '["rtb-87654321"]'
# Removing a route table

osc-cli api UpdateNetAccessPoint --profile "default" \
  --NetAccessPointId "vpce-12345678" \
  --RemoveRouteTableIds '["rtb-12345678"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Adding a route table

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateNetAccessPoint \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetAccessPointId": "vpce-12345678",
    "AddRouteTableIds": ["rtb-87654321"]
  }'
# Removing a route table

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateNetAccessPoint \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetAccessPointId": "vpce-12345678",
    "RemoveRouteTableIds": ["rtb-12345678"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Adding a route table
result = gw.UpdateNetAccessPoint(
    NetAccessPointId="vpce-12345678",
    AddRouteTableIds=["rtb-87654321"],
)
print(result)

# Removing a route table
result = gw.UpdateNetAccessPoint(
    NetAccessPointId="vpce-12345678",
    RemoveRouteTableIds=["rtb-12345678"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetAccessPointApi(config);

    /* Adding a route table */
    const result = await api.updateNetAccessPoint({
        updateNetAccessPointRequest: {
            netAccessPointId: "vpce-12345678",
            addRouteTableIds: ["rtb-87654321"],
        },
    });
    console.log(result);

    /* Removing a route table */
    const result2 = await api.updateNetAccessPoint({
        updateNetAccessPointRequest: {
            netAccessPointId: "vpce-12345678",
            removeRouteTableIds: ["rtb-12345678"],
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
AddRouteTableIds [string] One or more IDs of route tables to associate with the specified Net access point.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetAccessPointId (required) string The ID of the Net access point.
RemoveRouteTableIds [string] One or more IDs of route tables to disassociate from the specified Net access point.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateNetAccessPointResponse

Example responses

# Adding a route table
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NetAccessPoint": {
    "Tags": [],
    "NetAccessPointId": "vpce-12345678",
    "RouteTableIds": [
      "rtb-12345678",
      "rtb-87654321"
    ],
    "State": "available",
    "NetId": "vpc-12345678",
    "ServiceName": "com.outscale.eu-west-2.oos"
  }
}
# Removing a route table
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NetAccessPoint": {
    "Tags": [],
    "NetAccessPointId": "vpce-12345678",
    "RouteTableIds": [],
    "State": "available",
    "NetId": "vpc-12345678",
    "ServiceName": "com.outscale.eu-west-2.oos"
  }
}

NetPeering

AcceptNetPeering

POST /AcceptNetPeering

Accepts a Net peering request.
To accept this request, you must be the owner of the peer Net. If you do not accept the request within 7 days, the state of the Net peering becomes expired.

[NOTE]
A peering connection between two Nets works both ways. Therefore, when an A-to-B peering connection is accepted, any pending B-to-A peering connection is automatically rejected as redundant.

Code samples

osc-cli api AcceptNetPeering --profile "default" \
  --NetPeeringId "pcx-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/AcceptNetPeering \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetPeeringId": "pcx-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.AcceptNetPeering(
    NetPeeringId="pcx-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetPeeringApi(config);

    const result = await api.acceptNetPeering({
        acceptNetPeeringRequest: {
            netPeeringId: "pcx-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetPeeringId (required) string The ID of the Net peering you want to accept.

Responses

Status Description Schema
200 The HTTP 200 response (OK). AcceptNetPeeringResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
409 The HTTP 409 response (Conflict). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NetPeering": {
    "Tags": [],
    "State": {
      "Name": "active",
      "Message": "Active"
    },
    "AccepterNet": {
      "NetId": "vpc-12345678",
      "IpRange": "172.16.0.0/16",
      "AccountId": "123456789012"
    },
    "ExpirationDate": "2063-04-05T00:00:00.000Z",
    "SourceNet": {
      "NetId": "vpc-12345678",
      "IpRange": "10.0.0.0/16",
      "AccountId": "123456789012"
    },
    "NetPeeringId": "pcx-12345678"
  }
}

CreateNetPeering

POST /CreateNetPeering

Requests a Net peering between a Net you own and a peer Net that belongs to you or another account.
This action creates a Net peering that remains in the pending-acceptance state until it is accepted by the owner of the peer Net. If the owner of the peer Net does not accept the request within 7 days, the state of the Net peering becomes expired. For more information, see AcceptNetPeering.

[IMPORTANT]

  • Peered Nets must contain at least one virtual machine (VM) each before the creation of the Net peering.
  • The two Nets must not have overlapping IP ranges. Otherwise, the Net peering is in the failed state.
  • A peering connection between two Nets works both ways. Therefore, you do not need to create a B-to-A connection if an A-to-B connection is created and accepted.

For more information, see About Net Peerings.

Code samples

osc-cli api CreateNetPeering --profile "default" \
  --SourceNetId "vpc-12345678" \
  --AccepterNetId "vpc-87654321"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNetPeering \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SourceNetId": "vpc-12345678",
    "AccepterNetId": "vpc-87654321"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateNetPeering(
    SourceNetId="vpc-12345678",
    AccepterNetId="vpc-87654321",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetPeeringApi(config);

    const result = await api.createNetPeering({
        createNetPeeringRequest: {
            sourceNetId: "vpc-12345678",
            accepterNetId: "vpc-87654321",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
AccepterNetId (required) string The ID of the Net you want to connect with.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
SourceNetId (required) string The ID of the Net you send the peering request from.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateNetPeeringResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NetPeering": {
    "Tags": [],
    "State": {
      "Name": "pending-acceptance",
      "Message": "Pending acceptance by 123456789012"
    },
    "AccepterNet": {
      "NetId": "vpc-12345678",
      "IpRange": "172.16.0.0/16",
      "AccountId": "123456789012"
    },
    "SourceNet": {
      "NetId": "vpc-12345678",
      "IpRange": "10.0.0.0/16",
      "AccountId": "123456789012"
    },
    "NetPeeringId": "pcx-12345678"
  }
}

DeleteNetPeering

POST /DeleteNetPeering

Deletes a Net peering.
If the Net peering is in the active state, it can be deleted either by the owner of the requester Net or the owner of the peer Net.
If it is in the pending-acceptance state, it can be deleted only by the owner of the requester Net.
If it is in the rejected, failed, or expired states, it cannot be deleted.

Code samples

osc-cli api DeleteNetPeering --profile "default" \
  --NetPeeringId "pcx-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteNetPeering \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetPeeringId": "pcx-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteNetPeering(
    NetPeeringId="pcx-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetPeeringApi(config);

    const result = await api.deleteNetPeering({
        deleteNetPeeringRequest: {
            netPeeringId: "pcx-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetPeeringId (required) string The ID of the Net peering you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteNetPeeringResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
409 The HTTP 409 response (Conflict). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadNetPeerings

POST /ReadNetPeerings

Lists one or more peering connections between two Nets.

Code samples

osc-cli api ReadNetPeerings --profile "default" \
  --Filters '{
      "NetPeeringIds": ["pcx-12345678"],
    }'
osc-cli api ReadNetPeerings --profile "default" \
  --Filters '{
      "SourceNetNetIds": ["vpc-12345678"],
      "StateNames": ["active", "pending-acceptance"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNetPeerings \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "NetPeeringIds": ["pcx-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNetPeerings \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "SourceNetNetIds": ["vpc-12345678"],
      "StateNames": ["active", "pending-acceptance"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadNetPeerings(
    Filters={
        "NetPeeringIds": ["pcx-12345678"],
    },
)
print(result)

result = gw.ReadNetPeerings(
    Filters={
        "SourceNetNetIds": ["vpc-12345678"],
        "StateNames": ["active","pending-acceptance"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetPeeringApi(config);

    const result = await api.readNetPeerings({
        readNetPeeringsRequest: {
            filters: {
                netPeeringIds: ["pcx-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readNetPeerings({
        readNetPeeringsRequest: {
            filters: {
                sourceNetNetIds: ["vpc-12345678"],
                stateNames: ["active", "pending-acceptance"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersNetPeering One or more filters.
» AccepterNetAccountIds [string] The account IDs of the owners of the peer Nets.
» AccepterNetIpRanges [string] The IP ranges of the peer Nets, in CIDR notation (for example, 10.0.0.0/24).
» AccepterNetNetIds [string] The IDs of the peer Nets.
» ExpirationDates [string] The dates and times at which the Net peerings expire, in ISO 8601 date-time format (for example, 2020-06-14T00:00:00.000Z).
» NetPeeringIds [string] The IDs of the Net peerings.
» SourceNetAccountIds [string] The account IDs of the owners of the peer Nets.
» SourceNetIpRanges [string] The IP ranges of the peer Nets.
» SourceNetNetIds [string] The IDs of the peer Nets.
» StateMessages [string] Additional information about the states of the Net peerings.
» StateNames [string] The states of the Net peerings (pending-acceptance | active | rejected | failed | expired | deleted).
» TagKeys [string] The keys of the tags associated with the Net peerings.
» TagValues [string] The values of the tags associated with the Net peerings.
» Tags [string] The key/value combination of the tags associated with the Net peerings, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadNetPeeringsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NetPeerings": [
    {
      "Tags": [],
      "State": {
        "Name": "active",
        "Message": "Active"
      },
      "AccepterNet": {
        "NetId": "vpc-12345678",
        "IpRange": "172.16.0.0/16",
        "AccountId": "123456789012"
      },
      "SourceNet": {
        "NetId": "vpc-12345678",
        "IpRange": "10.0.0.0/16",
        "AccountId": "123456789012"
      },
      "NetPeeringId": "pcx-12345678"
    }
  ]
}

RejectNetPeering

POST /RejectNetPeering

Rejects a Net peering request.
The Net peering must be in the pending-acceptance state to be rejected. The rejected Net peering is then in the rejected state.

Code samples

osc-cli api RejectNetPeering --profile "default" \
  --NetPeeringId "pcx-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/RejectNetPeering \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetPeeringId": "pcx-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.RejectNetPeering(
    NetPeeringId="pcx-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NetPeeringApi(config);

    const result = await api.rejectNetPeering({
        rejectNetPeeringRequest: {
            netPeeringId: "pcx-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetPeeringId (required) string The ID of the Net peering you want to reject.

Responses

Status Description Schema
200 The HTTP 200 response (OK). RejectNetPeeringResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
409 The HTTP 409 response (Conflict). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Nic

CreateNic

POST /CreateNic

Creates a network interface card (NIC) in the specified Subnet.

For more information, see About NICs.

Code samples

# Creating a NIC

osc-cli api CreateNic --profile "default" \
  --SubnetId "subnet-12345678" \
  --SecurityGroupIds '["sg-12345678"]'
# Creating a NIC with specific private IPs

osc-cli api CreateNic --profile "default" \
  --Description "Terraform nic with private IPs" \
  --SubnetId "subnet-12345678" \
  --SecurityGroupIds '["sg-12345678"]' \
  --PrivateIps '[
      {
        "IsPrimary": True,
        "PrivateIp": "10.0.0.4",
      },
      {
        "IsPrimary": False,
        "PrivateIp": "10.0.0.5",
      },
    ]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating a NIC

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SubnetId": "subnet-12345678",
    "SecurityGroupIds": ["sg-12345678"]
  }'
# Creating a NIC with specific private IPs

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Description": "Terraform nic with private IPs",
    "SubnetId": "subnet-12345678",
    "SecurityGroupIds": ["sg-12345678"],
    "PrivateIps": [
      {
        "IsPrimary": true,
        "PrivateIp": "10.0.0.4"
      },
      {
        "IsPrimary": false,
        "PrivateIp": "10.0.0.5"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating a NIC
result = gw.CreateNic(
    SubnetId="subnet-12345678",
    SecurityGroupIds=["sg-12345678"],
)
print(result)

# Creating a NIC with specific private IPs
result = gw.CreateNic(
    Description="Terraform nic with private IPs",
    SubnetId="subnet-12345678",
    SecurityGroupIds=["sg-12345678"],
    PrivateIps=[
        {
            "IsPrimary": True,
            "PrivateIp": "10.0.0.4",
        },
        {
            "IsPrimary": False,
            "PrivateIp": "10.0.0.5",
        },
    ],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NicApi(config);

    /* Creating a NIC */
    const result = await api.createNic({
        createNicRequest: {
            subnetId: "subnet-12345678",
            securityGroupIds: ["sg-12345678"],
        },
    });
    console.log(result);

    /* Creating a NIC with specific private IPs */
    const result2 = await api.createNic({
        createNicRequest: {
            description: "Terraform nic with private IPs",
            subnetId: "subnet-12345678",
            securityGroupIds: ["sg-12345678"],
            privateIps: [
                {
                    isPrimary: true,
                    privateIp: "10.0.0.4",
                },
                {
                    isPrimary: false,
                    privateIp: "10.0.0.5",
                },
            ],
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
Description string A description for the NIC.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
PrivateIps [PrivateIpLight] The primary private IP for the NIC.
This IP must be within the IP range of the Subnet that you specify with the SubnetId attribute.
If you do not specify this attribute, a random private IP is selected within the IP range of the Subnet.
» IsPrimary boolean If true, the IP is the primary private IP of the NIC.
» PrivateIp string The private IP of the NIC.
SecurityGroupIds [string] One or more IDs of security groups for the NIC.
SubnetId (required) string The ID of the Subnet in which you want to create the NIC.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateNicResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Creating a NIC
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Nic": {
    "SubregionName": "eu-west-2a",
    "SubnetId": "subnet-12345678",
    "State": "available",
    "IsSourceDestChecked": true,
    "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
    "Tags": [],
    "Description": "",
    "AccountId": "123456789012",
    "SecurityGroups": [
      {
        "SecurityGroupName": "security-group-example",
        "SecurityGroupId": "sg-12345678"
      }
    ],
    "MacAddress": "A1:B2:C3:D4:E5:F6",
    "NetId": "vpc-12345678",
    "NicId": "eni-12345678",
    "PrivateIps": [
      {
        "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
        "PrivateIp": "10.0.0.4",
        "IsPrimary": true
      }
    ]
  }
}
# Creating a NIC with specific private IPs
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Nic": {
    "SubregionName": "eu-west-2a",
    "SubnetId": "subnet-12345678",
    "State": "available",
    "IsSourceDestChecked": true,
    "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
    "Tags": [],
    "Description": "",
    "AccountId": "123456789012",
    "SecurityGroups": [
      {
        "SecurityGroupName": "security-group-example",
        "SecurityGroupId": "sg-12345678"
      }
    ],
    "MacAddress": "A1:B2:C3:D4:E5:F6",
    "NetId": "vpc-12345678",
    "NicId": "eni-12345678",
    "PrivateIps": [
      {
        "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
        "PrivateIp": "10.0.0.4",
        "IsPrimary": true
      },
      {
        "PrivateDnsName": "ip-10-0-0-5.eu-west-2.compute.internal",
        "PrivateIp": "10.0.0.5",
        "IsPrimary": false
      }
    ]
  }
}

DeleteNic

POST /DeleteNic

Deletes the specified network interface card (NIC).
The network interface must not be attached to any virtual machine (VM).

Code samples

osc-cli api DeleteNic --profile "default" \
  --NicId "eni-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NicId": "eni-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteNic(
    NicId="eni-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NicApi(config);

    const result = await api.deleteNic({
        deleteNicRequest: {
            nicId: "eni-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NicId (required) string The ID of the NIC you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteNicResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

LinkNic

POST /LinkNic

Attaches a network interface card (NIC) to a virtual machine (VM).
The interface and the VM must be in the same Subregion. The VM can be either running or stopped. The NIC must be in the available state. For more information, see Attaching a NIC to a VM.

Code samples

osc-cli api LinkNic --profile "default" \
  --NicId "eni-12345678" \
  --VmId "i-12345678" \
  --DeviceNumber 1

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NicId": "eni-12345678",
    "VmId": "i-12345678",
    "DeviceNumber": 1
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.LinkNic(
    NicId="eni-12345678",
    VmId="i-12345678",
    DeviceNumber=1,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NicApi(config);

    const result = await api.linkNic({
        linkNicRequest: {
            nicId: "eni-12345678",
            vmId: "i-12345678",
            deviceNumber: 1,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DeviceNumber (required) integer The index of the VM device for the NIC attachment (between 1 and 7, both included).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NicId (required) string The ID of the NIC you want to attach.
VmId (required) string The ID of the VM to which you want to attach the NIC.

Responses

Status Description Schema
200 The HTTP 200 response (OK). LinkNicResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LinkNicId": "eni-attach-12345678"
}

LinkPrivateIps

POST /LinkPrivateIps

Assigns one or more secondary private IPs to a specified network interface card (NIC). This action is only available in a Net. The private IPs to be assigned can be added individually using the PrivateIps parameter, or you can specify the number of private IPs to be automatically chosen within the Subnet range using the SecondaryPrivateIpCount parameter. You can specify only one of these two parameters. If none of these parameters are specified, a private IP is chosen within the Subnet range.

Code samples

# Linking specific secondary private IPs to a NIC

osc-cli api LinkPrivateIps --profile "default" \
  --NicId "eni-12345678" \
  --PrivateIps '["10.0.0.6", "10.0.0.7"]'
# Linking a number of random secondary private IPs to a NIC

osc-cli api LinkPrivateIps --profile "default" \
  --NicId "eni-12345678" \
  --SecondaryPrivateIpCount 3

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Linking specific secondary private IPs to a NIC

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkPrivateIps \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NicId": "eni-12345678",
    "PrivateIps": ["10.0.0.6", "10.0.0.7"]
  }'
# Linking a number of random secondary private IPs to a NIC

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkPrivateIps \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NicId": "eni-12345678",
    "SecondaryPrivateIpCount": 3
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Linking specific secondary private IPs to a NIC
result = gw.LinkPrivateIps(
    NicId="eni-12345678",
    PrivateIps=["10.0.0.6","10.0.0.7"],
)
print(result)

# Linking a number of random secondary private IPs to a NIC
result = gw.LinkPrivateIps(
    NicId="eni-12345678",
    SecondaryPrivateIpCount=3,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NicApi(config);

    /* Linking specific secondary private IPs to a NIC */
    const result = await api.linkPrivateIps({
        linkPrivateIpsRequest: {
            nicId: "eni-12345678",
            privateIps: ["10.0.0.6", "10.0.0.7"],
        },
    });
    console.log(result);

    /* Linking a number of random secondary private IPs to a NIC */
    const result2 = await api.linkPrivateIps({
        linkPrivateIpsRequest: {
            nicId: "eni-12345678",
            secondaryPrivateIpCount: 3,
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
AllowRelink boolean If true, allows an IP that is already assigned to another NIC in the same Subnet to be assigned to the NIC you specified.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NicId (required) string The ID of the NIC.
PrivateIps [string] The secondary private IP or IPs you want to assign to the NIC within the IP range of the Subnet.
SecondaryPrivateIpCount integer The number of secondary private IPs to assign to the NIC.

Responses

Status Description Schema
200 The HTTP 200 response (OK). LinkPrivateIpsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadNics

POST /ReadNics

Lists one or more network interface cards (NICs).
A NIC is a virtual network interface that you can attach to a virtual machine (VM) in a Net.

Code samples

osc-cli api ReadNics --profile "default" \
  --Filters '{
      "NicIds": ["eni-12345678"],
    }'
osc-cli api ReadNics --profile "default" \
  --Filters '{
      "LinkNicVmIds": ["i-12345678"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNics \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "NicIds": ["eni-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNics \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "LinkNicVmIds": ["i-12345678"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadNics(
    Filters={
        "NicIds": ["eni-12345678"],
    },
)
print(result)

result = gw.ReadNics(
    Filters={
        "LinkNicVmIds": ["i-12345678"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NicApi(config);

    const result = await api.readNics({
        readNicsRequest: {
            filters: {
                nicIds: ["eni-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readNics({
        readNicsRequest: {
            filters: {
                linkNicVmIds: ["i-12345678"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersNic One or more filters.
» Descriptions [string] The descriptions of the NICs.
» IsSourceDestCheck boolean Whether the source/destination checking is enabled (true) or disabled (false).
» LinkNicDeleteOnVmDeletion boolean Whether the NICs are deleted when the VMs they are attached to are terminated.
» LinkNicDeviceNumbers [integer] The device numbers the NICs are attached to.
» LinkNicLinkNicIds [string] The attachment IDs of the NICs.
» LinkNicStates [string] The states of the attachments.
» LinkNicVmAccountIds [string] The account IDs of the owners of the VMs the NICs are attached to.
» LinkNicVmIds [string] The IDs of the VMs the NICs are attached to.
» LinkPublicIpAccountIds [string] The account IDs of the owners of the public IPs associated with the NICs.
» LinkPublicIpLinkPublicIpIds [string] The association IDs returned when the public IPs were associated with the NICs.
» LinkPublicIpPublicIpIds [string] The allocation IDs returned when the public IPs were allocated to their accounts.
» LinkPublicIpPublicIps [string] The public IPs associated with the NICs.
» MacAddresses [string] The Media Access Control (MAC) addresses of the NICs.
» NetIds [string] The IDs of the Nets where the NICs are located.
» NicIds [string] The IDs of the NICs.
» PrivateDnsNames [string] The private DNS names associated with the primary private IPs.
» PrivateIpsLinkPublicIpAccountIds [string] The account IDs of the owner of the public IPs associated with the private IPs.
» PrivateIpsLinkPublicIpPublicIps [string] The public IPs associated with the private IPs.
» PrivateIpsPrimaryIp boolean Whether the private IP is the primary IP associated with the NIC.
» PrivateIpsPrivateIps [string] The private IPs of the NICs.
» SecurityGroupIds [string] The IDs of the security groups associated with the NICs.
» SecurityGroupNames [string] The names of the security groups associated with the NICs.
» States [string] The states of the NICs.
» SubnetIds [string] The IDs of the Subnets for the NICs.
» SubregionNames [string] The Subregions where the NICs are located.
» TagKeys [string] The keys of the tags associated with the NICs.
» TagValues [string] The values of the tags associated with the NICs.
» Tags [string] The key/value combination of the tags associated with the NICs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadNicsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Nics": [
    {
      "SubregionName": "eu-west-2a",
      "SubnetId": "subnet-12345678",
      "State": "in-use",
      "LinkNic": {
        "VmId": "i-12345678",
        "LinkNicId": "eni-attach-12345678",
        "VmAccountId": "123456789012",
        "DeleteOnVmDeletion": false,
        "DeviceNumber": 0,
        "State": "attached"
      },
      "IsSourceDestChecked": true,
      "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
      "Tags": [],
      "Description": "Primary network interface",
      "AccountId": "123456789012",
      "SecurityGroups": [
        {
          "SecurityGroupName": "security-group-example",
          "SecurityGroupId": "sg-12345678"
        }
      ],
      "MacAddress": "A1:B2:C3:D4:E5:F6",
      "NetId": "vpc-12345678",
      "NicId": "eni-12345678",
      "PrivateIps": [
        {
          "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
          "PrivateIp": "10.0.0.4",
          "IsPrimary": true
        }
      ]
    }
  ]
}

UnlinkNic

POST /UnlinkNic

Detaches a network interface card (NIC) from a virtual machine (VM).
The primary NIC cannot be detached.

Code samples

osc-cli api UnlinkNic --profile "default" \
  --LinkNicId "eni-attach-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LinkNicId": "eni-attach-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UnlinkNic(
    LinkNicId="eni-attach-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NicApi(config);

    const result = await api.unlinkNic({
        unlinkNicRequest: {
            linkNicId: "eni-attach-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LinkNicId (required) string The ID of the attachment operation.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UnlinkNicResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UnlinkPrivateIps

POST /UnlinkPrivateIps

Unassigns one or more secondary private IPs from a network interface card (NIC).

Code samples

osc-cli api UnlinkPrivateIps --profile "default" \
  --NicId "eni-12345678" \
  --PrivateIps '["10.0.0.6", "10.0.0.7"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkPrivateIps \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NicId": "eni-12345678",
    "PrivateIps": ["10.0.0.6", "10.0.0.7"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UnlinkPrivateIps(
    NicId="eni-12345678",
    PrivateIps=["10.0.0.6","10.0.0.7"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NicApi(config);

    const result = await api.unlinkPrivateIps({
        unlinkPrivateIpsRequest: {
            nicId: "eni-12345678",
            privateIps: ["10.0.0.6", "10.0.0.7"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NicId (required) string The ID of the NIC.
PrivateIps (required) [string] One or more secondary private IPs you want to unassign from the NIC.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UnlinkPrivateIpsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateNic

POST /UpdateNic

Modifies the specified network interface card (NIC). You can specify only one attribute at a time.

Code samples

# Modifying the DeleteOnVmDeletion value of a NIC

osc-cli api UpdateNic --profile "default" \
  --NicId "eni-12345678" \
  --LinkNic '{
      "DeleteOnVmDeletion": False,
      "LinkNicId": "eni-attach-12345678",
    }'
# Modifying the security groups of a NIC

osc-cli api UpdateNic --profile "default" \
  --NicId "eni-12345678" \
  --SecurityGroupIds '["sg-12345678"]'
# Modifying the description of a NIC

osc-cli api UpdateNic --profile "default" \
  --NicId "eni-12345678" \
  --Description "Example of description"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Modifying the DeleteOnVmDeletion value of a NIC

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NicId": "eni-12345678",
    "LinkNic": {
      "DeleteOnVmDeletion": false,
      "LinkNicId": "eni-attach-12345678"
    }
  }'
# Modifying the security groups of a NIC

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NicId": "eni-12345678",
    "SecurityGroupIds": ["sg-12345678"]
  }'
# Modifying the description of a NIC

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NicId": "eni-12345678",
    "Description": "Example of description"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Modifying the DeleteOnVmDeletion value of a NIC
result = gw.UpdateNic(
    NicId="eni-12345678",
    LinkNic={
        "DeleteOnVmDeletion": False,
        "LinkNicId": "eni-attach-12345678",
    },
)
print(result)

# Modifying the security groups of a NIC
result = gw.UpdateNic(
    NicId="eni-12345678",
    SecurityGroupIds=["sg-12345678"],
)
print(result)

# Modifying the description of a NIC
result = gw.UpdateNic(
    NicId="eni-12345678",
    Description="Example of description",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.NicApi(config);

    /* Modifying the DeleteOnVmDeletion value of a NIC */
    const result = await api.updateNic({
        updateNicRequest: {
            nicId: "eni-12345678",
            linkNic: {
                deleteOnVmDeletion: false,
                linkNicId: "eni-attach-12345678",
            },
        },
    });
    console.log(result);

    /* Modifying the security groups of a NIC */
    const result2 = await api.updateNic({
        updateNicRequest: {
            nicId: "eni-12345678",
            securityGroupIds: ["sg-12345678"],
        },
    });
    console.log(result2);

    /* Modifying the description of a NIC */
    const result3 = await api.updateNic({
        updateNicRequest: {
            nicId: "eni-12345678",
            description: "Example of description",
        },
    });
    console.log(result3);

}

main();

Available Parameters

Name Type Description
Description string A new description for the NIC.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LinkNic LinkNicToUpdate Information about the NIC attachment. If you are modifying the DeleteOnVmDeletion attribute, you must specify the ID of the NIC attachment.
» DeleteOnVmDeletion boolean If true, the NIC is deleted when the VM is terminated. If false, the NIC is detached from the VM.
» LinkNicId string The ID of the NIC attachment.
NicId (required) string The ID of the NIC you want to modify.
SecurityGroupIds [string] One or more IDs of security groups for the NIC.
You must specify at least one group, even if you use the default security group in the Net.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateNicResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Modifying the DeleteOnVmDeletion value of a NIC
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Nic": {
    "SubregionName": "eu-west-2a",
    "SubnetId": "subnet-12345678",
    "State": "in-use",
    "LinkNic": {
      "VmId": "i-12345678",
      "LinkNicId": "eni-attach-12345678",
      "VmAccountId": "123456789012",
      "DeleteOnVmDeletion": false,
      "DeviceNumber": 0,
      "State": "attached"
    },
    "IsSourceDestChecked": true,
    "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
    "Tags": [],
    "Description": "Primary network interface",
    "AccountId": "123456789012",
    "SecurityGroups": [
      {
        "SecurityGroupName": "default",
        "SecurityGroupId": "sg-12345678"
      }
    ],
    "MacAddress": "A1:B2:C3:D4:E5:F6",
    "NetId": "vpc-12345678",
    "NicId": "eni-12345678",
    "PrivateIps": [
      {
        "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
        "PrivateIp": "10.0.0.4",
        "IsPrimary": true
      }
    ]
  }
}
# Modifying the security groups of a NIC
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Nic": {
    "SubregionName": "eu-west-2a",
    "SubnetId": "subnet-12345678",
    "State": "in-use",
    "LinkNic": {
      "VmId": "i-12345678",
      "LinkNicId": "eni-attach-12345678",
      "VmAccountId": "123456789012",
      "DeleteOnVmDeletion": true,
      "DeviceNumber": 0,
      "State": "attached"
    },
    "IsSourceDestChecked": true,
    "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
    "Tags": [],
    "Description": "Primary network interface",
    "AccountId": "123456789012",
    "SecurityGroups": [
      {
        "SecurityGroupName": "security-group-example",
        "SecurityGroupId": "sg-12345678"
      }
    ],
    "MacAddress": "A1:B2:C3:D4:E5:F6",
    "NetId": "vpc-12345678",
    "NicId": "eni-12345678",
    "PrivateIps": [
      {
        "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
        "PrivateIp": "10.0.0.4",
        "IsPrimary": true
      }
    ]
  }
}
# Modifying the description of a NIC
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Nic": {
    "SubregionName": "eu-west-2a",
    "SubnetId": "subnet-12345678",
    "State": "in-use",
    "LinkNic": {
      "VmId": "i-12345678",
      "LinkNicId": "eni-attach-12345678",
      "VmAccountId": "123456789012",
      "DeleteOnVmDeletion": true,
      "DeviceNumber": 0,
      "State": "attached"
    },
    "IsSourceDestChecked": true,
    "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
    "Tags": [],
    "Description": "Example of description",
    "AccountId": "123456789012",
    "SecurityGroups": [
      {
        "SecurityGroupName": "default",
        "SecurityGroupId": "sg-12345678"
      }
    ],
    "MacAddress": "A1:B2:C3:D4:E5:F6",
    "NetId": "vpc-12345678",
    "NicId": "eni-12345678",
    "PrivateIps": [
      {
        "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
        "PrivateIp": "10.0.0.4",
        "IsPrimary": true
      }
    ]
  }
}

Policy

CreatePolicy

POST /CreatePolicy

Creates a managed policy to apply to a user.
This action creates a policy version and sets v1 as the default one.

Code samples

osc-cli api CreatePolicy --profile "default" \
  --Description "Example of description" \
  --Document '"{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}"' \
  --Path "/example/" \
  --PolicyName "example-user-policy"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreatePolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Description": "Example of description",
    "Document": "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}",
    "Path": "/example/",
    "PolicyName": "example-user-policy"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreatePolicy(
    Description="Example of description",
    Document='{"Statement": [ {"Effect": "Allow", "Action": ["*"], "Resource": ["*"]} ]}',
    Path="/example/",
    PolicyName="example-user-policy",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.createPolicy({
        createPolicyRequest: {
            description: "Example of description",
            document: '{"Statement": [ {"Effect": "Allow", "Action": ["*"], "Resource": ["*"]} ]}',
            path: "/example/",
            policyName: "example-user-policy",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
Description string A description for the policy.
Document (required) string The policy document, corresponding to a JSON string that contains the policy. For more information, see EIM Reference Information.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Path string The path of the policy.
PolicyName (required) string The name of the policy.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreatePolicyResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Policy": {
    "ResourcesCount": 0,
    "PolicyName": "example-user-policy",
    "PolicyDefaultVersionId": "v1",
    "Path": "/example/",
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "Description": "Example of description",
    "PolicyId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ01234",
    "Orn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
    "IsLinkable": true,
    "LastModificationDate": "2010-10-01T12:34:56.789+0000"
  }
}

CreatePolicyVersion

POST /CreatePolicyVersion

Creates a version of a specified managed policy.
A managed policy can have up to five versions.

Code samples

osc-cli api CreatePolicyVersion --profile "default" \
  --Document '"{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}"' \
  --PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy" \
  --SetAsDefault True

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreatePolicyVersion \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Document": "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}",
    "PolicyOrn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
    "SetAsDefault": true
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreatePolicyVersion(
    Document='{"Statement": [ {"Effect": "Allow", "Action": ["*"], "Resource": ["*"]} ]}',
    PolicyOrn="orn:ows:idauth::012345678910:policy/example/example-user-policy",
    SetAsDefault=True,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.createPolicyVersion({
        createPolicyVersionRequest: {
            document: '{"Statement": [ {"Effect": "Allow", "Action": ["*"], "Resource": ["*"]} ]}',
            policyOrn: "orn:ows:idauth::012345678910:policy/example/example-user-policy",
            setAsDefault: true,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
Document (required) string The policy document, corresponding to a JSON string that contains the policy. For more information, see EIM Reference Information.
PolicyOrn (required) string The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
SetAsDefault boolean If set to true, the new policy version is set as the default version and becomes the operative one.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreatePolicyVersionResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "PolicyVersion": {
    "VersionId": "v2",
    "DefaultVersion": true,
    "CreationDate": "2017-05-10T12:34:56.789+0000",
    "Body": "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}"
  }
}

DeletePolicy

POST /DeletePolicy

Deletes a managed policy.
Before deleting a managed policy, you must unlink all users linked to it and delete all the versions of the policy using the DeletePolicyVersion method.

Code samples

osc-cli api DeletePolicy --profile "default" \
  --PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeletePolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PolicyOrn": "orn:ows:idauth::012345678910:policy/example/example-user-policy"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeletePolicy(
    PolicyOrn="orn:ows:idauth::012345678910:policy/example/example-user-policy",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.deletePolicy({
        deletePolicyRequest: {
            policyOrn: "orn:ows:idauth::012345678910:policy/example/example-user-policy",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
PolicyOrn (required) string The OUTSCALE Resource Name (ORN) of the policy you want to delete. For more information, see Resource Identifiers.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeletePolicyResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeletePolicyVersion

POST /DeletePolicyVersion

Deletes a specified version of a managed policy, if it is not set as the default one.

Code samples

osc-cli api DeletePolicyVersion --profile "default" \
  --PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy" \
  --VersionId "v1"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeletePolicyVersion \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PolicyOrn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
    "VersionId": "v1"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeletePolicyVersion(
    PolicyOrn="orn:ows:idauth::012345678910:policy/example/example-user-policy",
    VersionId="v1",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.deletePolicyVersion({
        deletePolicyVersionRequest: {
            policyOrn: "orn:ows:idauth::012345678910:policy/example/example-user-policy",
            versionId: "v1",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
PolicyOrn (required) string The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
VersionId (required) string The ID of the version of the policy you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeletePolicyVersionResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

LinkPolicy

POST /LinkPolicy

Links a managed policy to a specific user.

Code samples

osc-cli api LinkPolicy --profile "default" \
  --PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy" \
  --UserName "example-user"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PolicyOrn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
    "UserName": "example-user"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.LinkPolicy(
    PolicyOrn="orn:ows:idauth::012345678910:policy/example/example-user-policy",
    UserName="example-user",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.linkPolicy({
        linkPolicyRequest: {
            policyOrn: "orn:ows:idauth::012345678910:policy/example/example-user-policy",
            userName: "example-user",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
PolicyOrn (required) string The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
UserName (required) string The name of the user you want to link the policy to (between 1 and 64 characters).

Responses

Status Description Schema
200 The HTTP 200 response (OK). LinkPolicyResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadLinkedPolicies

POST /ReadLinkedPolicies

Lists the managed policies linked to a specified user.

Code samples

osc-cli api ReadLinkedPolicies --profile "default" \
  --Filters '{
      "PathPrefix": "/example/",
    }' \
  --FirstItem 1 \
  --ResultsPerPage 30 \
  --UserName "example-user"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadLinkedPolicies \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "PathPrefix": "/example/"
    },
    "FirstItem": 1,
    "ResultsPerPage": 30,
    "UserName": "example-user"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadLinkedPolicies(
    Filters={
        "PathPrefix": "/example/",
    },
    FirstItem=1,
    ResultsPerPage=30,
    UserName="example-user",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.readLinkedPolicies({
        readLinkedPoliciesRequest: {
            filters: {
                pathPrefix: "/example/",
            },
            firstItem: 1,
            resultsPerPage: 30,
            userName: "example-user",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters ReadLinkedPoliciesFilters One or more filters.
» PathPrefix string The path prefix of the policies, set to a slash (/) by default.
FirstItem integer The item starting the list of policies requested.
ResultsPerPage integer The maximum number of items that can be returned in a single response (by default, 100).
UserName string The name of the user the policies are linked to.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadLinkedPoliciesResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "HasMoreItems": true,
  "Policies": [
    {
      "PolicyName": "example-user-policy",
      "CreationDate": "2010-10-01T12:34:56.789+0000",
      "LastModificationDate": "2010-10-01T12:34:56.789+0000",
      "Orn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
      "PolicyId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ01234"
    }
  ],
  "MaxResultsLimit": 30,
  "MaxResultsTruncated": false
}

ReadPolicies

POST /ReadPolicies

Lists all the managed policies available for your account.

Code samples

osc-cli api ReadPolicies --profile "default" \
  --Filters '{
      "OnlyLinked": True,
      "PathPrefix": "/",
      "Scope": "OWS",
    }' \
  --FirstItem 1 \
  --ResultsPerPage 30

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadPolicies \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "OnlyLinked": true,
      "PathPrefix": "/",
      "Scope": "OWS"
    },
    "FirstItem": 1,
    "ResultsPerPage": 30
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadPolicies(
    Filters={
        "OnlyLinked": True,
        "PathPrefix": "/",
        "Scope": "OWS",
    },
    FirstItem=1,
    ResultsPerPage=30,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.readPolicies({
        readPoliciesRequest: {
            filters: {
                onlyLinked: true,
                pathPrefix: "/",
                scope: "OWS",
            },
            firstItem: 1,
            resultsPerPage: 30,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters ReadPoliciesFilters One or more filters.
» OnlyLinked boolean If set to true, lists only the policies attached to a user.
» PathPrefix string The path prefix you can use to filter the results, set to a slash (/) by default.
» Scope string The scope to filter policies (OWS | LOCAL).
FirstItem integer The item starting the list of policies requested.
ResultsPerPage integer The maximum number of items that can be returned in a single response (by default, 100).

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadPoliciesResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "HasMoreItems": true,
  "Policies": [
    {
      "ResourcesCount": 1,
      "PolicyName": "example-user-policy",
      "PolicyDefaultVersionId": "v1",
      "Path": "/example/",
      "CreationDate": "2010-10-01T12:34:56.789+0000",
      "Description": "Example of description",
      "PolicyId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ01234",
      "Orn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
      "IsLinkable": true,
      "LastModificationDate": "2010-10-01T12:34:56.789+0000"
    }
  ],
  "MaxResultsLimit": 30,
  "MaxResultsTruncated": false
}

ReadPolicy

POST /ReadPolicy

Lists information about a specified managed policy.

Code samples

osc-cli api ReadPolicy --profile "default" \
  --PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PolicyOrn": "orn:ows:idauth::012345678910:policy/example/example-user-policy"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadPolicy(
    PolicyOrn="orn:ows:idauth::012345678910:policy/example/example-user-policy",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.readPolicy({
        readPolicyRequest: {
            policyOrn: "orn:ows:idauth::012345678910:policy/example/example-user-policy",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
PolicyOrn (required) string The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadPolicyResponse

Example responses

{
  "Policy": {
    "ResourcesCount": 0,
    "PolicyName": "example-user-policy",
    "PolicyDefaultVersionId": "v1",
    "Path": "/example/",
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "Description": "Example of description",
    "PolicyId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ01234",
    "Orn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
    "IsLinkable": true,
    "LastModificationDate": "2010-10-01T12:34:56.789+0000"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadPolicyVersion

POST /ReadPolicyVersion

Lists information about a specified version of a managed policy.

Code samples

osc-cli api ReadPolicyVersion --profile "default" \
  --PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy" \
  --VersionId "v1"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadPolicyVersion \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PolicyOrn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
    "VersionId": "v1"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadPolicyVersion(
    PolicyOrn="orn:ows:idauth::012345678910:policy/example/example-user-policy",
    VersionId="v1",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.readPolicyVersion({
        readPolicyVersionRequest: {
            policyOrn: "orn:ows:idauth::012345678910:policy/example/example-user-policy",
            versionId: "v1",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
PolicyOrn (required) string The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
VersionId (required) string The ID of the policy version.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadPolicyVersionResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "PolicyVersion": {
    "VersionId": "v1",
    "DefaultVersion": true,
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "Body": "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}"
  }
}

ReadPolicyVersions

POST /ReadPolicyVersions

Lists information about all the policy versions of a specified managed policy.

Code samples

osc-cli api ReadPolicyVersions --profile "default" \
  --FirstItem 1 \
  --PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy" \
  --ResultsPerPage 30

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadPolicyVersions \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "FirstItem": 1,
    "PolicyOrn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
    "ResultsPerPage": 30
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadPolicyVersions(
    FirstItem=1,
    PolicyOrn="orn:ows:idauth::012345678910:policy/example/example-user-policy",
    ResultsPerPage=30,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.readPolicyVersions({
        readPolicyVersionsRequest: {
            firstItem: 1,
            policyOrn: "orn:ows:idauth::012345678910:policy/example/example-user-policy",
            resultsPerPage: 30,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
FirstItem integer The item starting the list of policies requested.
PolicyOrn (required) string The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
ResultsPerPage integer The maximum number of items that can be returned in a single response (by default, 100).

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadPolicyVersionsResponse

Example responses

{
  "MaxResultsLimit": 30,
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "PolicyVersions": [
    {
      "VersionId": "v1",
      "DefaultVersion": true,
      "CreationDate": "2010-10-01T12:34:56.789+0000",
      "Body": "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}"
    }
  ],
  "HasMoreItems": true
}

SetDefaultPolicyVersion

POST /SetDefaultPolicyVersion

Sets a specified version of a managed policy as the default (operative) one.
You can modify the default version of a policy at any time.

Code samples

osc-cli api SetDefaultPolicyVersion --profile "default" \
  --PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy" \
  --VersionId "v1"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/SetDefaultPolicyVersion \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PolicyOrn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
    "VersionId": "v1"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.SetDefaultPolicyVersion(
    PolicyOrn="orn:ows:idauth::012345678910:policy/example/example-user-policy",
    VersionId="v1",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.setDefaultPolicyVersion({
        setDefaultPolicyVersionRequest: {
            policyOrn: "orn:ows:idauth::012345678910:policy/example/example-user-policy",
            versionId: "v1",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
PolicyOrn (required) string The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
VersionId (required) string The ID of the version.

Responses

Status Description Schema
200 The HTTP 200 response (OK). SetDefaultPolicyVersionResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UnlinkPolicy

POST /UnlinkPolicy

Removes a managed policy from a specific user.

Code samples

osc-cli api UnlinkPolicy --profile "default" \
  --PolicyOrn "orn:ows:idauth::012345678910:policy/example/example-user-policy" \
  --UserName "example-user"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PolicyOrn": "orn:ows:idauth::012345678910:policy/example/example-user-policy",
    "UserName": "example-user"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UnlinkPolicy(
    PolicyOrn="orn:ows:idauth::012345678910:policy/example/example-user-policy",
    UserName="example-user",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PolicyApi(config);

    const result = await api.unlinkPolicy({
        unlinkPolicyRequest: {
            policyOrn: "orn:ows:idauth::012345678910:policy/example/example-user-policy",
            userName: "example-user",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
PolicyOrn (required) string The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
UserName (required) string The name of the user you want to detach the policy from.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UnlinkPolicyResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ProductType

CreateProductType

POST /CreateProductType

Creates a product type you can associate with an OMI for consumption monitoring and billing purposes.

Code samples

osc-cli api CreateProductType --profile "default" \
  --Vendor "vendor-name" \
  --Description "Example of description"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateProductType \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Vendor": "vendor-name",
    "Description": "Example of description"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateProductType(
    Vendor="vendor-name",
    Description="Example of description",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ProductTypeApi(config);

    const result = await api.createProductType({
        createProductTypeRequest: {
            vendor: "vendor-name",
            description: "Example of description",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
Description (required) string The description of the product type.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Vendor string The vendor of the product type.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateProductTypeResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ProductType": {
    "Vendor": "vendor-name",
    "ProductTypeId": "pty-12345678",
    "Description": "Example of description"
  }
}

ReadProductTypes

POST /ReadProductTypes

Lists one or more product types.

Code samples

osc-cli api ReadProductTypes --profile "default" \
  --Filters '{
      "ProductTypeIds": ["0001"],
    }'

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadProductTypes \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ProductTypeIds": ["0001"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadProductTypes(
    Filters={
        "ProductTypeIds": ["0001"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
    });
    const api = new osc.ProductTypeApi(config);

    const result = await api.readProductTypes({
        readProductTypesRequest: {
            filters: {
                productTypeIds: ["0001"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersProductType One or more filters.
» ProductTypeIds [string] The IDs of the product types.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadProductTypesResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ProductTypes": [
    {
      "ProductTypeId": "0001",
      "Description": "Linux"
    }
  ]
}

PublicCatalog

ReadPublicCatalog

POST /ReadPublicCatalog

Returns the price list of OUTSCALE products and services for the Region specified in the endpoint of the request. For more information, see Regions, Endpoints, and Subregions Reference.

Code samples

osc-cli api ReadPublicCatalog --profile "default"

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadPublicCatalog \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadPublicCatalog()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
    });
    const api = new osc.PublicCatalogApi(config);

    const result = await api.readPublicCatalog({
        readPublicCatalogRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadPublicCatalogResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Catalog": {
    "Entries": [
      {
        "UnitPrice": 0.04,
        "Type": "CustomCore:v5-p1",
        "Title": "Instance - On demand - Unite de vCore pour une instance Tina v5 CxRy Performance highest - par heure",
        "SubregionName": "eu-west-2",
        "Category": "compute",
        "Service": "TinaOS-FCU",
        "Operation": "RunInstances-OD"
      }
    ]
  }
}

PublicIp

CreatePublicIp

POST /CreatePublicIp

Acquires a public IP for your account.
A public IP is a static IP designed for dynamic Cloud computing. It can be associated with a virtual machine (VM) in the public Cloud or in a Net, a network interface card (NIC), a NAT service.

For more information, see About Public IPs.

Code samples

osc-cli api CreatePublicIp --profile "default"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreatePublicIp \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreatePublicIp()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PublicIpApi(config);

    const result = await api.createPublicIp({
        createPublicIpRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreatePublicIpResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "PublicIp": {
    "Tags": [],
    "PublicIpId": "eipalloc-12345678",
    "PublicIp": "192.0.2.0"
  }
}

DeletePublicIp

POST /DeletePublicIp

Releases a public IP.
You can release a public IP associated with your account. This address is released in the public IP pool and can be used by someone else. Before releasing a public IP, ensure you updated all your resources communicating with this address.

Code samples

osc-cli api DeletePublicIp --profile "default" \
  --PublicIp "192.0.2.0"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeletePublicIp \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PublicIp": "192.0.2.0"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeletePublicIp(
    PublicIp="192.0.2.0",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PublicIpApi(config);

    const result = await api.deletePublicIp({
        deletePublicIpRequest: {
            publicIp: "192.0.2.0",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
PublicIp string The public IP. In the public Cloud, this parameter is required.
PublicIpId string The ID representing the association of the public IP with the VM or the NIC. In a Net, this parameter is required.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeletePublicIpResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

LinkPublicIp

POST /LinkPublicIp

Associates a public IP with a virtual machine (VM) or a network interface card (NIC), in the public Cloud or in a Net. You can associate a public IP with only one VM or network interface at a time.
To associate a public IP in a Net, ensure that the Net has an Internet service attached. For more information, see the LinkInternetService method.
By default, the public IP is disassociated every time you stop and start the VM. For a persistent association, you can add the osc.fcu.eip.auto-attach tag to the VM with the public IP as value. For more information, see the CreateTags method.

[IMPORTANT]
You can associate a public IP with a network address translation (NAT) service only when creating the NAT service. To modify its public IP, you need to delete the NAT service and re-create it with the new public IP. For more information, see the CreateNatService method.

Code samples

# Linking a public IP to a VM

osc-cli api LinkPublicIp --profile "default" \
  --PublicIp "192.0.2.0" \
  --VmId "i-12345678"
# Linking a public IP to a NIC

osc-cli api LinkPublicIp --profile "default" \
  --PublicIp "192.0.2.0" \
  --NicId "eni-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Linking a public IP to a VM

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkPublicIp \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PublicIp": "192.0.2.0",
    "VmId": "i-12345678"
  }'
# Linking a public IP to a NIC

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkPublicIp \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PublicIp": "192.0.2.0",
    "NicId": "eni-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Linking a public IP to a VM
result = gw.LinkPublicIp(
    PublicIp="192.0.2.0",
    VmId="i-12345678",
)
print(result)

# Linking a public IP to a NIC
result = gw.LinkPublicIp(
    PublicIp="192.0.2.0",
    NicId="eni-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PublicIpApi(config);

    /* Linking a public IP to a VM */
    const result = await api.linkPublicIp({
        linkPublicIpRequest: {
            publicIp: "192.0.2.0",
            vmId: "i-12345678",
        },
    });
    console.log(result);

    /* Linking a public IP to a NIC */
    const result2 = await api.linkPublicIp({
        linkPublicIpRequest: {
            publicIp: "192.0.2.0",
            nicId: "eni-12345678",
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
AllowRelink boolean If true, allows the public IP to be associated with the VM or NIC that you specify even if it is already associated with another VM or NIC. If false, prevents the public IP from being associated with the VM or NIC that you specify if it is already associated with another VM or NIC. (By default, true in the public Cloud, false in a Net.)
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NicId string (Net only) The ID of the NIC. This parameter is required if the VM has more than one NIC attached. Otherwise, you need to specify the VmId parameter instead. You cannot specify both parameters at the same time.
PrivateIp string (Net only) The primary or secondary private IP of the specified NIC. By default, the primary private IP.
PublicIp string The public IP. This parameter is required unless you use the PublicIpId parameter.
PublicIpId string The allocation ID of the public IP. This parameter is required unless you use the PublicIp parameter.
VmId string The ID of the VM.
- In the public Cloud, this parameter is required.
- In a Net, this parameter is required if the VM has only one NIC. Otherwise, you need to specify the NicId parameter instead. You cannot specify both parameters at the same time.

Responses

Status Description Schema
200 The HTTP 200 response (OK). LinkPublicIpResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Linking a public IP to a VM
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LinkPublicIpId": "eipassoc-12345678"
}
# Linking a public IP to a NIC
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LinkPublicIpId": "eipassoc-12345678"
}

ReadPublicIpRanges

POST /ReadPublicIpRanges

Gets the public IPv4 addresses in CIDR notation for the Region specified in the endpoint of the request. For more information, see Regions, Endpoints, and Subregions Reference.

Code samples

osc-cli api ReadPublicIpRanges --profile "default"

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadPublicIpRanges \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadPublicIpRanges()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
    });
    const api = new osc.PublicIpApi(config);

    const result = await api.readPublicIpRanges({
        readPublicIpRangesRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadPublicIpRangesResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "PublicIps": [
    "198.51.100.0/24",
    "203.0.113.0/24"
  ]
}

ReadPublicIps

POST /ReadPublicIps

Lists one or more public IPs allocated to your account.
By default, this action returns information about all your public IPs: available or associated with a virtual machine (VM), a network interface card (NIC) or a NAT service.

Code samples

osc-cli api ReadPublicIps --profile "default" \
  --Filters '{
      "PublicIps": ["192.0.2.0"],
    }'
osc-cli api ReadPublicIps --profile "default" \
  --Filters '{
      "VmIds": ["i-12345678"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadPublicIps \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "PublicIps": ["192.0.2.0"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadPublicIps \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "VmIds": ["i-12345678"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadPublicIps(
    Filters={
        "PublicIps": ["192.0.2.0"],
    },
)
print(result)

result = gw.ReadPublicIps(
    Filters={
        "VmIds": ["i-12345678"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PublicIpApi(config);

    const result = await api.readPublicIps({
        readPublicIpsRequest: {
            filters: {
                publicIps: ["192.0.2.0"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readPublicIps({
        readPublicIpsRequest: {
            filters: {
                vmIds: ["i-12345678"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersPublicIp One or more filters.
» LinkPublicIpIds [string] The IDs representing the associations of public IPs with VMs or NICs.
» NicAccountIds [string] The account IDs of the owners of the NICs.
» NicIds [string] The IDs of the NICs.
» Placements [string] Whether the public IPs are for use in the public Cloud or in a Net.
» PrivateIps [string] The private IPs associated with the public IPs.
» PublicIpIds [string] The IDs of the public IPs.
» PublicIps [string] The public IPs.
» TagKeys [string] The keys of the tags associated with the public IPs.
» TagValues [string] The values of the tags associated with the public IPs.
» Tags [string] The key/value combination of the tags associated with the public IPs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» VmIds [string] The IDs of the VMs.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadPublicIpsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "PublicIps": [
    {
      "VmId": "i-12345678",
      "Tags": [],
      "PublicIpId": "eipalloc-12345678",
      "PublicIp": "192.0.2.0",
      "LinkPublicIpId": "eipassoc-12345678",
      "NicAccountId": "123456789012",
      "NicId": "eni-12345678",
      "PrivateIp": "10.0.0.4"
    }
  ]
}

UnlinkPublicIp

POST /UnlinkPublicIp

Disassociates a public IP from the virtual machine (VM) or network interface card (NIC) it is associated with.

[IMPORTANT]
To disassociate the public IP from a NAT service, you need to delete the NAT service. For more information, see the DeleteNatService method.

Code samples

osc-cli api UnlinkPublicIp --profile "default" \
  --PublicIp "192.0.2.0"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkPublicIp \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "PublicIp": "192.0.2.0"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UnlinkPublicIp(
    PublicIp="192.0.2.0",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.PublicIpApi(config);

    const result = await api.unlinkPublicIp({
        unlinkPublicIpRequest: {
            publicIp: "192.0.2.0",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LinkPublicIpId string The ID representing the association of the public IP with the VM or the NIC. This parameter is required unless you use the PublicIp parameter.
PublicIp string The public IP. This parameter is required unless you use the LinkPublicIpId parameter.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UnlinkPublicIpResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Quota

ReadQuotas

POST /ReadQuotas

Lists one or more of your quotas.

For more information, see About Your Account.

Code samples

# Reading specific quota

osc-cli api ReadQuotas --profile "default" \
  --Filters '{
      "QuotaNames": ["lb_limit"],
    }'
# Reading collection of quotas

osc-cli api ReadQuotas --profile "default" \
  --Filters '{
      "Collections": ["VPC"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Reading specific quota

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadQuotas \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "QuotaNames": ["lb_limit"]
    }
  }'
# Reading collection of quotas

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadQuotas \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "Collections": ["VPC"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Reading specific quota
result = gw.ReadQuotas(
    Filters={
        "QuotaNames": ["lb_limit"],
    },
)
print(result)

# Reading collection of quotas
result = gw.ReadQuotas(
    Filters={
        "Collections": ["VPC"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.QuotaApi(config);

    /* Reading specific quota */
    const result = await api.readQuotas({
        readQuotasRequest: {
            filters: {
                quotaNames: ["lb_limit"],
            },
        },
    });
    console.log(result);

    /* Reading collection of quotas */
    const result2 = await api.readQuotas({
        readQuotasRequest: {
            filters: {
                collections: ["VPC"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersQuota One or more filters.
» Collections [string] The group names of the quotas.
» QuotaNames [string] The names of the quotas.
» QuotaTypes [string] The resource IDs if these are resource-specific quotas, global if they are not.
» ShortDescriptions [string] The description of the quotas.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadQuotasResponse

Example responses

# Reading specific quota
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "QuotaTypes": [
    {
      "Quotas": [
        {
          "ShortDescription": "Load Balancer Limit",
          "QuotaCollection": "LBU",
          "AccountId": "123456789012",
          "Description": "Maximum number of load balancers per region",
          "MaxValue": 20,
          "UsedValue": 0,
          "Name": "lb_limit"
        }
      ],
      "QuotaType": "global"
    }
  ]
}
# Reading collection of quotas
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "QuotaTypes": [
    {
      "Quotas": [
        {
          "ShortDescription": "Example Limit",
          "QuotaCollection": "VPC",
          "AccountId": "123456789012",
          "Description": "Maximum number of examples",
          "MaxValue": 5,
          "UsedValue": 0,
          "Name": "example_limit"
        }
      ],
      "QuotaType": "global"
    },
    {
      "Quotas": [
        {
          "ShortDescription": "Other Example Limit",
          "QuotaCollection": "VPC",
          "AccountId": "123456789012",
          "Description": "Maximum number of other examples",
          "MaxValue": 50,
          "UsedValue": 1,
          "Name": "other_example_limit"
        }
      ],
      "QuotaType": "vpc-12345678"
    }
  ]
}

Region

ReadRegions

POST /ReadRegions

Lists one or more Regions of the OUTSCALE Cloud.

For more information, see About Regions, Endpoints, and Subregions.

Code samples

osc-cli api ReadRegions --profile "default"

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadRegions \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadRegions()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
    });
    const api = new osc.RegionApi(config);

    const result = await api.readRegions({
        readRegionsRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadRegionsResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Regions": [
    {
      "RegionName": "eu-west-2",
      "Endpoint": "api.eu-west-2.outscale.com"
    },
    {
      "RegionName": "us-east-2",
      "Endpoint": "api.us-east-2.outscale.com"
    },
    {
      "RegionName": "us-west-1",
      "Endpoint": "api.us-west-1.outscale.com"
    }
  ]
}

Route

CreateRoute

POST /CreateRoute

Creates a route in a specified route table within a specified Net.
You must specify one of the following elements as the target:

  • Net peering
  • NAT VM
  • Internet service
  • Virtual gateway
  • NAT service
  • Network interface card (NIC)

The routing algorithm is based on the most specific match.

For more information, see About Route Tables.

Code samples

# Creating a route to an Internet service

osc-cli api CreateRoute --profile "default" \
  --RouteTableId "rtb-12345678" \
  --DestinationIpRange "0.0.0.0/0" \
  --GatewayId "igw-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating a route to an Internet service

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateRoute \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "RouteTableId": "rtb-12345678",
    "DestinationIpRange": "0.0.0.0/0",
    "GatewayId": "igw-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating a route to an Internet service
result = gw.CreateRoute(
    RouteTableId="rtb-12345678",
    DestinationIpRange="0.0.0.0/0",
    GatewayId="igw-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.RouteApi(config);

    /* Creating a route to an Internet service */
    const result = await api.createRoute({
        createRouteRequest: {
            routeTableId: "rtb-12345678",
            destinationIpRange: "0.0.0.0/0",
            gatewayId: "igw-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DestinationIpRange (required) string The IP range used for the destination match, in CIDR notation (for example, 10.0.0.0/24).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
GatewayId string The ID of an Internet service or virtual gateway attached to your Net.
NatServiceId string The ID of a NAT service.
NetPeeringId string The ID of a Net peering.
NicId string The ID of a NIC.
RouteTableId (required) string The ID of the route table for which you want to create a route.
VmId string The ID of a NAT VM in your Net (attached to exactly one NIC).

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateRouteResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Creating a route to an Internet service
{
  "RouteTable": {
    "Routes": [
      {
        "DestinationIpRange": "10.0.0.0/16",
        "CreationMethod": "CreateRouteTable",
        "State": "active"
      },
      {
        "GatewayId": "igw-12345678",
        "DestinationIpRange": "0.0.0.0/0",
        "CreationMethod": "CreateRoute",
        "State": "active"
      }
    ],
    "LinkRouteTables": [],
    "NetId": "vpc-12345678",
    "Tags": [],
    "RoutePropagatingVirtualGateways": [],
    "RouteTableId": "rtb-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteRoute

POST /DeleteRoute

Deletes a route from a specified route table.

Code samples

osc-cli api DeleteRoute --profile "default" \
  --RouteTableId "rtb-12345678" \
  --DestinationIpRange "198.51.100.0/24"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteRoute \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "RouteTableId": "rtb-12345678",
    "DestinationIpRange": "198.51.100.0/24"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteRoute(
    RouteTableId="rtb-12345678",
    DestinationIpRange="198.51.100.0/24",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.RouteApi(config);

    const result = await api.deleteRoute({
        deleteRouteRequest: {
            routeTableId: "rtb-12345678",
            destinationIpRange: "198.51.100.0/24",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DestinationIpRange (required) string The exact IP range for the route.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
RouteTableId (required) string The ID of the route table from which you want to delete a route.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteRouteResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "RouteTable": {
    "Routes": [
      {
        "DestinationIpRange": "10.0.0.0/16",
        "CreationMethod": "CreateRouteTable",
        "State": "active"
      }
    ],
    "LinkRouteTables": [],
    "NetId": "vpc-12345678",
    "Tags": [],
    "RoutePropagatingVirtualGateways": [],
    "RouteTableId": "rtb-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateRoute

POST /UpdateRoute

Replaces an existing route within a route table in a Net.
You must specify one of the following elements as the target:

  • Net peering
  • NAT virtual machine (VM)
  • Internet service
  • Virtual gateway
  • NAT service
  • Network interface card (NIC)

The routing algorithm is based on the most specific match.

Code samples

# Updating a route to a virtual gateway

osc-cli api UpdateRoute --profile "default" \
  --RouteTableId "rtb-12345678" \
  --DestinationIpRange "198.51.100.0/24" \
  --GatewayId "vgw-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Updating a route to a virtual gateway

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateRoute \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "RouteTableId": "rtb-12345678",
    "DestinationIpRange": "198.51.100.0/24",
    "GatewayId": "vgw-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Updating a route to a virtual gateway
result = gw.UpdateRoute(
    RouteTableId="rtb-12345678",
    DestinationIpRange="198.51.100.0/24",
    GatewayId="vgw-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.RouteApi(config);

    /* Updating a route to a virtual gateway */
    const result = await api.updateRoute({
        updateRouteRequest: {
            routeTableId: "rtb-12345678",
            destinationIpRange: "198.51.100.0/24",
            gatewayId: "vgw-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DestinationIpRange (required) string The IP range used for the destination match, in CIDR notation (for example, 10.0.0.0/24).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
GatewayId string The ID of an Internet service or virtual gateway attached to your Net.
NatServiceId string The ID of a NAT service.
NetPeeringId string The ID of a Net peering.
NicId string The ID of a network interface card (NIC).
RouteTableId (required) string The ID of the route table.
VmId string The ID of a NAT VM in your Net.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateRouteResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Updating a route to a virtual gateway
{
  "RouteTable": {
    "Routes": [
      {
        "DestinationIpRange": "10.0.0.0/16",
        "CreationMethod": "CreateRouteTable",
        "State": "active"
      },
      {
        "GatewayId": "vgw-12345678",
        "DestinationIpRange": "198.51.100.0/24",
        "CreationMethod": "CreateRoute",
        "State": "active"
      }
    ],
    "LinkRouteTables": [
      {
        "RouteTableId": "rtb-12345678",
        "Main": false,
        "SubnetId": "subnet-12345678",
        "LinkRouteTableId": "rtbassoc-12345678"
      }
    ],
    "NetId": "vpc-12345678",
    "Tags": [],
    "RoutePropagatingVirtualGateways": [],
    "RouteTableId": "rtb-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

RouteTable

CreateRouteTable

POST /CreateRouteTable

Creates a route table for a specified Net.
You can then add routes and associate this route table with a Subnet.

For more information, see About Route Tables.

Code samples

osc-cli api CreateRouteTable --profile "default" \
  --NetId "vpc-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateRouteTable \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetId": "vpc-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateRouteTable(
    NetId="vpc-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.RouteTableApi(config);

    const result = await api.createRouteTable({
        createRouteTableRequest: {
            netId: "vpc-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetId (required) string The ID of the Net for which you want to create a route table.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateRouteTableResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "RouteTable": {
    "Routes": [
      {
        "DestinationIpRange": "10.0.0.0/16",
        "CreationMethod": "CreateRouteTable",
        "State": "active"
      }
    ],
    "LinkRouteTables": [],
    "NetId": "vpc-12345678",
    "Tags": [],
    "RoutePropagatingVirtualGateways": [],
    "RouteTableId": "rtb-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteRouteTable

POST /DeleteRouteTable

Deletes a specified route table.
Before deleting a route table, you must disassociate it from any Subnet. You cannot delete the main route table.

Code samples

osc-cli api DeleteRouteTable --profile "default" \
  --RouteTableId "rtb-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteRouteTable \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "RouteTableId": "rtb-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteRouteTable(
    RouteTableId="rtb-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.RouteTableApi(config);

    const result = await api.deleteRouteTable({
        deleteRouteTableRequest: {
            routeTableId: "rtb-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
RouteTableId (required) string The ID of the route table you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteRouteTableResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

LinkRouteTable

POST /LinkRouteTable

Associates a Subnet with a route table.
The Subnet and the route table must be in the same Net. The traffic is routed according to the route table defined within this Net. You can associate a route table with several Subnets.

Code samples

osc-cli api LinkRouteTable --profile "default" \
  --RouteTableId "rtb-12345678" \
  --SubnetId "subnet-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkRouteTable \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "RouteTableId": "rtb-12345678",
    "SubnetId": "subnet-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.LinkRouteTable(
    RouteTableId="rtb-12345678",
    SubnetId="subnet-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.RouteTableApi(config);

    const result = await api.linkRouteTable({
        linkRouteTableRequest: {
            routeTableId: "rtb-12345678",
            subnetId: "subnet-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
RouteTableId (required) string The ID of the route table.
SubnetId (required) string The ID of the Subnet.

Responses

Status Description Schema
200 The HTTP 200 response (OK). LinkRouteTableResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LinkRouteTableId": "rtbassoc-12345678"
}

ReadRouteTables

POST /ReadRouteTables

Lists one or more of your route tables.
In your Net, each Subnet must be associated with a route table. If a Subnet is not explicitly associated with a route table, it is implicitly associated with the main route table of the Net.

Code samples

osc-cli api ReadRouteTables --profile "default" \
  --Filters '{
      "RouteTableIds": ["rtb-12345678"],
    }'
osc-cli api ReadRouteTables --profile "default" \
  --Filters '{
      "NetIds": ["vpc-12345678", "vpc-87654321"],
      "LinkRouteTableMain": True,
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadRouteTables \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "RouteTableIds": ["rtb-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadRouteTables \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "NetIds": ["vpc-12345678", "vpc-87654321"],
      "LinkRouteTableMain": true
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadRouteTables(
    Filters={
        "RouteTableIds": ["rtb-12345678"],
    },
)
print(result)

result = gw.ReadRouteTables(
    Filters={
        "NetIds": ["vpc-12345678","vpc-87654321"],
        "LinkRouteTableMain": True,
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.RouteTableApi(config);

    const result = await api.readRouteTables({
        readRouteTablesRequest: {
            filters: {
                routeTableIds: ["rtb-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readRouteTables({
        readRouteTablesRequest: {
            filters: {
                netIds: ["vpc-12345678", "vpc-87654321"],
                linkRouteTableMain: true,
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersRouteTable One or more filters.
» LinkRouteTableIds [string] The IDs of the route tables involved in the associations.
» LinkRouteTableLinkRouteTableIds [string] The IDs of the associations between the route tables and the Subnets.
» LinkRouteTableMain boolean If true, the route tables are the main ones for their Nets.
» LinkSubnetIds [string] The IDs of the Subnets involved in the associations.
» NetIds [string] The IDs of the Nets for the route tables.
» RouteCreationMethods [string] The methods used to create a route.
» RouteDestinationIpRanges [string] The IP ranges specified in routes in the tables.
» RouteDestinationServiceIds [string] The service IDs specified in routes in the tables.
» RouteGatewayIds [string] The IDs of the gateways specified in routes in the tables.
» RouteNatServiceIds [string] The IDs of the NAT services specified in routes in the tables.
» RouteNetPeeringIds [string] The IDs of the Net peerings specified in routes in the tables.
» RouteStates [string] The states of routes in the route tables (always active).
» RouteTableIds [string] The IDs of the route tables.
» RouteVmIds [string] The IDs of the VMs specified in routes in the tables.
» TagKeys [string] The keys of the tags associated with the route tables.
» TagValues [string] The values of the tags associated with the route tables.
» Tags [string] The key/value combination of the tags associated with the route tables, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadRouteTablesResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "RouteTables": [
    {
      "Routes": [
        {
          "DestinationIpRange": "10.0.0.0/16",
          "CreationMethod": "CreateRouteTable",
          "State": "active"
        }
      ],
      "LinkRouteTables": [
        {
          "Main": true,
          "LinkRouteTableId": "rtbassoc-12345678",
          "RouteTableId": "rtb-12345678",
          "NetId": "vpc-12345678"
        }
      ],
      "NetId": "vpc-12345678",
      "Tags": [],
      "RoutePropagatingVirtualGateways": [],
      "RouteTableId": "rtb-12345678"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UnlinkRouteTable

POST /UnlinkRouteTable

Disassociates a Subnet from a route table.
After disassociation, the Subnet can no longer use the routes in this route table, but uses the routes in the main route table of the Net instead.

Code samples

osc-cli api UnlinkRouteTable --profile "default" \
  --LinkRouteTableId "rtbassoc-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkRouteTable \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LinkRouteTableId": "rtbassoc-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UnlinkRouteTable(
    LinkRouteTableId="rtbassoc-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.RouteTableApi(config);

    const result = await api.unlinkRouteTable({
        unlinkRouteTableRequest: {
            linkRouteTableId: "rtbassoc-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LinkRouteTableId (required) string The ID of the association between the route table and the Subnet.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UnlinkRouteTableResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

POST /UpdateRouteTableLink

Replaces the route table associated with a specific Subnet in a Net with another one.
After the route table is replaced, the Subnet uses the routes in the new route table it is associated with.

Code samples

osc-cli api UpdateRouteTableLink --profile "default" \
  --LinkRouteTableId "rtbassoc-12345678" \
  --RouteTableId "rtb-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateRouteTableLink \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "LinkRouteTableId": "rtbassoc-12345678",
    "RouteTableId": "rtb-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateRouteTableLink(
    LinkRouteTableId="rtbassoc-12345678",
    RouteTableId="rtb-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.RouteTableApi(config);

    const result = await api.updateRouteTableLink({
        updateRouteTableLinkRequest: {
            linkRouteTableId: "rtbassoc-12345678",
            routeTableId: "rtb-12345678",
        },
    });
    console.log(result);

}

main();

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
LinkRouteTableId (required) string The ID of the current route table link.
RouteTableId (required) string The ID of the new route table to associate with the Subnet.
Status Description Schema
200 The HTTP 200 response (OK). UpdateRouteTableLinkResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "LinkRouteTableId": "rtbassoc-12345678"
}

SecurityGroup

CreateSecurityGroup

POST /CreateSecurityGroup

Creates a security group.
This action creates a security group either in the public Cloud or in a specified Net. By default, a default security group for use in the public Cloud and a default security group for use in a Net are created.
When launching a virtual machine (VM), if no security group is explicitly specified, the appropriate default security group is assigned to the VM. Default security groups include a default rule granting VMs network access to each other.
When creating a security group, you specify a name. Two security groups for use in the public Cloud or for use in a Net cannot have the same name.
You can have up to 500 security groups in the public Cloud. You can create up to 500 security groups per Net.
To add or remove rules, use the CreateSecurityGroupRule method.

For more information, see About Security Groups.

Code samples

osc-cli api CreateSecurityGroup --profile "default" \
  --NetId "vpc-12345678" \
  --SecurityGroupName "security-group-example" \
  --Description "Security group example"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSecurityGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetId": "vpc-12345678",
    "SecurityGroupName": "security-group-example",
    "Description": "Security group example"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateSecurityGroup(
    NetId="vpc-12345678",
    SecurityGroupName="security-group-example",
    Description="Security group example",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SecurityGroupApi(config);

    const result = await api.createSecurityGroup({
        createSecurityGroupRequest: {
            netId: "vpc-12345678",
            securityGroupName: "security-group-example",
            description: "Security group example",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
Description (required) string A description for the security group.
This description can contain between 1 and 255 characters. Allowed characters are a-z, A-Z, 0-9, accented letters, spaces, and _.-:/()#,@[]+=&;{}!$*.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetId string The ID of the Net for the security group.
SecurityGroupName (required) string The name of the security group.
This name must not start with sg-.
This name must be unique and contain between 1 and 255 characters. Allowed characters are a-z, A-Z, 0-9, spaces, and _.-:/()#,@[]+=&;{}!$*.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateSecurityGroupResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "SecurityGroup": {
    "Tags": [],
    "SecurityGroupName": "security-group-example",
    "OutboundRules": [
      {
        "FromPortRange": -1,
        "IpProtocol": "-1",
        "ToPortRange": -1,
        "IpRanges": [
          "0.0.0.0/0"
        ]
      }
    ],
    "SecurityGroupId": "sg-12345678",
    "AccountId": "123456789012",
    "Description": "Example of security group",
    "InboundRules": [],
    "NetId": "vpc-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteSecurityGroup

POST /DeleteSecurityGroup

Deletes a specified security group.
You can specify either the name of the security group or its ID.
This action fails if the specified group is associated with a virtual machine (VM) or referenced by another security group.

Code samples

osc-cli api DeleteSecurityGroup --profile "default" \
  --SecurityGroupId "sg-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteSecurityGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SecurityGroupId": "sg-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteSecurityGroup(
    SecurityGroupId="sg-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SecurityGroupApi(config);

    const result = await api.deleteSecurityGroup({
        deleteSecurityGroupRequest: {
            securityGroupId: "sg-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
SecurityGroupId string The ID of the security group you want to delete.
SecurityGroupName string The name of the security group.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteSecurityGroupResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadSecurityGroups

POST /ReadSecurityGroups

Lists one or more security groups.
You can specify either the name of the security groups or their IDs.

Code samples

osc-cli api ReadSecurityGroups --profile "default" \
  --Filters '{
      "SecurityGroupIds": ["sg-12345678"],
    }'
osc-cli api ReadSecurityGroups --profile "default" \
  --Filters '{
      "InboundRuleIpRanges": ["192.0.2.0"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSecurityGroups \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "SecurityGroupIds": ["sg-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSecurityGroups \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "InboundRuleIpRanges": ["192.0.2.0"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadSecurityGroups(
    Filters={
        "SecurityGroupIds": ["sg-12345678"],
    },
)
print(result)

result = gw.ReadSecurityGroups(
    Filters={
        "InboundRuleIpRanges": ["192.0.2.0"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SecurityGroupApi(config);

    const result = await api.readSecurityGroups({
        readSecurityGroupsRequest: {
            filters: {
                securityGroupIds: ["sg-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readSecurityGroups({
        readSecurityGroupsRequest: {
            filters: {
                inboundRuleIpRanges: ["192.0.2.0"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersSecurityGroup One or more filters.
» Descriptions [string] The descriptions of the security groups.
» InboundRuleAccountIds [string] The account IDs that have been granted permissions.
» InboundRuleFromPortRanges [integer] The beginnings of the port ranges for the TCP and UDP protocols, or the ICMP type numbers.
» InboundRuleIpRanges [string] The IP ranges that have been granted permissions, in CIDR notation (for example, 10.0.0.0/24).
» InboundRuleProtocols [string] The IP protocols for the permissions (tcp | udp | icmp, or a protocol number, or -1 for all protocols).
» InboundRuleSecurityGroupIds [string] The IDs of the security groups that have been granted permissions.
» InboundRuleSecurityGroupNames [string] The names of the security groups that have been granted permissions.
» InboundRuleToPortRanges [integer] The ends of the port ranges for the TCP and UDP protocols, or the ICMP code numbers.
» NetIds [string] The IDs of the Nets specified when the security groups were created.
» OutboundRuleAccountIds [string] The account IDs that have been granted permissions.
» OutboundRuleFromPortRanges [integer] The beginnings of the port ranges for the TCP and UDP protocols, or the ICMP type numbers.
» OutboundRuleIpRanges [string] The IP ranges that have been granted permissions, in CIDR notation (for example, 10.0.0.0/24).
» OutboundRuleProtocols [string] The IP protocols for the permissions (tcp | udp | icmp, or a protocol number, or -1 for all protocols).
» OutboundRuleSecurityGroupIds [string] The IDs of the security groups that have been granted permissions.
» OutboundRuleSecurityGroupNames [string] The names of the security groups that have been granted permissions.
» OutboundRuleToPortRanges [integer] The ends of the port ranges for the TCP and UDP protocols, or the ICMP code numbers.
» SecurityGroupIds [string] The IDs of the security groups.
» SecurityGroupNames [string] The names of the security groups.
» TagKeys [string] The keys of the tags associated with the security groups.
» TagValues [string] The values of the tags associated with the security groups.
» Tags [string] The key/value combination of the tags associated with the security groups, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadSecurityGroupsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "SecurityGroups": [
    {
      "Tags": [],
      "SecurityGroupName": "security-group-example",
      "OutboundRules": [
        {
          "FromPortRange": -1,
          "IpProtocol": "-1",
          "ToPortRange": -1,
          "IpRanges": [
            "0.0.0.0/0"
          ]
        }
      ],
      "SecurityGroupId": "sg-12345678",
      "AccountId": "123456789012",
      "Description": "Example of security group",
      "InboundRules": [
        {
          "FromPortRange": 22,
          "IpProtocol": "tcp",
          "ToPortRange": 22,
          "IpRanges": [
            "192.0.2.0",
            "198.51.100.0"
          ]
        }
      ],
      "NetId": "vpc-12345678"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

SecurityGroupRule

CreateSecurityGroupRule

POST /CreateSecurityGroupRule

Adds one or more rules to a security group.
Use the SecurityGroupId parameter to specify the security group for which you want to create a rule.
Use the Flow parameter to specify if you want an inbound rule or an outbound rule.

An inbound rule allows the security group to receive traffic:

  • Either from a specific IP range (IpRange parameter) on a specific port range (FromPortRange and ToPortRange parameters) and specific protocol (IpProtocol parameter).
  • Or from another specific security group (SecurityGroupAccountIdToLink and SecurityGroupNameToLink parameters).

(Net only) An outbound rule works similarly but allows the security group to send traffic rather than receive traffic.

Alternatively, you can use the Rules parameter to add several rules at the same time.

[NOTE]

  • The modifications are effective as quickly as possible, but a small delay may occur.
  • By default, traffic between two security groups is allowed through both public and private IPs. To restrict traffic to private IPs only, contact our Support team at support@outscale.com.

For more information, see About Security Group Rules.

Code samples

# Creating an inbound rule from an IP range

osc-cli api CreateSecurityGroupRule --profile "default" \
  --Flow "Inbound" \
  --SecurityGroupId "sg-12345678" \
  --FromPortRange 80 \
  --ToPortRange 80 \
  --IpProtocol "tcp" \
  --IpRange "10.0.0.0/16"
# Creating an inbound rule from another security group

osc-cli api CreateSecurityGroupRule --profile "default" \
  --Flow "Inbound" \
  --SecurityGroupId "sg-12345678" \
  --Rules '[
      {
        "FromPortRange": 22,
        "ToPortRange": 22,
        "IpProtocol": "tcp",
        "SecurityGroupsMembers": [{"AccountId": "123456789012", "SecurityGroupName": "another-security-group"}],
      },
    ]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating an inbound rule from an IP range

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSecurityGroupRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Flow": "Inbound",
    "SecurityGroupId": "sg-12345678",
    "FromPortRange": 80,
    "ToPortRange": 80,
    "IpProtocol": "tcp",
    "IpRange": "10.0.0.0/16"
  }'
# Creating an inbound rule from another security group

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSecurityGroupRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Flow": "Inbound",
    "SecurityGroupId": "sg-12345678",
    "Rules": [
      {
        "FromPortRange": 22,
        "ToPortRange": 22,
        "IpProtocol": "tcp",
        "SecurityGroupsMembers": [{"AccountId": "123456789012", "SecurityGroupName": "another-security-group"}]
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating an inbound rule from an IP range
result = gw.CreateSecurityGroupRule(
    Flow="Inbound",
    SecurityGroupId="sg-12345678",
    FromPortRange=80,
    ToPortRange=80,
    IpProtocol="tcp",
    IpRange="10.0.0.0/16",
)
print(result)

# Creating an inbound rule from another security group
result = gw.CreateSecurityGroupRule(
    Flow="Inbound",
    SecurityGroupId="sg-12345678",
    Rules=[
        {
            "FromPortRange": 22,
            "ToPortRange": 22,
            "IpProtocol": "tcp",
            "SecurityGroupsMembers": [
                {"AccountId": "123456789012", "SecurityGroupName": "another-security-group"},
            ],
        },
    ],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SecurityGroupRuleApi(config);

    /* Creating an inbound rule from an IP range */
    const result = await api.createSecurityGroupRule({
        createSecurityGroupRuleRequest: {
            flow: "Inbound",
            securityGroupId: "sg-12345678",
            fromPortRange: 80,
            toPortRange: 80,
            ipProtocol: "tcp",
            ipRange: "10.0.0.0/16",
        },
    });
    console.log(result);

    /* Creating an inbound rule from another security group */
    const result2 = await api.createSecurityGroupRule({
        createSecurityGroupRuleRequest: {
            flow: "Inbound",
            securityGroupId: "sg-12345678",
            rules: [
                {
                    fromPortRange: 22,
                    toPortRange: 22,
                    ipProtocol: "tcp",
                    securityGroupsMembers: [
                        {
                            accountId: "123456789012",
                            securityGroupName: "another-security-group",
                        },
                    ],
                },
            ],
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Flow (required) string The direction of the flow: Inbound or Outbound. You can specify Outbound for Nets only.
FromPortRange integer The beginning of the port range for the TCP and UDP protocols, or an ICMP type number. If you specify this parameter, you cannot specify the Rules parameter and its subparameters.
IpProtocol string The IP protocol name (tcp, udp, icmp, or -1 for all protocols). By default, -1. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. If you specify this parameter, you cannot specify the Rules parameter and its subparameters.
IpRange string The IP range for the security group rule, in CIDR notation (for example, 10.0.0.0/16). If you specify this parameter, you cannot specify the Rules parameter and its subparameters.
Rules [SecurityGroupRule] Information about the security group rule to create. If you specify this parent parameter and its subparameters, you cannot specify the following parent parameters: FromPortRange, IpProtocol, IpRange, and ToPortRange.
» FromPortRange integer The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
» IpProtocol string The IP protocol name (tcp, udp, icmp, or -1 for all protocols). By default, -1. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website.
» IpRanges [string] One or more IP ranges for the security group rules, in CIDR notation (for example, 10.0.0.0/16).
» SecurityGroupsMembers [SecurityGroupsMember] Information about one or more source or destination security groups.
»» AccountId string The account ID that owns the source or destination security group.
»» SecurityGroupId string The ID of a source or destination security group that you want to link to the security group of the rule.
»» SecurityGroupName string (Public Cloud only) The name of a source or destination security group that you want to link to the security group of the rule.
» ServiceIds [string] One or more service IDs to allow traffic from a Net to access the corresponding OUTSCALE services. For more information, see ReadNetAccessPointServices.
» ToPortRange integer The end of the port range for the TCP and UDP protocols, or an ICMP code number.
SecurityGroupAccountIdToLink string The account ID that owns the source or destination security group specified in the SecurityGroupNameToLink parameter.
SecurityGroupId (required) string The ID of the security group for which you want to create a rule.
SecurityGroupNameToLink string The ID of a source or destination security group that you want to link to the security group of the rule.
ToPortRange integer The end of the port range for the TCP and UDP protocols, or an ICMP code number. If you specify this parameter, you cannot specify the Rules parameter and its subparameters.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateSecurityGroupRuleResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Creating an inbound rule from an IP range
{
  "SecurityGroup": {
    "Tags": [],
    "SecurityGroupName": "security-group-example",
    "OutboundRules": [
      {
        "FromPortRange": -1,
        "IpProtocol": "-1",
        "ToPortRange": -1,
        "IpRanges": [
          "0.0.0.0/0"
        ]
      }
    ],
    "SecurityGroupId": "sg-12345678",
    "AccountId": "123456789012",
    "Description": "Example of security group",
    "InboundRules": [
      {
        "FromPortRange": 80,
        "IpProtocol": "tcp",
        "ToPortRange": 80,
        "IpRanges": [
          "10.0.0.0/16"
        ]
      }
    ],
    "NetId": "vpc-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Creating an inbound rule from another security group
{
  "SecurityGroup": {
    "Tags": [],
    "SecurityGroupName": "security-group-example",
    "OutboundRules": [
      {
        "FromPortRange": -1,
        "IpProtocol": "-1",
        "ToPortRange": -1,
        "IpRanges": [
          "0.0.0.0/0"
        ]
      }
    ],
    "SecurityGroupId": "sg-12345678",
    "AccountId": "123456789012",
    "Description": "Example of security group",
    "InboundRules": [
      {
        "FromPortRange": 22,
        "IpProtocol": "tcp",
        "ToPortRange": 22,
        "SecurityGroupsMembers": [
          {
            "SecurityGroupName": "another-security-group",
            "SecurityGroupId": "sg-87654321",
            "AccountId": "987654321098"
          }
        ]
      }
    ],
    "NetId": "vpc-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteSecurityGroupRule

POST /DeleteSecurityGroupRule

Deletes one or more inbound or outbound rules from a security group. For the rule to be deleted, the values specified in the deletion request must exactly match the value of the existing rule.
In case of TCP and UDP protocols, you have to indicate the destination port or range of ports. In case of ICMP protocol, you have to specify the ICMP type and code numbers.
Rules (IP permissions) consist of the protocol, IP range or source security group.
To remove outbound access to a destination security group, we recommend to use a set of IP permissions. We also recommend to specify the protocol in a set of IP permissions.

Code samples

# Deleting an inbound rule from an IP range

osc-cli api DeleteSecurityGroupRule --profile "default" \
  --Flow "Inbound" \
  --SecurityGroupId "sg-12345678" \
  --FromPortRange 80 \
  --ToPortRange 80 \
  --IpProtocol "tcp" \
  --IpRange "10.0.0.0/16"
# Deleting an inbound rule from another security group

osc-cli api DeleteSecurityGroupRule --profile "default" \
  --Flow "Inbound" \
  --SecurityGroupId "sg-12345678" \
  --Rules '[
      {
        "FromPortRange": 22,
        "ToPortRange": 22,
        "IpProtocol": "tcp",
        "SecurityGroupsMembers": [{"AccountId": "123456789012", "SecurityGroupName": "another-security-group"}],
      },
    ]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Deleting an inbound rule from an IP range

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteSecurityGroupRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Flow": "Inbound",
    "SecurityGroupId": "sg-12345678",
    "FromPortRange": 80,
    "ToPortRange": 80,
    "IpProtocol": "tcp",
    "IpRange": "10.0.0.0/16"
  }'
# Deleting an inbound rule from another security group

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteSecurityGroupRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Flow": "Inbound",
    "SecurityGroupId": "sg-12345678",
    "Rules": [
      {
        "FromPortRange": 22,
        "ToPortRange": 22,
        "IpProtocol": "tcp",
        "SecurityGroupsMembers": [{"AccountId": "123456789012", "SecurityGroupName": "another-security-group"}]
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Deleting an inbound rule from an IP range
result = gw.DeleteSecurityGroupRule(
    Flow="Inbound",
    SecurityGroupId="sg-12345678",
    FromPortRange=80,
    ToPortRange=80,
    IpProtocol="tcp",
    IpRange="10.0.0.0/16",
)
print(result)

# Deleting an inbound rule from another security group
result = gw.DeleteSecurityGroupRule(
    Flow="Inbound",
    SecurityGroupId="sg-12345678",
    Rules=[
        {
            "FromPortRange": 22,
            "ToPortRange": 22,
            "IpProtocol": "tcp",
            "SecurityGroupsMembers": [
                {"AccountId": "123456789012", "SecurityGroupName": "another-security-group"},
            ],
        },
    ],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SecurityGroupRuleApi(config);

    /* Deleting an inbound rule from an IP range */
    const result = await api.deleteSecurityGroupRule({
        deleteSecurityGroupRuleRequest: {
            flow: "Inbound",
            securityGroupId: "sg-12345678",
            fromPortRange: 80,
            toPortRange: 80,
            ipProtocol: "tcp",
            ipRange: "10.0.0.0/16",
        },
    });
    console.log(result);

    /* Deleting an inbound rule from another security group */
    const result2 = await api.deleteSecurityGroupRule({
        deleteSecurityGroupRuleRequest: {
            flow: "Inbound",
            securityGroupId: "sg-12345678",
            rules: [
                {
                    fromPortRange: 22,
                    toPortRange: 22,
                    ipProtocol: "tcp",
                    securityGroupsMembers: [
                        {
                            accountId: "123456789012",
                            securityGroupName: "another-security-group",
                        },
                    ],
                },
            ],
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Flow (required) string The direction of the flow: Inbound or Outbound. You can specify Outbound for Nets only.
FromPortRange integer The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
IpProtocol string The IP protocol name (tcp, udp, icmp, or -1 for all protocols). By default, -1. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website.
IpRange string The IP range for the security group rule, in CIDR notation (for example, 10.0.0.0/16).
Rules [SecurityGroupRule] One or more rules you want to delete from the security group.
» FromPortRange integer The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
» IpProtocol string The IP protocol name (tcp, udp, icmp, or -1 for all protocols). By default, -1. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website.
» IpRanges [string] One or more IP ranges for the security group rules, in CIDR notation (for example, 10.0.0.0/16).
» SecurityGroupsMembers [SecurityGroupsMember] Information about one or more source or destination security groups.
»» AccountId string The account ID that owns the source or destination security group.
»» SecurityGroupId string The ID of a source or destination security group that you want to link to the security group of the rule.
»» SecurityGroupName string (Public Cloud only) The name of a source or destination security group that you want to link to the security group of the rule.
» ServiceIds [string] One or more service IDs to allow traffic from a Net to access the corresponding OUTSCALE services. For more information, see ReadNetAccessPointServices.
» ToPortRange integer The end of the port range for the TCP and UDP protocols, or an ICMP code number.
SecurityGroupAccountIdToUnlink string The account ID of the owner of the security group you want to delete a rule from.
SecurityGroupId (required) string The ID of the security group you want to delete a rule from.
SecurityGroupNameToUnlink string The ID of the source security group. If you are in the Public Cloud, you can also specify the name of the source security group.
ToPortRange integer The end of the port range for the TCP and UDP protocols, or an ICMP code number.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteSecurityGroupRuleResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Deleting an inbound rule from an IP range
{
  "SecurityGroup": {
    "Tags": [],
    "SecurityGroupName": "security-group-example",
    "OutboundRules": [
      {
        "FromPortRange": -1,
        "IpProtocol": "-1",
        "ToPortRange": -1,
        "IpRanges": [
          "0.0.0.0/0"
        ]
      }
    ],
    "SecurityGroupId": "sg-12345678",
    "AccountId": "123456789012",
    "Description": "Example of security group",
    "InboundRules": [],
    "NetId": "vpc-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Creating an inbound rule from another security group
{
  "SecurityGroup": {
    "Tags": [],
    "SecurityGroupName": "security-group-example",
    "OutboundRules": [
      {
        "FromPortRange": -1,
        "IpProtocol": "-1",
        "ToPortRange": -1,
        "IpRanges": [
          "0.0.0.0/0"
        ]
      }
    ],
    "SecurityGroupId": "sg-12345678",
    "AccountId": "123456789012",
    "Description": "Example of security group",
    "InboundRules": [],
    "NetId": "vpc-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ServerCertificate

CreateServerCertificate

POST /CreateServerCertificate

Creates a server certificate and its matching private key.

These elements can be used with other services (for example, to configure SSL termination on load balancers).

You can also specify the chain of intermediate certification authorities if your certificate is not directly signed by a root one. You can specify multiple intermediate certification authorities in the CertificateChain parameter. To do so, concatenate all certificates in the correct order (the first certificate must be the authority of your certificate, the second must be the authority of the first one, and so on).

The private key must be a RSA key in PKCS1 form. To check this, open the PEM file and ensure its header reads as follows: BEGIN RSA PRIVATE KEY.

[IMPORTANT]

This private key must not be protected by a password or a passphrase.

For more information, see About Server Certificates in EIM.

Code samples

osc-cli api CreateServerCertificate --profile "default" \
  --Name "server-cert-example" \
  --Body="$(cat certificate.pem)" \
  --Chain="$(cat certificate-chain.pem)" \
  --PrivateKey="$(cat private-key.pem)" \
  --Path "/example/"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateServerCertificate \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Name": "server-cert-example",
    "Body": "...",
    "Chain": "...",
    "PrivateKey": "...",
    "Path": "/example/"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateServerCertificate(
    Name="server-cert-example",
    Body="...",
    Chain="...",
    PrivateKey="...",
    Path="/example/",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ServerCertificateApi(config);

    const result = await api.createServerCertificate({
        createServerCertificateRequest: {
            name: "server-cert-example",
            body: "...",
            chain: "...",
            privateKey: "...",
            path: "/example/",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
Body (required) string The PEM-encoded X509 certificate.
With OSC CLI, use the following syntax to make sure your CA file is correctly parsed: --CaPem="$(cat FILENAME)".
Chain string The PEM-encoded intermediate certification authorities.
With OSC CLI, use the following syntax to make sure your CA file is correctly parsed: --CaPem="$(cat FILENAME)".
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Name (required) string A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
Path string The path to the server certificate, set to a slash (/) if not specified.
PrivateKey (required) string The PEM-encoded private key matching the certificate.
With OSC CLI, use the following syntax to make sure your CA file is correctly parsed: --CaPem="$(cat FILENAME)".

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateServerCertificateResponse

Example responses

{
  "ServerCertificate": {
    "Path": "/example/",
    "Id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234",
    "Orn": "orn:ows:idauth::012345678910:server-certificate/example/server-cert-example",
    "Name": "server-cert-example"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteServerCertificate

POST /DeleteServerCertificate

Deletes a specified server certificate.

Code samples

osc-cli api DeleteServerCertificate --profile "default" \
  --Name "server-cert-example"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteServerCertificate \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Name": "server-cert-example"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteServerCertificate(
    Name="server-cert-example",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ServerCertificateApi(config);

    const result = await api.deleteServerCertificate({
        deleteServerCertificateRequest: {
            name: "server-cert-example",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Name (required) string The name of the server certificate you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteServerCertificateResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadServerCertificates

POST /ReadServerCertificates

Lists your server certificates.

Code samples

osc-cli api ReadServerCertificates --profile "default" \
  --Filters '{
      "Paths": ["/example/"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadServerCertificates \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "Paths": ["/example/"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadServerCertificates(
    Filters={
        "Paths": ["/example/"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ServerCertificateApi(config);

    const result = await api.readServerCertificates({
        readServerCertificatesRequest: {
            filters: {
                paths: ["/example/"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersServerCertificate One or more filters.
» Paths [string] The paths to the server certificates.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadServerCertificatesResponse

Example responses

{
  "ServerCertificates": [
    {
      "Path": "/example/",
      "Id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234",
      "Orn": "orn:ows:idauth::012345678910:server-certificate/example/server-cert-example",
      "Name": "server-cert-example"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateServerCertificate

POST /UpdateServerCertificate

Modifies the name and/or the path of a specified server certificate.

Code samples

osc-cli api UpdateServerCertificate --profile "default" \
  --Name "server-cert-example" \
  --NewName "new-name"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateServerCertificate \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Name": "server-cert-example",
    "NewName": "new-name"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateServerCertificate(
    Name="server-cert-example",
    NewName="new-name",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.ServerCertificateApi(config);

    const result = await api.updateServerCertificate({
        updateServerCertificateRequest: {
            name: "server-cert-example",
            newName: "new-name",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Name (required) string The name of the server certificate you want to modify.
NewName string A new name for the server certificate.
NewPath string A new path for the server certificate.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateServerCertificateResponse

Example responses

{
  "ServerCertificate": {
    "Path": "/example/",
    "Id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234",
    "Name": "new-name"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Snapshot

CreateSnapshot

POST /CreateSnapshot

Creates a snapshot. Snapshots are point-in-time images of a volume that you can use to back up your data or to create replicas of this volume.
You can use this method in three different ways:

  • Creating from a volume: You create a snapshot from one of your volumes.
  • Copying a snapshot: You copy an existing snapshot. The source snapshot can be one of your own snapshots, or a snapshot owned by another account that has granted you permission via the UpdateSnapshot method.
  • Importing from a bucket: You import a snapshot located in an OUTSCALE Object Storage (OOS) bucket. First, the owner of the source snapshot must export it to the bucket by using the CreateSnapshotExportTask method. Then, they must grant you permission to read the snapshot via a pre-signed URL or Access Control Lists. For more information, see Managing Access to Your Buckets and Objects.

For more information, see About Snapshots.

Code samples

# Creating from a volume

osc-cli api CreateSnapshot --profile "default" \
  --VolumeId "vol-12345678" \
  --Description "Snapshot created from a volume"
# Copying a snapshot

osc-cli api CreateSnapshot --profile "default" \
  --SourceSnapshotId "snap-12345678" \
  --SourceRegionName "eu-west-2" \
  --Description "Snapshot created from another snapshot"
# Importing from a bucket

osc-cli api CreateSnapshot --profile "default" \
  --FileLocation "https://oos.eu-west-2.outscale.com/BUCKET/KEY?AWSAccessKeyId=ABCDEFGHIJ0123456789&Expires=1493372309&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  --SnapshotSize 10737418240 \
  --Description "Snapshot imported from a bucket"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating from a volume

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSnapshot \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VolumeId": "vol-12345678",
    "Description": "Snapshot created from a volume"
  }'
# Copying a snapshot

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSnapshot \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SourceSnapshotId": "snap-12345678",
    "SourceRegionName": "eu-west-2",
    "Description": "Snapshot created from another snapshot"
  }'
# Importing from a bucket

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSnapshot \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "FileLocation": "https://oos.eu-west-2.outscale.com/BUCKET/KEY?AWSAccessKeyId=ABCDEFGHIJ0123456789&Expires=1493372309&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "SnapshotSize": 10737418240,
    "Description": "Snapshot imported from a bucket"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating from a volume
result = gw.CreateSnapshot(
    VolumeId="vol-12345678",
    Description="Snapshot created from a volume",
)
print(result)

# Copying a snapshot
result = gw.CreateSnapshot(
    SourceSnapshotId="snap-12345678",
    SourceRegionName="eu-west-2",
    Description="Snapshot created from another snapshot",
)
print(result)

# Importing from a bucket
result = gw.CreateSnapshot(
    FileLocation="https://oos.eu-west-2.outscale.com/BUCKET/KEY?AWSAccessKeyId=ABCDEFGHIJ0123456789&Expires=1493372309&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    SnapshotSize=10737418240,
    Description="Snapshot imported from a bucket",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SnapshotApi(config);

    /* Creating from a volume */
    const result = await api.createSnapshot({
        createSnapshotRequest: {
            volumeId: "vol-12345678",
            description: "Snapshot created from a volume",
        },
    });
    console.log(result);

    /* Copying a snapshot */
    const result2 = await api.createSnapshot({
        createSnapshotRequest: {
            sourceSnapshotId: "snap-12345678",
            sourceRegionName: "eu-west-2",
            description: "Snapshot created from another snapshot",
        },
    });
    console.log(result2);

    /* Importing from a bucket */
    const result3 = await api.createSnapshot({
        createSnapshotRequest: {
            fileLocation: "https://oos.eu-west-2.outscale.com/BUCKET/KEY?AWSAccessKeyId=ABCDEFGHIJ0123456789&Expires=1493372309&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            snapshotSize: 10737418240,
            description: "Snapshot imported from a bucket",
        },
    });
    console.log(result3);

}

main();

Available Parameters

Name Type Description
Description string A description for the snapshot.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
FileLocation string (when importing from a bucket) The pre-signed URL of the snapshot you want to import, or the normal URL of the snapshot if you have permission on the OOS bucket. For more information, see Configuring a Pre-signed URL or Managing Access to Your Buckets and Objects.
SnapshotSize integer (int64) (when importing from a bucket) The size of the snapshot you want to create in your account, in bytes. This size must be greater than or equal to the size of the original, uncompressed snapshot.
SourceRegionName string (when copying a snapshot) The name of the source Region, which must be the same as the Region of your account.
SourceSnapshotId string (when copying a snapshot) The ID of the snapshot you want to copy.
VolumeId string (when creating from a volume) The ID of the volume you want to create a snapshot of.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateSnapshotResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Creating from a volume
{
  "Snapshot": {
    "VolumeSize": 10,
    "AccountId": "123456789012",
    "VolumeId": "vol-12345678",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "PermissionsToCreateVolume": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "Progress": 0,
    "SnapshotId": "snap-12345678",
    "State": "pending/queued",
    "Description": "Snapshot created from a volume",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Copying a snapshot
{
  "Snapshot": {
    "VolumeSize": 10,
    "AccountId": "123456789012",
    "VolumeId": "vol-12345678",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "PermissionsToCreateVolume": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "Progress": 100,
    "SnapshotId": "snap-12345678",
    "State": "completed",
    "Description": "Snapshot copied from another snapshot",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Importing from a bucket
{
  "Snapshot": {
    "VolumeSize": 10,
    "AccountId": "123456789012",
    "VolumeId": "vol-12345678",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "PermissionsToCreateVolume": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "Progress": 0,
    "SnapshotId": "snap-12345678",
    "State": "importing",
    "Description": "Snapshot imported from a bucket",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

CreateSnapshotExportTask

POST /CreateSnapshotExportTask

Exports a snapshot to an OUTSCALE Object Storage (OOS) bucket.
This action enables you to create a backup of your snapshot or to copy it to another account. You, or other accounts you send a pre-signed URL to, can then download this snapshot from the bucket using the CreateSnapshot method.
This procedure enables you to copy a snapshot between accounts within the same Region or in different Regions. To copy a snapshot within the same Region, you can also use the CreateSnapshot direct method. The copy of the source snapshot is independent and belongs to you.

For more information, see About Snapshots.

Code samples

osc-cli api CreateSnapshotExportTask --profile "default" \
  --SnapshotId "snap-12345678" \
  --OsuExport '{
      "DiskImageFormat": "qcow2",
      "OsuBucket": "BUCKET",
      "OsuPrefix": "PREFIX",
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSnapshotExportTask \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SnapshotId": "snap-12345678",
    "OsuExport": {
      "DiskImageFormat": "qcow2",
      "OsuBucket": "BUCKET",
      "OsuPrefix": "PREFIX"
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateSnapshotExportTask(
    SnapshotId="snap-12345678",
    OsuExport={
        "DiskImageFormat": "qcow2",
        "OsuBucket": "BUCKET",
        "OsuPrefix": "PREFIX",
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SnapshotApi(config);

    const result = await api.createSnapshotExportTask({
        createSnapshotExportTaskRequest: {
            snapshotId: "snap-12345678",
            osuExport: {
                diskImageFormat: "qcow2",
                osuBucket: "BUCKET",
                osuPrefix: "PREFIX",
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
OsuExport (required) OsuExportToCreate Information about the OOS export task to create.
» DiskImageFormat (required) string The format of the export disk (qcow2 | raw).
» OsuApiKey OsuApiKey Information about the OOS API key.
»» ApiKeyId string The API key of the OOS account that enables you to access the bucket.
»» SecretKey string The secret key of the OOS account that enables you to access the bucket.
» OsuBucket (required) string The name of the OOS bucket where you want to export the object.
» OsuManifestUrl string The URL of the manifest file.
» OsuPrefix string The prefix for the key of the OOS object.
SnapshotId (required) string The ID of the snapshot to export.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateSnapshotExportTaskResponse

Example responses

{
  "SnapshotExportTask": {
    "Tags": [],
    "TaskId": "snap-export-12345678",
    "Comment": "Export of snapshot snap-12345678",
    "OsuExport": {
      "OsuPrefix": "PREFIX",
      "OsuBucket": "BUCKET",
      "DiskImageFormat": "qcow2"
    },
    "State": "pending",
    "SnapshotId": "snap-12345678",
    "Progress": 0
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteSnapshot

POST /DeleteSnapshot

Deletes a specified snapshot.
You cannot delete a snapshot that is currently used by an OUTSCALE machine image (OMI). To do so, you first need to delete the corresponding OMI. For more information, see the DeleteImage method.

Code samples

osc-cli api DeleteSnapshot --profile "default" \
  --SnapshotId "snap-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteSnapshot \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SnapshotId": "snap-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteSnapshot(
    SnapshotId="snap-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SnapshotApi(config);

    const result = await api.deleteSnapshot({
        deleteSnapshotRequest: {
            snapshotId: "snap-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
SnapshotId (required) string The ID of the snapshot you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteSnapshotResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadSnapshotExportTasks

POST /ReadSnapshotExportTasks

Lists one or more snapshot export tasks.

Code samples

osc-cli api ReadSnapshotExportTasks --profile "default" \
  --Filters '{
      "TaskIds": ["snap-export-12345678"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSnapshotExportTasks \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "TaskIds": ["snap-export-12345678"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadSnapshotExportTasks(
    Filters={
        "TaskIds": ["snap-export-12345678"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SnapshotApi(config);

    const result = await api.readSnapshotExportTasks({
        readSnapshotExportTasksRequest: {
            filters: {
                taskIds: ["snap-export-12345678"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersExportTask One or more filters.
» TaskIds [string] The IDs of the export tasks.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadSnapshotExportTasksResponse

Example responses

{
  "SnapshotExportTasks": [
    {
      "Tags": [],
      "TaskId": "snap-export-12345678",
      "Comment": "Export of snapshot snap-12345678",
      "OsuExport": {
        "OsuPrefix": "PREFIX",
        "OsuBucket": "BUCKET",
        "DiskImageFormat": "qcow2"
      },
      "State": "pending",
      "SnapshotId": "snap-12345678",
      "Progress": 99
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadSnapshots

POST /ReadSnapshots

Lists one or more snapshots that are available to you and the permissions to create volumes from them.

Code samples

osc-cli api ReadSnapshots --profile "default" \
  --Filters '{
      "SnapshotIds": ["snap-12345678"],
    }'
osc-cli api ReadSnapshots --profile "default" \
  --Filters '{
      "TagKeys": ["env"],
      "TagValues": ["prod", "test"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSnapshots \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "SnapshotIds": ["snap-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSnapshots \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "TagKeys": ["env"],
      "TagValues": ["prod", "test"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadSnapshots(
    Filters={
        "SnapshotIds": ["snap-12345678"],
    },
)
print(result)

result = gw.ReadSnapshots(
    Filters={
        "TagKeys": ["env"],
        "TagValues": ["prod","test"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SnapshotApi(config);

    const result = await api.readSnapshots({
        readSnapshotsRequest: {
            filters: {
                snapshotIds: ["snap-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readSnapshots({
        readSnapshotsRequest: {
            filters: {
                tagKeys: ["env"],
                tagValues: ["prod", "test"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersSnapshot One or more filters.
» AccountAliases [string] The account aliases of the owners of the snapshots.
» AccountIds [string] The account IDs of the owners of the snapshots.
» Descriptions [string] The descriptions of the snapshots.
» FromCreationDate string (date-time) The beginning of the time period, in ISO 8601 date-time format (for example, 2020-06-14T00:00:00.000Z).
» PermissionsToCreateVolumeAccountIds [string] The account IDs which have permissions to create volumes.
» PermissionsToCreateVolumeGlobalPermission boolean If true, lists all public volumes. If false, lists all private volumes.
» Progresses [integer] The progresses of the snapshots, as a percentage.
» SnapshotIds [string] The IDs of the snapshots.
» States [string] The states of the snapshots (in-queue | pending | completed | error | deleting).
» TagKeys [string] The keys of the tags associated with the snapshots.
» TagValues [string] The values of the tags associated with the snapshots.
» Tags [string] The key/value combination of the tags associated with the snapshots, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» ToCreationDate string (date-time) The end of the time period, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).
» VolumeIds [string] The IDs of the volumes used to create the snapshots.
» VolumeSizes [integer] The sizes of the volumes used to create the snapshots, in gibibytes (GiB).

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadSnapshotsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Snapshots": [
    {
      "VolumeSize": 10,
      "AccountId": "123456789012",
      "VolumeId": "vol-12345678",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "PermissionsToCreateVolume": {
        "GlobalPermission": false,
        "AccountIds": []
      },
      "Progress": 100,
      "SnapshotId": "snap-12345678",
      "State": "completed",
      "Description": "Snapshot created from a volume",
      "Tags": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
{
  "Snapshots": [
    {
      "VolumeSize": 10,
      "AccountId": "123456789012",
      "VolumeId": "vol-12345678",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "PermissionsToCreateVolume": {
        "GlobalPermission": false,
        "AccountIds": []
      },
      "Progress": 100,
      "SnapshotId": "snap-12345678",
      "State": "completed",
      "Description": "Test snapshot",
      "Tags": [
        {
          "Value": "test",
          "Key": "env"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateSnapshot

POST /UpdateSnapshot

Modifies the permissions for a specified snapshot.
You must specify either the Additions or the Removals parameter.
After sharing a snapshot with an account, the other account can create a copy of it that they own. For more information about copying snapshots, see CreateSnapshot.

Code samples

# Adding permission

osc-cli api UpdateSnapshot --profile "default" \
  --SnapshotId "snap-12345678" \
  --PermissionsToCreateVolume '{
      "Additions": {
        "AccountIds": ["987654321098"],
      },
    }'
# Removing permission

osc-cli api UpdateSnapshot --profile "default" \
  --SnapshotId "snap-12345678" \
  --PermissionsToCreateVolume '{
      "Removals": {
        "AccountIds": ["987654321098"],
      },
    }'
# Making an image public to everyone

osc-cli api UpdateSnapshot --profile "default" \
  --SnapshotId "snap-12345678" \
  --PermissionsToCreateVolume '{
      "Additions": {
        "GlobalPermission": True,
      },
    }'
# Making an image private to everyone

osc-cli api UpdateSnapshot --profile "default" \
  --SnapshotId "snap-12345678" \
  --PermissionsToCreateVolume '{
      "Removals": {
        "GlobalPermission": True,
      },
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Adding permission

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateSnapshot \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SnapshotId": "snap-12345678",
    "PermissionsToCreateVolume": {
      "Additions": {
        "AccountIds": ["987654321098"]
      }
    }
  }'
# Removing permission

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateSnapshot \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SnapshotId": "snap-12345678",
    "PermissionsToCreateVolume": {
      "Removals": {
        "AccountIds": ["987654321098"]
      }
    }
  }'
# Making an image public to everyone

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateSnapshot \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SnapshotId": "snap-12345678",
    "PermissionsToCreateVolume": {
      "Additions": {
        "GlobalPermission": true
      }
    }
  }'
# Making an image private to everyone

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateSnapshot \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SnapshotId": "snap-12345678",
    "PermissionsToCreateVolume": {
      "Removals": {
        "GlobalPermission": true
      }
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Adding permission
result = gw.UpdateSnapshot(
    SnapshotId="snap-12345678",
    PermissionsToCreateVolume={
        "Additions": {
            "AccountIds": ["987654321098"],
        },
    },
)
print(result)

# Removing permission
result = gw.UpdateSnapshot(
    SnapshotId="snap-12345678",
    PermissionsToCreateVolume={
        "Removals": {
            "AccountIds": ["987654321098"],
        },
    },
)
print(result)

# Making an image public to everyone
result = gw.UpdateSnapshot(
    SnapshotId="snap-12345678",
    PermissionsToCreateVolume={
        "Additions": {
            "GlobalPermission": True,
        },
    },
)
print(result)

# Making an image private to everyone
result = gw.UpdateSnapshot(
    SnapshotId="snap-12345678",
    PermissionsToCreateVolume={
        "Removals": {
            "GlobalPermission": True,
        },
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SnapshotApi(config);

    /* Adding permission */
    const result = await api.updateSnapshot({
        updateSnapshotRequest: {
            snapshotId: "snap-12345678",
            permissionsToCreateVolume: {
                additions: {
                    accountIds: ["987654321098"],
                },
            },
        },
    });
    console.log(result);

    /* Removing permission */
    const result2 = await api.updateSnapshot({
        updateSnapshotRequest: {
            snapshotId: "snap-12345678",
            permissionsToCreateVolume: {
                removals: {
                    accountIds: ["987654321098"],
                },
            },
        },
    });
    console.log(result2);

    /* Making an image public to everyone */
    const result3 = await api.updateSnapshot({
        updateSnapshotRequest: {
            snapshotId: "snap-12345678",
            permissionsToCreateVolume: {
                additions: {
                    globalPermission: true,
                },
            },
        },
    });
    console.log(result3);

    /* Making an image private to everyone */
    const result4 = await api.updateSnapshot({
        updateSnapshotRequest: {
            snapshotId: "snap-12345678",
            permissionsToCreateVolume: {
                removals: {
                    globalPermission: true,
                },
            },
        },
    });
    console.log(result4);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
PermissionsToCreateVolume (required) PermissionsOnResourceCreation Information about the permissions for the resource.
Specify either the Additions or the Removals parameter.
» Additions PermissionsOnResource Permissions for the resource.
»» AccountIds [string] One or more account IDs that the permission is associated with.
»» GlobalPermission boolean A global permission for all accounts.
(Request) Set this parameter to true to make the resource public (if the parent parameter is Additions) or to make the resource private (if the parent parameter is Removals).
(Response) If true, the resource is public. If false, the resource is private.
» Removals PermissionsOnResource Permissions for the resource.
SnapshotId (required) string The ID of the snapshot.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateSnapshotResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Adding permission
{
  "Snapshot": {
    "VolumeSize": 10,
    "AccountId": "123456789012",
    "VolumeId": "vol-12345678",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "PermissionsToCreateVolume": {
      "GlobalPermission": false,
      "AccountIds": [
        "987654321098"
      ]
    },
    "Progress": 100,
    "SnapshotId": "snap-12345678",
    "State": "completed",
    "Description": "Snapshot created from a volume",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Removing permission
{
  "Snapshot": {
    "VolumeSize": 10,
    "AccountId": "123456789012",
    "VolumeId": "vol-12345678",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "PermissionsToCreateVolume": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "Progress": 100,
    "SnapshotId": "snap-12345678",
    "State": "completed",
    "Description": "Snapshot created from a volume",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Making an image public to everyone
{
  "Snapshot": {
    "VolumeSize": 10,
    "AccountId": "123456789012",
    "VolumeId": "vol-12345678",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "PermissionsToCreateVolume": {
      "GlobalPermission": true,
      "AccountIds": []
    },
    "Progress": 100,
    "SnapshotId": "snap-12345678",
    "State": "completed",
    "Description": "Snapshot created from a volume",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Making an image private to everyone
{
  "Snapshot": {
    "VolumeSize": 10,
    "AccountId": "123456789012",
    "VolumeId": "vol-12345678",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "PermissionsToCreateVolume": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "Progress": 100,
    "SnapshotId": "snap-12345678",
    "State": "completed",
    "Description": "Snapshot created from a volume",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Subnet

CreateSubnet

POST /CreateSubnet

Creates a Subnet in an existing Net.
To create a Subnet in a Net, you have to provide the ID of the Net and the IP range for the Subnet (its network range). Once the Subnet is created, you cannot modify its IP range.

For more information, see About Nets.

Code samples

osc-cli api CreateSubnet --profile "default" \
  --NetId "vpc-12345678" \
  --IpRange "10.0.0.0/18"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSubnet \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "NetId": "vpc-12345678",
    "IpRange": "10.0.0.0/18"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateSubnet(
    NetId="vpc-12345678",
    IpRange="10.0.0.0/18",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SubnetApi(config);

    const result = await api.createSubnet({
        createSubnetRequest: {
            netId: "vpc-12345678",
            ipRange: "10.0.0.0/18",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
IpRange (required) string The IP range in the Subnet, in CIDR notation (for example, 10.0.0.0/16).
The IP range of the Subnet can be either the same as the Net one if you create only a single Subnet in this Net, or a subset of the Net one. In case of several Subnets in a Net, their IP ranges must not overlap. The smallest Subnet you can create uses a /29 netmask (eight IPs). For more information, see About Nets.
NetId (required) string The ID of the Net for which you want to create a Subnet.
SubregionName string The name of the Subregion in which you want to create the Subnet.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateSubnetResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
409 The HTTP 409 response (Conflict). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Subnet": {
    "Tags": [],
    "SubregionName": "eu-west-2a",
    "SubnetId": "subnet-12345678",
    "AvailableIpsCount": 16379,
    "IpRange": "10.0.0.0/18",
    "MapPublicIpOnLaunch": false,
    "State": "available",
    "NetId": "vpc-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteSubnet

POST /DeleteSubnet

Deletes a specified Subnet.
Before deleting the Subnet, you need to delete all resources associated with the Subnet:

  • Virtual machines (VMs)
  • Network Interface Cards (NICs)
  • NAT services
  • Load balancers

Code samples

osc-cli api DeleteSubnet --profile "default" \
  --SubnetId "subnet-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteSubnet \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SubnetId": "subnet-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteSubnet(
    SubnetId="subnet-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SubnetApi(config);

    const result = await api.deleteSubnet({
        deleteSubnetRequest: {
            subnetId: "subnet-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
SubnetId (required) string The ID of the Subnet you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteSubnetResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadSubnets

POST /ReadSubnets

Lists one or more of your Subnets.
If you do not specify any Subnet ID, this action describes all of your Subnets.

Code samples

osc-cli api ReadSubnets --profile "default" \
  --Filters '{
      "NetIds": ["vpc-12345678"],
    }'
osc-cli api ReadSubnets --profile "default" \
  --Filters '{
      "States": ["available", "pending"],
      "SubregionNames": ["eu-west-2a"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSubnets \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "NetIds": ["vpc-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSubnets \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "States": ["available", "pending"],
      "SubregionNames": ["eu-west-2a"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadSubnets(
    Filters={
        "NetIds": ["vpc-12345678"],
    },
)
print(result)

result = gw.ReadSubnets(
    Filters={
        "States": ["available","pending"],
        "SubregionNames": ["eu-west-2a"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SubnetApi(config);

    const result = await api.readSubnets({
        readSubnetsRequest: {
            filters: {
                netIds: ["vpc-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readSubnets({
        readSubnetsRequest: {
            filters: {
                states: ["available", "pending"],
                subregionNames: ["eu-west-2a"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersSubnet One or more filters.
» AvailableIpsCounts [integer] The number of available IPs.
» IpRanges [string] The IP ranges in the Subnets, in CIDR notation (for example, 10.0.0.0/16).
» NetIds [string] The IDs of the Nets in which the Subnets are.
» States [string] The states of the Subnets (pending | available | deleted).
» SubnetIds [string] The IDs of the Subnets.
» SubregionNames [string] The names of the Subregions in which the Subnets are located.
» TagKeys [string] The keys of the tags associated with the Subnets.
» TagValues [string] The values of the tags associated with the Subnets.
» Tags [string] The key/value combination of the tags associated with the Subnets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadSubnetsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Subnets": [
    {
      "Tags": [],
      "SubregionName": "eu-west-2a",
      "SubnetId": "subnet-12345678",
      "AvailableIpsCount": 16379,
      "IpRange": "10.0.0.0/18",
      "MapPublicIpOnLaunch": false,
      "State": "available",
      "NetId": "vpc-12345678"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateSubnet

POST /UpdateSubnet

Modifies the specified attribute of a Subnet.

Code samples

osc-cli api UpdateSubnet --profile "default" \
  --SubnetId "subnet-12345678" \
  --MapPublicIpOnLaunch True

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateSubnet \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SubnetId": "subnet-12345678",
    "MapPublicIpOnLaunch": true
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateSubnet(
    SubnetId="subnet-12345678",
    MapPublicIpOnLaunch=True,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SubnetApi(config);

    const result = await api.updateSubnet({
        updateSubnetRequest: {
            subnetId: "subnet-12345678",
            mapPublicIpOnLaunch: true,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
MapPublicIpOnLaunch (required) boolean If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet.
SubnetId (required) string The ID of the Subnet.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateSubnetResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Subnet": {
    "Tags": [],
    "SubregionName": "eu-west-2a",
    "SubnetId": "subnet-12345678",
    "AvailableIpsCount": 16379,
    "IpRange": "10.0.0.0/18",
    "MapPublicIpOnLaunch": true,
    "State": "available",
    "NetId": "vpc-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Subregion

ReadSubregions

POST /ReadSubregions

Lists one or more of the enabled Subregions that you can access in the current Region.

For more information, see About Regions, Endpoints, and Subregions.

Code samples

# Listing a specific Subregion in the current Region

osc-cli api ReadSubregions --profile "default" \
  --Filters '{
      "SubregionNames": ["eu-west-2a"],
    }'
# Listing two specific Subregions in the current Region

osc-cli api ReadSubregions --profile "default" \
  --Filters '{
      "SubregionNames": ["eu-west-2a", "eu-west-2b"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Listing a specific Subregion in the current Region

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSubregions \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "SubregionNames": ["eu-west-2a"]
    }
  }'
# Listing two specific Subregions in the current Region

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSubregions \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "SubregionNames": ["eu-west-2a", "eu-west-2b"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Listing a specific Subregion in the current Region
result = gw.ReadSubregions(
    Filters={
        "SubregionNames": ["eu-west-2a"],
    },
)
print(result)

# Listing two specific Subregions in the current Region
result = gw.ReadSubregions(
    Filters={
        "SubregionNames": ["eu-west-2a","eu-west-2b"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.SubregionApi(config);

    /* Listing a specific Subregion in the current Region */
    const result = await api.readSubregions({
        readSubregionsRequest: {
            filters: {
                subregionNames: ["eu-west-2a"],
            },
        },
    });
    console.log(result);

    /* Listing two specific Subregions in the current Region */
    const result2 = await api.readSubregions({
        readSubregionsRequest: {
            filters: {
                subregionNames: ["eu-west-2a", "eu-west-2b"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersSubregion One or more filters.
» RegionNames [string] The names of the Regions containing the Subregions.
» States [string] The states of the Subregions.
» SubregionNames [string] The names of the Subregions.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadSubregionsResponse

Example responses

# Listing a specific Subregion in the current Region
{
  "Subregions": [
    {
      "State": "available",
      "RegionName": "eu-west-2",
      "SubregionName": "eu-west-2a",
      "LocationCode": "PAR1"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Listing two specific Subregions in the current Region
{
  "Subregions": [
    {
      "State": "available",
      "RegionName": "eu-west-2",
      "SubregionName": "eu-west-2a",
      "LocationCode": "PAR1"
    },
    {
      "State": "available",
      "RegionName": "eu-west-2",
      "SubregionName": "eu-west-2b",
      "LocationCode": "PAR4"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Tag

CreateTags

POST /CreateTags

Adds one or more tags to the specified resources.
If a tag with the same key already exists for the resource, the tag value is replaced.
You can tag the following resources using their IDs:

  • Virtual machines (VMs) (i-xxxxxxxx)
  • OMIs (ami-xxxxxxxx)
  • Volumes (vol-xxxxxxxx)
  • Snapshots (snap-xxxxxxxx)
  • Public IPs (eipalloc-xxxxxxxx)
  • Security groups (sg-xxxxxxxx)
  • Route tables (rtb-xxxxxxxx)
  • Network interface cards (NIC) (eni-xxxxxxxx)
  • Nets (vpc-xxxxxxxx)
  • Subnets (subnet-xxxxxxxx)
  • Net peerings (vpcx-xxxxxxxx)
  • Net endpoints (vpce-xxxxxxxx)
  • NAT services (nat-xxxxxxxx)
  • Internet services (igw-xxxxxxxx)
  • Client gateways (cgw-xxxxxxxx)
  • Virtual gateways (vgw-xxxxxxxx)
  • VPN connections (vpn-xxxxxxxx)
  • DHCP options (dopt-xxxxxxxx)
  • OMI export tasks (image-export-xxxxxxxx)
  • Snapshot export tasks (snap-export-xxxxxxxx)

For more information, see About Tags.

Code samples

osc-cli api CreateTags --profile "default" \
  --ResourceIds '["i-12345678"]' \
  --Tags '[
      {
        "Key": "key1",
        "Value": "value1",
      },
    ]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateTags \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ResourceIds": ["i-12345678"],
    "Tags": [
      {
        "Key": "key1",
        "Value": "value1"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateTags(
    ResourceIds=["i-12345678"],
    Tags=[
        {
            "Key": "key1",
            "Value": "value1",
        },
    ],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.TagApi(config);

    const result = await api.createTags({
        createTagsRequest: {
            resourceIds: ["i-12345678"],
            tags: [
                {
                    key: "key1",
                    value: "value1",
                },
            ],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ResourceIds (required) [string] One or more resource IDs.
Tags (required) [ResourceTag] One or more tags to add to the specified resources.
» Key (required) string The key of the tag, with a minimum of 1 character.
» Value (required) string The value of the tag, between 0 and 255 characters.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateTagsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteTags

POST /DeleteTags

Deletes one or more tags from the specified resources.

Code samples

osc-cli api DeleteTags --profile "default" \
  --ResourceIds '["i-12345678"]' \
  --Tags '[
      {
        "Key": "key1",
        "Value": "value1",
      },
    ]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteTags \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ResourceIds": ["i-12345678"],
    "Tags": [
      {
        "Key": "key1",
        "Value": "value1"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteTags(
    ResourceIds=["i-12345678"],
    Tags=[
        {
            "Key": "key1",
            "Value": "value1",
        },
    ],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.TagApi(config);

    const result = await api.deleteTags({
        deleteTagsRequest: {
            resourceIds: ["i-12345678"],
            tags: [
                {
                    key: "key1",
                    value: "value1",
                },
            ],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ResourceIds (required) [string] One or more resource IDs.
Tags (required) [ResourceTag] One or more tags to delete (if you set a tag value, only the tags matching exactly this value are deleted).
» Key (required) string The key of the tag, with a minimum of 1 character.
» Value (required) string The value of the tag, between 0 and 255 characters.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteTagsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadTags

POST /ReadTags

Lists one or more tags for your resources.

Code samples

osc-cli api ReadTags --profile "default" \
  --Filters '{
      "ResourceTypes": ["snapshot"],
      "Keys": ["key1"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadTags \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ResourceTypes": ["snapshot"],
      "Keys": ["key1"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadTags(
    Filters={
        "ResourceTypes": ["snapshot"],
        "Keys": ["key1"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.TagApi(config);

    const result = await api.readTags({
        readTagsRequest: {
            filters: {
                resourceTypes: ["snapshot"],
                keys: ["key1"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersTag One or more filters.
» Keys [string] The keys of the tags that are assigned to the resources. You can use this filter alongside the Values filter. In that case, you filter the resources corresponding to each tag, regardless of the other filter.
» ResourceIds [string] The IDs of the resources with which the tags are associated.
» ResourceTypes [string] The resource type (vm | image | volume | snapshot | public-ip | security-group | route-table | nic | net | subnet | net-peering | net-access-point | nat-service | internet-service | client-gateway | virtual-gateway | vpn-connection | dhcp-options | task).
» Values [string] The values of the tags that are assigned to the resources. You can use this filter alongside the TagKeys filter. In that case, you filter the resources corresponding to each tag, regardless of the other filter.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadTagsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Tags": [
    {
      "Value": "value1",
      "ResourceType": "snapshot",
      "ResourceId": "snap-12345678",
      "Key": "key1"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Task

DeleteExportTask

POST /DeleteExportTask

Deletes an export task.
If the export task is not running, the command fails and an error is returned.

Code samples

# Deleting an image export task

osc-cli api DeleteExportTask --profile "default" \
  --ExportTaskId "image-export-12345678"
# Deleting a snapshot export task

osc-cli api DeleteExportTask --profile "default" \
  --ExportTaskId "snap-export-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Deleting an image export task

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteExportTask \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ExportTaskId": "image-export-12345678"
  }'
# Deleting a snapshot export task

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteExportTask \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ExportTaskId": "snap-export-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Deleting an image export task
result = gw.DeleteExportTask(
    ExportTaskId="image-export-12345678",
)
print(result)

# Deleting a snapshot export task
result = gw.DeleteExportTask(
    ExportTaskId="snap-export-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.TaskApi(config);

    /* Deleting an image export task */
    const result = await api.deleteExportTask({
        deleteExportTaskRequest: {
            exportTaskId: "image-export-12345678",
        },
    });
    console.log(result);

    /* Deleting a snapshot export task */
    const result2 = await api.deleteExportTask({
        deleteExportTaskRequest: {
            exportTaskId: "snap-export-12345678",
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ExportTaskId (required) string The ID of the export task to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteExportTaskResponse

Example responses

# Deleting an image export task
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Deleting a snapshot export task
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

User

CreateUser

POST /CreateUser

Creates an EIM user for your account.

For more information, see About EIM Users.

Code samples

osc-cli api CreateUser --profile "default" \
  --UserName "example-user" \
  --Path "/documentation/"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateUser \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "UserName": "example-user",
    "Path": "/documentation/"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateUser(
    UserName="example-user",
    Path="/documentation/",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.UserApi(config);

    const result = await api.createUser({
        createUserRequest: {
            userName: "example-user",
            path: "/documentation/",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Path string The path to the EIM user you want to create (by default, /). This path name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).
UserName (required) string The name of the EIM user you want to create. This user name must contain between 1 and 64 alphanumeric characters and/or pluses (+), equals (=), commas (,), periods (.), at signs (@), dashes (-), or underscores (_).

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateUserResponse

Example responses

{
  "User": {
    "UserName": "example-user",
    "UserId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
    "Path": "/documentation/"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteUser

POST /DeleteUser

Deletes a specified EIM user. The EIM user must not belong to any group, nor have any key or linked policy.

Code samples

osc-cli api DeleteUser --profile "default" \
  --UserName "example-user"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteUser \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "UserName": "example-user"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteUser(
    UserName="example-user",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.UserApi(config);

    const result = await api.deleteUser({
        deleteUserRequest: {
            userName: "example-user",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
UserName (required) string The name of the EIM user you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteUserResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadUsers

POST /ReadUsers

Lists all EIM users that have a specified path.
If you do not specify a path, this action returns a list of all users in the account (or an empty list if there are none).

Code samples

osc-cli api ReadUsers --profile "default"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadUsers \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{}'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadUsers()
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.UserApi(config);

    const result = await api.readUsers({
        readUsersRequest: {},
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadUsersResponse

Example responses

{
  "Users": [
    {
      "UserName": "example-user",
      "UserId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
      "Path": "/documentation/"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateUser

POST /UpdateUser

Modifies the name and/or the path of a specified EIM user.

Code samples

osc-cli api UpdateUser --profile "default" \
  --UserName "example-user" \
  --NewUserName "test-user" \
  --NewPath "/product/"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateUser \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "UserName": "example-user",
    "NewUserName": "test-user",
    "NewPath": "/product/"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateUser(
    UserName="example-user",
    NewUserName="test-user",
    NewPath="/product/",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.UserApi(config);

    const result = await api.updateUser({
        updateUserRequest: {
            userName: "example-user",
            newUserName: "test-user",
            newPath: "/product/",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NewPath string A new path for the EIM user.
NewUserName string A new name for the EIM user.
UserName (required) string The name of the EIM user you want to modify.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateUserResponse

Example responses

{
  "User": {
    "UserName": "test-user",
    "UserId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
    "Path": "/product/"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

VirtualGateway

CreateVirtualGateway

POST /CreateVirtualGateway

Creates a virtual gateway.
A virtual gateway is the access point on the Net side of a VPN connection.

For more information, see About Virtual Gateways.

Code samples

osc-cli api CreateVirtualGateway --profile "default" \
  --ConnectionType "ipsec.1"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVirtualGateway \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ConnectionType": "ipsec.1"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateVirtualGateway(
    ConnectionType="ipsec.1",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VirtualGatewayApi(config);

    const result = await api.createVirtualGateway({
        createVirtualGatewayRequest: {
            connectionType: "ipsec.1",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
ConnectionType (required) string The type of VPN connection supported by the virtual gateway (only ipsec.1 is supported).
DryRun boolean If true, checks whether you have the required permissions to perform the action.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateVirtualGatewayResponse

Example responses

{
  "VirtualGateway": {
    "VirtualGatewayId": "vgw-12345678",
    "ConnectionType": "ipsec.1",
    "NetToVirtualGatewayLinks": [],
    "State": "available",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteVirtualGateway

POST /DeleteVirtualGateway

Deletes a specified virtual gateway.
Before deleting a virtual gateway, we recommend to detach it from the Net and delete the VPN connection.

Code samples

osc-cli api DeleteVirtualGateway --profile "default" \
  --VirtualGatewayId "vgw-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteVirtualGateway \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VirtualGatewayId": "vgw-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteVirtualGateway(
    VirtualGatewayId="vgw-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VirtualGatewayApi(config);

    const result = await api.deleteVirtualGateway({
        deleteVirtualGatewayRequest: {
            virtualGatewayId: "vgw-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VirtualGatewayId (required) string The ID of the virtual gateway you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteVirtualGatewayResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

LinkVirtualGateway

POST /LinkVirtualGateway

Attaches a virtual gateway to a Net.

[IMPORTANT]
This action can be done only if the virtual gateway is in the available state.

Code samples

osc-cli api LinkVirtualGateway --profile "default" \
  --VirtualGatewayId "vgw-12345678" \
  --NetId "vpc-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkVirtualGateway \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VirtualGatewayId": "vgw-12345678",
    "NetId": "vpc-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.LinkVirtualGateway(
    VirtualGatewayId="vgw-12345678",
    NetId="vpc-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VirtualGatewayApi(config);

    const result = await api.linkVirtualGateway({
        linkVirtualGatewayRequest: {
            virtualGatewayId: "vgw-12345678",
            netId: "vpc-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetId (required) string The ID of the Net to which you want to attach the virtual gateway.
VirtualGatewayId (required) string The ID of the virtual gateway.

Responses

Status Description Schema
200 The HTTP 200 response (OK). LinkVirtualGatewayResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "NetToVirtualGatewayLink": {
    "State": "attached",
    "NetId": "vpc-12345678"
  }
}

ReadVirtualGateways

POST /ReadVirtualGateways

Lists one or more virtual gateways.

Code samples

osc-cli api ReadVirtualGateways --profile "default" \
  --Filters '{
      "VirtualGatewayIds": ["vgw-12345678"],
    }'
osc-cli api ReadVirtualGateways --profile "default" \
  --Filters '{
      "States": ["available"],
      "LinkStates": ["attached", "detached"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVirtualGateways \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "VirtualGatewayIds": ["vgw-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVirtualGateways \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "States": ["available"],
      "LinkStates": ["attached", "detached"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadVirtualGateways(
    Filters={
        "VirtualGatewayIds": ["vgw-12345678"],
    },
)
print(result)

result = gw.ReadVirtualGateways(
    Filters={
        "States": ["available"],
        "LinkStates": ["attached","detached"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VirtualGatewayApi(config);

    const result = await api.readVirtualGateways({
        readVirtualGatewaysRequest: {
            filters: {
                virtualGatewayIds: ["vgw-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readVirtualGateways({
        readVirtualGatewaysRequest: {
            filters: {
                states: ["available"],
                linkStates: ["attached", "detached"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersVirtualGateway One or more filters.
» ConnectionTypes [string] The types of the virtual gateways (only ipsec.1 is supported).
» LinkNetIds [string] The IDs of the Nets the virtual gateways are attached to.
» LinkStates [string] The current states of the attachments between the virtual gateways and the Nets (attaching | attached | detaching | detached).
» States [string] The states of the virtual gateways (pending | available | deleting | deleted).
» TagKeys [string] The keys of the tags associated with the virtual gateways.
» TagValues [string] The values of the tags associated with the virtual gateways.
» Tags [string] The key/value combination of the tags associated with the virtual gateways, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» VirtualGatewayIds [string] The IDs of the virtual gateways.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadVirtualGatewaysResponse

Example responses

{
  "VirtualGateways": [
    {
      "VirtualGatewayId": "vgw-12345678",
      "ConnectionType": "ipsec.1",
      "NetToVirtualGatewayLinks": [],
      "State": "available",
      "Tags": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
{
  "VirtualGateways": [
    {
      "VirtualGatewayId": "vgw-12345678",
      "ConnectionType": "ipsec.1",
      "NetToVirtualGatewayLinks": [
        {
          "State": "attached",
          "NetId": "vpc-12345678"
        }
      ],
      "State": "available",
      "Tags": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UnlinkVirtualGateway

POST /UnlinkVirtualGateway

Detaches a virtual gateway from a Net.
You must wait until the virtual gateway is in the detached state before you can attach another Net to it or delete the Net it was previously attached to.

Code samples

osc-cli api UnlinkVirtualGateway --profile "default" \
  --VirtualGatewayId "vgw-12345678" \
  --NetId "vpc-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkVirtualGateway \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VirtualGatewayId": "vgw-12345678",
    "NetId": "vpc-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UnlinkVirtualGateway(
    VirtualGatewayId="vgw-12345678",
    NetId="vpc-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VirtualGatewayApi(config);

    const result = await api.unlinkVirtualGateway({
        unlinkVirtualGatewayRequest: {
            virtualGatewayId: "vgw-12345678",
            netId: "vpc-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
NetId (required) string The ID of the Net from which you want to detach the virtual gateway.
VirtualGatewayId (required) string The ID of the virtual gateway.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UnlinkVirtualGatewayResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateRoutePropagation

POST /UpdateRoutePropagation

Configures the propagation of routes to a specified route table of a Net by a virtual gateway.

Code samples

osc-cli api UpdateRoutePropagation --profile "default" \
  --VirtualGatewayId "vgw-12345678" \
  --RouteTableId "rtb-12345678" \
  --Enable True

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateRoutePropagation \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VirtualGatewayId": "vgw-12345678",
    "RouteTableId": "rtb-12345678",
    "Enable": true
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateRoutePropagation(
    VirtualGatewayId="vgw-12345678",
    RouteTableId="rtb-12345678",
    Enable=True,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VirtualGatewayApi(config);

    const result = await api.updateRoutePropagation({
        updateRoutePropagationRequest: {
            virtualGatewayId: "vgw-12345678",
            routeTableId: "rtb-12345678",
            enable: true,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Enable (required) boolean If true, a virtual gateway can propagate routes to a specified route table of a Net. If false, the propagation is disabled.
RouteTableId (required) string The ID of the route table.
VirtualGatewayId (required) string The ID of the virtual gateway.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateRoutePropagationResponse

Example responses

{
  "RouteTable": {
    "Routes": [
      {
        "DestinationIpRange": "10.0.0.0/16",
        "CreationMethod": "CreateRouteTable",
        "State": "active"
      }
    ],
    "LinkRouteTables": [
      {
        "RouteTableId": "rtb-12345678",
        "Main": true,
        "LinkRouteTableId": "rtbassoc-12345678"
      }
    ],
    "NetId": "vpc-12345678",
    "Tags": [],
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "vgw-12345678"
      }
    ],
    "RouteTableId": "rtb-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Vm

CreateVms

POST /CreateVms

Creates virtual machines (VMs), and then launches them.
This action enables you to create a specified number of VMs using an OUTSCALE machine image (OMI) that you are allowed to use, and then to automatically launch them.
The VMs remain in the pending state until they are created and ready to be used. Once automatically launched, they are in the running state.
To check the state of your VMs, call the ReadVms method.
If not specified, the security group used by the service is the default one.
The metadata server enables you to get the public key provided when the VM is launched. Official OMIs contain a script to get this public key and put it inside the VM to provide secure access without password.

For more information, see About VMs.

Code samples

# Creating a VM (minimal syntax)

osc-cli api CreateVms --profile "default" \
  --ImageId "ami-12345678"
# Creating a VM in a Net

osc-cli api CreateVms --profile "default" \
  --ImageId "ami-12345678" \
  --VmType "tinav5.c1r1p2" \
  --KeypairName "keypair-example" \
  --SecurityGroupIds '["sg-12345678"]' \
  --SubnetId "subnet-12345678" \
  --UserData "$(base64 -i user_data.txt)"
# Creating a VM with block device mappings

osc-cli api CreateVms --profile "default" \
  --ImageId "ami-12345678" \
  --VmType "tinav5.c1r1p2" \
  --KeypairName "keypair-example" \
  --SecurityGroupIds '["sg-12345678"]' \
  --SubnetId "subnet-12345678" \
  --UserData "$(base64 -i user_data.txt)" \
  --BlockDeviceMappings '[
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {"VolumeSize": 15, "VolumeType": "gp2"},
      },
      {
        "DeviceName": "/dev/sdb",
        "Bsu": {"SnapshotId": "snap-12345678", "VolumeSize": 22, "VolumeType": "io1", "Iops": 150},
      },
    ]'
# Creating a VM with a NIC

osc-cli api CreateVms --profile "default" \
  --ImageId "ami-12345678" \
  --VmType "tinav5.c1r1p2" \
  --KeypairName "keypair-example" \
  --UserData "$(base64 -i user_data.txt)" \
  --Nics '[
      {
        "DeviceNumber": 0,
        "NicId": "eni-12345678",
      },
    ]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating a VM (minimal syntax)

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageId": "ami-12345678"
  }'
# Creating a VM in a Net

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageId": "ami-12345678",
    "VmType": "tinav5.c1r1p2",
    "KeypairName": "keypair-example",
    "SecurityGroupIds": ["sg-12345678"],
    "SubnetId": "subnet-12345678",
    "UserData": "..."
  }'
# Creating a VM with block device mappings

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageId": "ami-12345678",
    "VmType": "tinav5.c1r1p2",
    "KeypairName": "keypair-example",
    "SecurityGroupIds": ["sg-12345678"],
    "SubnetId": "subnet-12345678",
    "UserData": "...",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {"VolumeSize": 15, "VolumeType": "gp2"}
      },
      {
        "DeviceName": "/dev/sdb",
        "Bsu": {"SnapshotId": "snap-12345678", "VolumeSize": 22, "VolumeType": "io1", "Iops": 150}
      }
    ]
  }'
# Creating a VM with a NIC

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ImageId": "ami-12345678",
    "VmType": "tinav5.c1r1p2",
    "KeypairName": "keypair-example",
    "UserData": "...",
    "Nics": [
      {
        "DeviceNumber": 0,
        "NicId": "eni-12345678"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating a VM (minimal syntax)
result = gw.CreateVms(
    ImageId="ami-12345678",
)
print(result)

# Creating a VM in a Net
result = gw.CreateVms(
    ImageId="ami-12345678",
    VmType="tinav5.c1r1p2",
    KeypairName="keypair-example",
    SecurityGroupIds=["sg-12345678"],
    SubnetId="subnet-12345678",
    UserData="...",
)
print(result)

# Creating a VM with block device mappings
result = gw.CreateVms(
    ImageId="ami-12345678",
    VmType="tinav5.c1r1p2",
    KeypairName="keypair-example",
    SecurityGroupIds=["sg-12345678"],
    SubnetId="subnet-12345678",
    UserData="...",
    BlockDeviceMappings=[
        {
            "DeviceName": "/dev/sda1",
            "Bsu": {
                "VolumeSize": 15,
                "VolumeType": "gp2",
            },
        },
        {
            "DeviceName": "/dev/sdb",
            "Bsu": {
                "SnapshotId": "snap-12345678",
                "VolumeSize": 22,
                "VolumeType": "io1",
                "Iops": 150,
            },
        },
    ],
)
print(result)

# Creating a VM with a NIC
result = gw.CreateVms(
    ImageId="ami-12345678",
    VmType="tinav5.c1r1p2",
    KeypairName="keypair-example",
    UserData="...",
    Nics=[
        {
            "DeviceNumber": 0,
            "NicId": "eni-12345678",
        },
    ],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmApi(config);

    /* Creating a VM (minimal syntax) */
    const result = await api.createVms({
        createVmsRequest: {
            imageId: "ami-12345678",
        },
    });
    console.log(result);

    /* Creating a VM in a Net */
    const result2 = await api.createVms({
        createVmsRequest: {
            imageId: "ami-12345678",
            vmType: "tinav5.c1r1p2",
            keypairName: "keypair-example",
            securityGroupIds: ["sg-12345678"],
            subnetId: "subnet-12345678",
            userData: "...",
        },
    });
    console.log(result2);

    /* Creating a VM with block device mappings */
    const result3 = await api.createVms({
        createVmsRequest: {
            imageId: "ami-12345678",
            vmType: "tinav5.c1r1p2",
            keypairName: "keypair-example",
            securityGroupIds: ["sg-12345678"],
            subnetId: "subnet-12345678",
            userData: "...",
            blockDeviceMappings: [
                {
                    deviceName: "/dev/sda1",
                    bsu: {
                        volumeSize: 15,
                        volumeType: "gp2",
                    },
                },
                {
                    deviceName: "/dev/sdb",
                    bsu: {
                        snapshotId: "snap-12345678",
                        volumeSize: 22,
                        volumeType: "io1",
                        iops: 150,
                    },
                },
            ],
        },
    });
    console.log(result3);

    /* Creating a VM with a NIC */
    const result4 = await api.createVms({
        createVmsRequest: {
            imageId: "ami-12345678",
            vmType: "tinav5.c1r1p2",
            keypairName: "keypair-example",
            userData: "...",
            nics: [
                {
                    deviceNumber: 0,
                    nicId: "eni-12345678",
                },
            ],
        },
    });
    console.log(result4);

}

main();

Available Parameters

Name Type Description
BlockDeviceMappings [BlockDeviceMappingVmCreation] One or more block device mappings.
» Bsu BsuToCreate Information about the BSU volume to create.
»» DeleteOnVmDeletion boolean By default or if set to true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
»» Iops integer The number of I/O operations per second (IOPS). This parameter must be specified only if you create an io1 volume. The maximum number of IOPS allowed for io1 volumes is 13000 with a maximum performance ratio of 300 IOPS per gibibyte.
»» SnapshotId string The ID of the snapshot used to create the volume.
»» VolumeSize integer The size of the volume, in gibibytes (GiB).
If you specify a snapshot ID, the volume size must be at least equal to the snapshot size.
If you specify a snapshot ID but no volume size, the volume is created with a size similar to the snapshot one.
»» VolumeType string The type of the volume (standard | io1 | gp2). If not specified in the request, a standard volume is created.
For more information about volume types, see About Volumes > Volume Types and IOPS.
» DeviceName string The device name for the volume. For a root device, you must use /dev/sda1. For other volumes, you must use /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX (where the first X is a letter between b and z, and the second X is a letter between a and z).
» NoDevice string Removes the device which is included in the block device mapping of the OMI.
» VirtualDeviceName string The name of the virtual device (ephemeralN).
BootOnCreation boolean By default or if true, the VM is started on creation. If false, the VM is stopped on creation.
BsuOptimized boolean This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.
ClientToken string A unique identifier which enables you to manage the idempotency.
DeletionProtection boolean If true, you cannot delete the VM unless you change this parameter back to false.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ImageId (required) string The ID of the OMI used to create the VM. You can find the list of OMIs by calling the ReadImages method.
KeypairName string The name of the keypair.
MaxVmsCount integer The maximum number of VMs you want to create. If all the VMs cannot be created, the largest possible number of VMs above MinVmsCount is created.
MinVmsCount integer The minimum number of VMs you want to create. If this number of VMs cannot be created, no VMs are created.
NestedVirtualization boolean (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is disabled.
Nics [NicForVmCreation] One or more NICs. If you specify this parameter, you must not specify the SubnetId and SubregionName parameters. You also must define one NIC as the primary network interface of the VM with 0 as its device number.
» DeleteOnVmDeletion boolean If true, the NIC is deleted when the VM is terminated. You can specify this parameter only for a new NIC. To modify this value for an existing NIC, see UpdateNic.
» Description string The description of the NIC, if you are creating a NIC when creating the VM.
» DeviceNumber integer The index of the VM device for the NIC attachment (between 0 and 7, both included). This parameter is required if you create a NIC when creating the VM.
» NicId string The ID of the NIC, if you are attaching an existing NIC when creating a VM.
» PrivateIps [PrivateIpLight] One or more private IPs to assign to the NIC, if you create a NIC when creating a VM. Only one private IP can be the primary private IP.
»» IsPrimary boolean If true, the IP is the primary private IP of the NIC.
»» PrivateIp string The private IP of the NIC.
» SecondaryPrivateIpCount integer The number of secondary private IPs, if you create a NIC when creating a VM. This parameter cannot be specified if you specified more than one private IP in the PrivateIps parameter.
» SecurityGroupIds [string] One or more IDs of security groups for the NIC, if you create a NIC when creating a VM.
» SubnetId string The ID of the Subnet for the NIC, if you create a NIC when creating a VM. This parameter is required if you create a NIC when creating the VM.
Performance string The performance of the VM (medium | high | highest). By default, high. This parameter is ignored if you specify a performance flag directly in the VmType parameter.
Placement Placement Information about the placement of the VM.
» SubregionName string The name of the Subregion. If you specify this parameter, you must not specify the Nics parameter.
» Tenancy string The tenancy of the VM (default, dedicated, or a dedicated group ID).
PrivateIps [string] One or more private IPs of the VM.
SecurityGroupIds [string] One or more IDs of security group for the VMs.
SecurityGroups [string] One or more names of security groups for the VMs.
SubnetId string The ID of the Subnet in which you want to create the VM. If you specify this parameter, you must not specify the Nics parameter.
UserData string Data or script used to add a specific configuration to the VM. It must be Base64-encoded and is limited to 500 kibibytes (KiB).
VmInitiatedShutdownBehavior string The VM behavior when you stop it. By default or if set to stop, the VM stops. If set to restart, the VM stops then automatically restarts. If set to terminate, the VM stops and is terminated.
VmType string The type of VM. You can specify a TINA type (in the tinavW.cXrYpZ or tinavW.cXrY format), or an AWS type (for example, t2.small, which is the default value).
If you specify an AWS type, it is converted in the background to its corresponding TINA type, but the AWS type is still returned. If the specified or converted TINA type includes a performance flag, this performance flag is applied regardless of the value you may have provided in the Performance parameter. For more information, see VM Types.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateVmsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Creating a VM (minimal syntax)
{
  "Vms": [
    {
      "VmType": "t2.small",
      "VmInitiatedShutdownBehavior": "stop",
      "State": "pending",
      "StateReason": "",
      "RootDeviceType": "ebs",
      "RootDeviceName": "/dev/sda1",
      "IsSourceDestChecked": true,
      "ImageId": "ami-12345678",
      "DeletionProtection": false,
      "Architecture": "x86_64",
      "NestedVirtualization": false,
      "BlockDeviceMappings": [
        {
          "DeviceName": "/dev/sda1",
          "Bsu": {
            "VolumeId": "vol-12345678",
            "State": "attaching",
            "LinkDate": "2010-10-01T12:34:56.789Z",
            "DeleteOnVmDeletion": true
          }
        }
      ],
      "VmId": "i-12345678",
      "ReservationId": "r-12345678",
      "Hypervisor": "xen",
      "Placement": {
        "Tenancy": "default",
        "SubregionName": "eu-west-2a"
      },
      "ProductCodes": [
        "0001"
      ],
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "UserData": "...",
      "PrivateIp": "10.0.0.4",
      "SecurityGroups": [
        {
          "SecurityGroupName": "default",
          "SecurityGroupId": "sg-12345678"
        }
      ],
      "BsuOptimized": false,
      "LaunchNumber": 0,
      "Performance": "medium",
      "Tags": [],
      "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Creating a VM in a Net
{
  "Vms": [
    {
      "VmType": "tinav5.c1r1p2",
      "VmInitiatedShutdownBehavior": "stop",
      "State": "pending",
      "StateReason": "",
      "RootDeviceType": "ebs",
      "RootDeviceName": "/dev/sda1",
      "IsSourceDestChecked": true,
      "KeypairName": "keypair-example",
      "ImageId": "ami-12345678",
      "DeletionProtection": false,
      "Architecture": "x86_64",
      "NestedVirtualization": false,
      "BlockDeviceMappings": [
        {
          "DeviceName": "/dev/sda1",
          "Bsu": {
            "VolumeId": "vol-12345678",
            "State": "attaching",
            "LinkDate": "2010-10-01T12:34:56.789Z",
            "DeleteOnVmDeletion": true
          }
        }
      ],
      "VmId": "i-12345678",
      "ReservationId": "r-12345678",
      "Hypervisor": "xen",
      "Placement": {
        "Tenancy": "default",
        "SubregionName": "eu-west-2a"
      },
      "ProductCodes": [
        "0001"
      ],
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "UserData": "...",
      "SubnetId": "subnet-12345678",
      "PrivateIp": "10.0.0.4",
      "SecurityGroups": [
        {
          "SecurityGroupName": "security-group-example",
          "SecurityGroupId": "sg-12345678"
        }
      ],
      "BsuOptimized": false,
      "LaunchNumber": 0,
      "NetId": "vpc-12345678",
      "Nics": [
        {
          "SubnetId": "subnet-12345678",
          "State": "in-use",
          "LinkNic": {
            "State": "attached",
            "DeviceNumber": 0,
            "LinkNicId": "eni-attach-12345678",
            "DeleteOnVmDeletion": true
          },
          "IsSourceDestChecked": true,
          "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
          "Description": "Primary network interface",
          "AccountId": "123456789012",
          "SecurityGroups": [
            {
              "SecurityGroupName": "security-group-example",
              "SecurityGroupId": "sg-12345678"
            }
          ],
          "MacAddress": "A1:B2:C3:D4:E5:F6",
          "NetId": "vpc-12345678",
          "NicId": "eni-12345678",
          "PrivateIps": [
            {
              "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
              "PrivateIp": "10.0.0.4",
              "IsPrimary": true
            }
          ]
        }
      ],
      "Performance": "high",
      "Tags": [],
      "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Creating a VM with block device mappings
{
  "Vms": [
    {
      "VmType": "tinav5.c1r1p2",
      "VmInitiatedShutdownBehavior": "stop",
      "State": "pending",
      "StateReason": "",
      "RootDeviceType": "ebs",
      "RootDeviceName": "/dev/sda1",
      "IsSourceDestChecked": true,
      "KeypairName": "keypair-example",
      "ImageId": "ami-12345678",
      "DeletionProtection": false,
      "Architecture": "x86_64",
      "NestedVirtualization": false,
      "BlockDeviceMappings": [
        {
          "DeviceName": "/dev/sda1",
          "Bsu": {
            "VolumeId": "vol-12345678",
            "State": "attaching",
            "LinkDate": "2010-10-01T12:34:56.789Z",
            "DeleteOnVmDeletion": true
          }
        },
        {
          "DeviceName": "/dev/sda1",
          "Bsu": {
            "VolumeId": "vol-87654321",
            "State": "attaching",
            "LinkDate": "2010-10-01T12:34:56.789Z",
            "DeleteOnVmDeletion": true
          }
        }
      ],
      "VmId": "i-12345678",
      "ReservationId": "r-12345678",
      "Hypervisor": "xen",
      "Placement": {
        "Tenancy": "default",
        "SubregionName": "eu-west-2a"
      },
      "ProductCodes": [
        "0001"
      ],
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "UserData": "...",
      "SubnetId": "subnet-12345678",
      "PrivateIp": "10.0.0.4",
      "SecurityGroups": [
        {
          "SecurityGroupName": "security-group-example",
          "SecurityGroupId": "sg-12345678"
        }
      ],
      "BsuOptimized": false,
      "LaunchNumber": 0,
      "NetId": "vpc-12345678",
      "Nics": [
        {
          "SubnetId": "subnet-12345678",
          "State": "in-use",
          "LinkNic": {
            "State": "attached",
            "DeviceNumber": 0,
            "LinkNicId": "eni-attach-12345678",
            "DeleteOnVmDeletion": true
          },
          "IsSourceDestChecked": true,
          "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
          "Description": "Primary network interface",
          "AccountId": "123456789012",
          "SecurityGroups": [
            {
              "SecurityGroupName": "security-group-example",
              "SecurityGroupId": "sg-12345678"
            }
          ],
          "MacAddress": "A1:B2:C3:D4:E5:F6",
          "NetId": "vpc-12345678",
          "NicId": "eni-12345678",
          "PrivateIps": [
            {
              "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
              "PrivateIp": "10.0.0.4",
              "IsPrimary": true
            }
          ]
        }
      ],
      "Performance": "high",
      "Tags": [],
      "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Creating a VM with a NIC
{
  "Vms": [
    {
      "VmType": "tinav5.c1r1p2",
      "VmInitiatedShutdownBehavior": "stop",
      "State": "pending",
      "StateReason": "",
      "RootDeviceType": "ebs",
      "RootDeviceName": "/dev/sda1",
      "IsSourceDestChecked": true,
      "KeypairName": "keypair-example",
      "ImageId": "ami-12345678",
      "DeletionProtection": false,
      "Architecture": "x86_64",
      "NestedVirtualization": false,
      "BlockDeviceMappings": [
        {
          "DeviceName": "/dev/sda1",
          "Bsu": {
            "VolumeId": "vol-12345678",
            "State": "attaching",
            "LinkDate": "2010-10-01T12:34:56.789Z",
            "DeleteOnVmDeletion": true
          }
        }
      ],
      "VmId": "i-12345678",
      "ReservationId": "r-12345678",
      "Hypervisor": "xen",
      "Placement": {
        "Tenancy": "default",
        "SubregionName": "eu-west-2a"
      },
      "ProductCodes": [
        "0001"
      ],
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "UserData": "...",
      "SubnetId": "subnet-12345678",
      "PrivateIp": "10.0.0.4",
      "SecurityGroups": [
        {
          "SecurityGroupName": "security-group-example",
          "SecurityGroupId": "sg-12345678"
        }
      ],
      "BsuOptimized": false,
      "LaunchNumber": 0,
      "NetId": "vpc-12345678",
      "Nics": [
        {
          "SubnetId": "subnet-12345678",
          "State": "in-use",
          "LinkNic": {
            "State": "attached",
            "DeviceNumber": 0,
            "LinkNicId": "eni-attach-12345678",
            "DeleteOnVmDeletion": true
          },
          "IsSourceDestChecked": true,
          "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
          "Description": "Example NIC",
          "AccountId": "123456789012",
          "SecurityGroups": [
            {
              "SecurityGroupName": "security-group-example",
              "SecurityGroupId": "sg-12345678"
            }
          ],
          "MacAddress": "A1:B2:C3:D4:E5:F6",
          "NetId": "vpc-12345678",
          "NicId": "eni-12345678",
          "PrivateIps": [
            {
              "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
              "PrivateIp": "10.0.0.4",
              "IsPrimary": true
            }
          ]
        }
      ],
      "Performance": "high",
      "Tags": [],
      "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteVms

POST /DeleteVms

Terminates one or more virtual machines (VMs).
This operation is idempotent, that means that all calls succeed if you terminate a VM more than once.

Code samples

osc-cli api DeleteVms --profile "default" \
  --VmIds '["i-12345678"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmIds": ["i-12345678"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteVms(
    VmIds=["i-12345678"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmApi(config);

    const result = await api.deleteVms({
        deleteVmsRequest: {
            vmIds: ["i-12345678"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VmIds (required) [string] One or more IDs of VMs.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteVmsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Vms": [
    {
      "VmId": "i-12345678",
      "PreviousState": "running",
      "CurrentState": "shutting-down"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadAdminPassword

POST /ReadAdminPassword

Gets the administrator password for a Windows running virtual machine (VM).
The administrator password is encrypted using the keypair you specified when launching the VM.

[IMPORTANT]

  • Only RSA keypairs can decrypt the password of a Windows VM.
  • The administrator password is generated only on the first boot of the Windows VM. It is not returned after the first boot.

Code samples

osc-cli api ReadAdminPassword --profile "default" \
  --VmId "i-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadAdminPassword \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmId": "i-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadAdminPassword(
    VmId="i-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmApi(config);

    const result = await api.readAdminPassword({
        readAdminPasswordRequest: {
            vmId: "i-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VmId (required) string The ID of the VM.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadAdminPasswordResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "VmId": "i-12345678",
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "AdminPassword": "..."
}

ReadConsoleOutput

POST /ReadConsoleOutput

Gets the console output for a virtual machine (VM). This console provides the most recent 64 KiB output.

[IMPORTANT]
On Windows VMs, the console is handled only on the first boot. It returns no output after the first boot.

Code samples

osc-cli api ReadConsoleOutput --profile "default" \
  --VmId "i-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadConsoleOutput \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmId": "i-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadConsoleOutput(
    VmId="i-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmApi(config);

    const result = await api.readConsoleOutput({
        readConsoleOutputRequest: {
            vmId: "i-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VmId (required) string The ID of the VM.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadConsoleOutputResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "VmId": "i-12345678",
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ConsoleOutput": "..."
}

ReadVmTypes

POST /ReadVmTypes

Lists one or more predefined VM types.

Code samples

osc-cli api ReadVmTypes --profile "default" \
  --Filters '{
      "VmTypeNames": ["t2.small"],
    }'

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVmTypes \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "VmTypeNames": ["t2.small"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadVmTypes(
    Filters={
        "VmTypeNames": ["t2.small"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
    });
    const api = new osc.VmApi(config);

    const result = await api.readVmTypes({
        readVmTypesRequest: {
            filters: {
                vmTypeNames: ["t2.small"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersVmType One or more filters.
» BsuOptimized boolean This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.
» EphemeralsTypes [string] The types of ephemeral storage disk.
» Eths [integer] The number of Ethernet interfaces available.
» Gpus [integer] The number of GPUs available.
» MemorySizes [number] The amounts of memory, in gibibytes (GiB).
» VcoreCounts [integer] The numbers of vCores.
» VmTypeNames [string] The names of the VM types. For more information, see VM Types.
» VolumeCounts [integer] The maximum number of ephemeral storage disks.
» VolumeSizes [integer] The size of one ephemeral storage disk, in gibibytes (GiB).

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadVmTypesResponse

Example responses

{
  "VmTypes": [
    {
      "VolumeCount": 0,
      "VmTypeName": "t2.small",
      "BsuOptimized": false,
      "MaxPrivateIps": 4,
      "MemorySize": 2,
      "VcoreCount": 1
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadVms

POST /ReadVms

Lists one or more of your virtual machines (VMs).
If you provide one or more VM IDs, this action returns a description for all of these VMs. If you do not provide any VM ID, this action returns a description for all of the VMs that belong to you. If you provide an invalid VM ID, an error is returned. If you provide the ID of a VM that does not belong to you, the description of this VM is not included in the response. The refresh interval for data returned by this action is one hour, meaning that a terminated VM may appear in the response.

Code samples

osc-cli api ReadVms --profile "default" \
  --Filters '{
      "VmIds": ["i-12345678"],
    }'
osc-cli api ReadVms --profile "default" \
  --Filters '{
      "TagKeys": ["env"],
      "TagValues": ["prod", "test"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "VmIds": ["i-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "TagKeys": ["env"],
      "TagValues": ["prod", "test"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadVms(
    Filters={
        "VmIds": ["i-12345678"],
    },
)
print(result)

result = gw.ReadVms(
    Filters={
        "TagKeys": ["env"],
        "TagValues": ["prod","test"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmApi(config);

    const result = await api.readVms({
        readVmsRequest: {
            filters: {
                vmIds: ["i-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readVms({
        readVmsRequest: {
            filters: {
                tagKeys: ["env"],
                tagValues: ["prod", "test"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersVm One or more filters.
» Architectures [string] The architectures of the VMs (i386 | x86_64).
» BlockDeviceMappingDeleteOnVmDeletion boolean Whether the BSU volumes are deleted when terminating the VMs.
» BlockDeviceMappingDeviceNames [string] The device names for the BSU volumes (in the format /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX).
» BlockDeviceMappingLinkDates [string (date or date-time)] The link dates for the BSU volumes mapped to the VMs (for example, 2016-01-23T18:45:30.000Z).
» BlockDeviceMappingStates [string] The states for the BSU volumes (attaching | attached | detaching | detached).
» BlockDeviceMappingVolumeIds [string] The volume IDs of the BSU volumes.
» ClientTokens [string] The idempotency tokens provided when launching the VMs.
» CreationDates [string (date or date-time)] The dates when the VMs were launched.
» ImageIds [string] The IDs of the OMIs used to launch the VMs.
» IsSourceDestChecked boolean Whether the source/destination checking is enabled (true) or disabled (false).
» KeypairNames [string] The names of the keypairs used when launching the VMs.
» LaunchNumbers [integer] The numbers for the VMs when launching a group of several VMs (for example, 0, 1, 2, and so on).
» Lifecycles [string] Whether the VMs are Spot Instances (spot).
» NetIds [string] The IDs of the Nets in which the VMs are running.
» NicAccountIds [string] The IDs of the NICs.
» NicDescriptions [string] The descriptions of the NICs.
» NicIsSourceDestChecked boolean Whether the source/destination checking is enabled (true) or disabled (false).
» NicLinkNicDeleteOnVmDeletion boolean Whether the NICs are deleted when the VMs they are attached to are deleted.
» NicLinkNicDeviceNumbers [integer] The device numbers the NICs are attached to.
» NicLinkNicLinkNicDates [string (date or date-time)] The dates and times (UTC) when the NICs were attached to the VMs.
» NicLinkNicLinkNicIds [string] The IDs of the NIC attachments.
» NicLinkNicStates [string] The states of the attachments.
» NicLinkNicVmAccountIds [string] The account IDs of the owners of the VMs the NICs are attached to.
» NicLinkNicVmIds [string] The IDs of the VMs the NICs are attached to.
» NicLinkPublicIpAccountIds [string] The account IDs of the owners of the public IPs associated with the NICs.
» NicLinkPublicIpLinkPublicIpIds [string] The association IDs returned when the public IPs were associated with the NICs.
» NicLinkPublicIpPublicIpIds [string] The allocation IDs returned when the public IPs were allocated to their accounts.
» NicLinkPublicIpPublicIps [string] The public IPs associated with the NICs.
» NicMacAddresses [string] The Media Access Control (MAC) addresses of the NICs.
» NicNetIds [string] The IDs of the Nets where the NICs are located.
» NicNicIds [string] The IDs of the NICs.
» NicPrivateIpsLinkPublicIpAccountIds [string] The account IDs of the owner of the public IPs associated with the private IPs.
» NicPrivateIpsLinkPublicIpIds [string] The public IPs associated with the private IPs.
» NicPrivateIpsPrimaryIp boolean Whether the private IPs are the primary IPs associated with the NICs.
» NicPrivateIpsPrivateIps [string] The private IPs of the NICs.
» NicSecurityGroupIds [string] The IDs of the security groups associated with the NICs.
» NicSecurityGroupNames [string] The names of the security groups associated with the NICs.
» NicStates [string] The states of the NICs (available | in-use).
» NicSubnetIds [string] The IDs of the Subnets for the NICs.
» NicSubregionNames [string] The Subregions where the NICs are located.
» Platforms [string] The platforms. Use windows if you have Windows VMs. Otherwise, leave this filter blank.
» PrivateIps [string] The private IPs of the VMs.
» ProductCodes [string] The product codes associated with the OMI used to create the VMs.
» PublicIps [string] The public IPs of the VMs.
» ReservationIds [string] The IDs of the reservation of the VMs, created every time you launch VMs. These reservation IDs can be associated with several VMs when you lauch a group of VMs using the same launch request.
» RootDeviceNames [string] The names of the root devices for the VMs (for example, /dev/sda1)
» RootDeviceTypes [string] The root devices types used by the VMs (always ebs)
» SecurityGroupIds [string] The IDs of the security groups for the VMs (only in the public Cloud).
» SecurityGroupNames [string] The names of the security groups for the VMs (only in the public Cloud).
» StateReasonCodes [integer] The reason codes for the state changes.
» StateReasonMessages [string] The messages describing the state changes.
» StateReasons [string] The reasons explaining the current states of the VMs. This filter is like the StateReasonCodes one.
» SubnetIds [string] The IDs of the Subnets for the VMs.
» SubregionNames [string] The names of the Subregions of the VMs.
» TagKeys [string] The keys of the tags associated with the VMs.
» TagValues [string] The values of the tags associated with the VMs.
» Tags [string] The key/value combination of the tags associated with the VMs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» Tenancies [string] The tenancies of the VMs (dedicated | default | host).
» VmIds [string] One or more IDs of VMs.
» VmSecurityGroupIds [string] The IDs of the security groups for the VMs.
» VmSecurityGroupNames [string] The names of the security group for the VMs.
» VmStateCodes [integer] The state codes of the VMs: -1 (quarantine), 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).
» VmStateNames [string] The state names of the VMs (pending | running | stopping | stopped | shutting-down | terminated | quarantine).
» VmTypes [string] The VM types (for example, t2.micro). For more information, see VM Types.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadVmsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Vms": [
    {
      "VmType": "tinav5.c1r1p2",
      "VmInitiatedShutdownBehavior": "stop",
      "State": "running",
      "StateReason": "",
      "RootDeviceType": "ebs",
      "RootDeviceName": "/dev/sda1",
      "IsSourceDestChecked": true,
      "KeypairName": "keypair-example",
      "ImageId": "ami-12345678",
      "DeletionProtection": false,
      "Architecture": "x86_64",
      "NestedVirtualization": false,
      "BlockDeviceMappings": [
        {
          "DeviceName": "/dev/sda1",
          "Bsu": {
            "VolumeId": "vol-12345678",
            "State": "attached",
            "LinkDate": "2010-10-01T12:34:56.789Z",
            "DeleteOnVmDeletion": true
          }
        }
      ],
      "VmId": "i-12345678",
      "ReservationId": "r-12345678",
      "Hypervisor": "xen",
      "Placement": {
        "Tenancy": "default",
        "SubregionName": "eu-west-2a"
      },
      "ProductCodes": [
        "0001"
      ],
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "UserData": "",
      "SubnetId": "subnet-12345678",
      "PrivateIp": "10.0.0.4",
      "SecurityGroups": [
        {
          "SecurityGroupName": "security-group-example",
          "SecurityGroupId": "sg-12345678"
        }
      ],
      "BsuOptimized": false,
      "LaunchNumber": 0,
      "NetId": "vpc-12345678",
      "Nics": [
        {
          "SubnetId": "subnet-12345678",
          "State": "in-use",
          "LinkNic": {
            "State": "attached",
            "DeviceNumber": 0,
            "LinkNicId": "eni-attach-12345678",
            "DeleteOnVmDeletion": true
          },
          "IsSourceDestChecked": true,
          "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
          "Description": "Primary network interface",
          "AccountId": "123456789012",
          "SecurityGroups": [
            {
              "SecurityGroupName": "security-group-example",
              "SecurityGroupId": "sg-12345678"
            }
          ],
          "MacAddress": "A1:B2:C3:D4:E5:F6",
          "NetId": "vpc-12345678",
          "NicId": "eni-12345678",
          "PrivateIps": [
            {
              "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
              "PrivateIp": "10.0.0.4",
              "IsPrimary": true
            }
          ]
        }
      ],
      "Performance": "high",
      "Tags": [
        {
          "Value": "prod",
          "Key": "env"
        }
      ],
      "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadVmsState

POST /ReadVmsState

Lists the status of one or more virtual machines (VMs).

Code samples

osc-cli api ReadVmsState --profile "default" \
  --AllVms True
osc-cli api ReadVmsState --profile "default" \
  --Filters '{
      "SubregionNames": ["eu-west-2a"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVmsState \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AllVms": true
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVmsState \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "SubregionNames": ["eu-west-2a"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadVmsState(
    AllVms=True,
)
print(result)

result = gw.ReadVmsState(
    Filters={
        "SubregionNames": ["eu-west-2a"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmApi(config);

    const result = await api.readVmsState({
        readVmsStateRequest: {
            allVms: true,
        },
    });
    console.log(result);

    const result2 = await api.readVmsState({
        readVmsStateRequest: {
            filters: {
                subregionNames: ["eu-west-2a"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
AllVms boolean If true, includes the status of all VMs. By default or if set to false, only includes the status of running VMs.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersVmsState One or more filters.
» MaintenanceEventCodes [string] The code for the scheduled event (system-reboot | system-maintenance).
» MaintenanceEventDescriptions [string] The description of the scheduled event.
» MaintenanceEventsNotAfter [string] The latest date and time (UTC) the event can end.
» MaintenanceEventsNotBefore [string] The earliest date and time (UTC) the event can start.
» SubregionNames [string] The names of the Subregions of the VMs.
» VmIds [string] One or more IDs of VMs.
» VmStates [string] The states of the VMs (pending | running | stopping | stopped | shutting-down | terminated | quarantine).

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadVmsStateResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "VmStates": [
    {
      "VmId": "i-12345678",
      "VmState": "running",
      "SubregionName": "eu-west-2a",
      "MaintenanceEvents": []
    },
    {
      "VmId": "i-87654321",
      "VmState": "stopped",
      "SubregionName": "eu-west-2a",
      "MaintenanceEvents": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
{
  "VmStates": [
    {
      "VmId": "i-12345678",
      "VmState": "running",
      "SubregionName": "eu-west-2a",
      "MaintenanceEvents": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

RebootVms

POST /RebootVms

Reboots one or more virtual machines (VMs).
This operation sends a reboot request to one or more specified VMs. This is an asynchronous action that queues this reboot request. This action only reboots VMs that are valid and that belong to you.

Code samples

osc-cli api RebootVms --profile "default" \
  --VmIds '["i-12345678"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/RebootVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmIds": ["i-12345678"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.RebootVms(
    VmIds=["i-12345678"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmApi(config);

    const result = await api.rebootVms({
        rebootVmsRequest: {
            vmIds: ["i-12345678"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VmIds (required) [string] One or more IDs of the VMs you want to reboot.

Responses

Status Description Schema
200 The HTTP 200 response (OK). RebootVmsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

StartVms

POST /StartVms

Start one or more virtual machines (VMs).
You can start only VMs that are valid and that belong to you.

Code samples

osc-cli api StartVms --profile "default" \
  --VmIds '["i-12345678"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/StartVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmIds": ["i-12345678"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.StartVms(
    VmIds=["i-12345678"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmApi(config);

    const result = await api.startVms({
        startVmsRequest: {
            vmIds: ["i-12345678"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VmIds (required) [string] One or more IDs of VMs.

Responses

Status Description Schema
200 The HTTP 200 response (OK). StartVmsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Vms": [
    {
      "VmId": "i-12345678",
      "PreviousState": "stopped",
      "CurrentState": "pending"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

StopVms

POST /StopVms

Stops one or more running virtual machines (VMs).
You can stop only VMs that are valid and that belong to you. Data stored in the VM RAM is lost.

Code samples

osc-cli api StopVms --profile "default" \
  --VmIds '["i-12345678"]'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/StopVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmIds": ["i-12345678"]
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.StopVms(
    VmIds=["i-12345678"],
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmApi(config);

    const result = await api.stopVms({
        stopVmsRequest: {
            vmIds: ["i-12345678"],
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ForceStop boolean Forces the VM to stop.
VmIds (required) [string] One or more IDs of VMs.

Responses

Status Description Schema
200 The HTTP 200 response (OK). StopVmsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Vms": [
    {
      "VmId": "i-12345678",
      "PreviousState": "running",
      "CurrentState": "stopping"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateVm

POST /UpdateVm

Modifies the specified attributes of a virtual machine (VM).
You must stop the VM before modifying the following attributes:

  • NestedVirtualization
  • Performance
  • UserData
  • VmType

Code samples

osc-cli api UpdateVm --profile "default" \
  --VmId "i-12345678" \
  --VmType "tinav5.c2r2p2"
osc-cli api UpdateVm --profile "default" \
  --VmId "i-12345678" \
  --UserData "..."

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateVm \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmId": "i-12345678",
    "VmType": "tinav5.c2r2p2"
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateVm \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmId": "i-12345678",
    "UserData": "..."
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateVm(
    VmId="i-12345678",
    VmType="tinav5.c2r2p2",
)
print(result)

result = gw.UpdateVm(
    VmId="i-12345678",
    UserData="...",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmApi(config);

    const result = await api.updateVm({
        updateVmRequest: {
            vmId: "i-12345678",
            vmType: "tinav5.c2r2p2",
        },
    });
    console.log(result);

    const result2 = await api.updateVm({
        updateVmRequest: {
            vmId: "i-12345678",
            userData: "...",
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
BlockDeviceMappings [BlockDeviceMappingVmUpdate] One or more block device mappings of the VM.
» Bsu BsuToUpdateVm Information about the BSU volume.
»» DeleteOnVmDeletion boolean If set to true, the volume is deleted when terminating the VM. If set to false, the volume is not deleted when terminating the VM.
»» VolumeId string The ID of the volume.
» DeviceName string The device name for the volume. For a root device, you must use /dev/sda1. For other volumes, you must use /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX (where the first X is a letter between b and z, and the second X is a letter between a and z).
» NoDevice string Removes the device which is included in the block device mapping of the OMI.
» VirtualDeviceName string The name of the virtual device (ephemeralN).
BsuOptimized boolean This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.
DeletionProtection boolean If true, you cannot delete the VM unless you change this parameter back to false.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
IsSourceDestChecked boolean (Net only) If true, the source/destination check is enabled. If false, it is disabled. This value must be false for a NAT VM to perform network address translation (NAT) in a Net.
KeypairName string The name of a keypair you want to associate with the VM.
When you replace the keypair of a VM with another one, the metadata of the VM is modified to reflect the new public key, but the replacement is still not effective in the operating system of the VM. To complete the replacement and effectively apply the new keypair, you need to perform other actions inside the VM. For more information, see Modifying the Keypair of a VM.
NestedVirtualization boolean (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is disabled.
Performance string The performance of the VM (medium | high | highest).
SecurityGroupIds [string] One or more IDs of security groups for the VM.
UserData string The Base64-encoded MIME user data, limited to 500 kibibytes (KiB).
VmId (required) string The ID of the VM.
VmInitiatedShutdownBehavior string The VM behavior when you stop it. If set to stop, the VM stops. If set to restart, the VM stops then automatically restarts. If set to terminate, the VM stops and is terminated.
VmType string The type of VM. For more information, see VM Types.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateVmResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Vm": {
    "VmType": "tinav5.c2r2p2",
    "VmInitiatedShutdownBehavior": "stop",
    "State": "stopped",
    "StateReason": "",
    "RootDeviceType": "ebs",
    "RootDeviceName": "/dev/sda1",
    "IsSourceDestChecked": true,
    "KeypairName": "keypair-example",
    "ImageId": "ami-12345678",
    "DeletionProtection": false,
    "Architecture": "x86_64",
    "NestedVirtualization": false,
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeId": "vol-12345678",
          "State": "attached",
          "LinkDate": "2010-10-01T12:34:56.789Z",
          "DeleteOnVmDeletion": true
        }
      }
    ],
    "VmId": "i-12345678",
    "ReservationId": "r-12345678",
    "Hypervisor": "xen",
    "Placement": {
      "Tenancy": "default",
      "SubregionName": "eu-west-2a"
    },
    "ProductCodes": [
      "0001"
    ],
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "UserData": "",
    "SubnetId": "subnet-12345678",
    "PrivateIp": "10.0.0.4",
    "SecurityGroups": [
      {
        "SecurityGroupName": "security-group-example",
        "SecurityGroupId": "sg-12345678"
      }
    ],
    "BsuOptimized": false,
    "LaunchNumber": 0,
    "NetId": "vpc-12345678",
    "Nics": [
      {
        "SubnetId": "subnet-12345678",
        "State": "in-use",
        "LinkNic": {
          "State": "attached",
          "DeviceNumber": 0,
          "LinkNicId": "eni-attach-12345678",
          "DeleteOnVmDeletion": true
        },
        "IsSourceDestChecked": true,
        "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
        "Description": "Primary network interface",
        "AccountId": "123456789012",
        "SecurityGroups": [
          {
            "SecurityGroupName": "security-group-example",
            "SecurityGroupId": "sg-12345678"
          }
        ],
        "MacAddress": "A1:B2:C3:D4:E5:F6",
        "NetId": "vpc-12345678",
        "NicId": "eni-12345678",
        "PrivateIps": [
          {
            "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
            "PrivateIp": "10.0.0.4",
            "IsPrimary": true
          }
        ]
      }
    ],
    "Performance": "high",
    "Tags": [
      {
        "Value": "prod",
        "Key": "env"
      }
    ],
    "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
{
  "Vm": {
    "VmType": "tinav5.c1r1p2",
    "VmInitiatedShutdownBehavior": "stop",
    "State": "stopped",
    "StateReason": "",
    "RootDeviceType": "ebs",
    "RootDeviceName": "/dev/sda1",
    "IsSourceDestChecked": true,
    "KeypairName": "keypair-example",
    "ImageId": "ami-12345678",
    "DeletionProtection": true,
    "Architecture": "x86_64",
    "NestedVirtualization": false,
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Bsu": {
          "VolumeId": "vol-12345678",
          "State": "attached",
          "LinkDate": "2010-10-01T12:34:56.789Z",
          "DeleteOnVmDeletion": true
        }
      }
    ],
    "VmId": "i-12345678",
    "ReservationId": "r-12345678",
    "Hypervisor": "xen",
    "Placement": {
      "Tenancy": "default",
      "SubregionName": "eu-west-2a"
    },
    "ProductCodes": [
      "0001"
    ],
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "UserData": "...",
    "SubnetId": "subnet-12345678",
    "PrivateIp": "10.0.0.4",
    "SecurityGroups": [
      {
        "SecurityGroupName": "security-group-example",
        "SecurityGroupId": "sg-12345678"
      }
    ],
    "BsuOptimized": false,
    "LaunchNumber": 0,
    "NetId": "vpc-12345678",
    "Nics": [
      {
        "SubnetId": "subnet-12345678",
        "State": "in-use",
        "LinkNic": {
          "State": "attached",
          "DeviceNumber": 0,
          "LinkNicId": "eni-attach-12345678",
          "DeleteOnVmDeletion": true
        },
        "IsSourceDestChecked": true,
        "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
        "Description": "Primary network interface",
        "AccountId": "123456789012",
        "SecurityGroups": [
          {
            "SecurityGroupName": "security-group-example",
            "SecurityGroupId": "sg-12345678"
          }
        ],
        "MacAddress": "A1:B2:C3:D4:E5:F6",
        "NetId": "vpc-12345678",
        "NicId": "eni-12345678",
        "PrivateIps": [
          {
            "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal",
            "PrivateIp": "10.0.0.4",
            "IsPrimary": true
          }
        ]
      }
    ],
    "Performance": "high",
    "Tags": [
      {
        "Value": "prod",
        "Key": "env"
      }
    ],
    "PrivateDnsName": "ip-10-0-0-4.eu-west-2.compute.internal"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

VmGroup

CreateVmGroup

POST /CreateVmGroup

[WARNING]
This feature is currently under development and may not function properly.

Creates a group of virtual machines (VMs) containing the same characteristics as a specified VM template, and then launches them.
You can create up to 100 VM groups in your account.

Code samples

osc-cli api CreateVmGroup --profile "default" \
  --Description "Production log collector" \
  --PositioningStrategy "attract" \
  --SecurityGroupIds '["sg-12345678"]' \
  --SubnetId "subnet-12345678" \
  --Tags '[
      {
        "Key": "key1",
        "Value": "value1",
      },
    ]' \
  --VmCount 2 \
  --VmGroupName "ClusterLog-PPD01" \
  --VmTemplateId "vmtemplate-98765432109876543210987654321012"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVmGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Description": "Production log collector",
    "PositioningStrategy": "attract",
    "SecurityGroupIds": ["sg-12345678"],
    "SubnetId": "subnet-12345678",
    "Tags": [
      {
        "Key": "key1",
        "Value": "value1"
      }
    ],
    "VmCount": 2,
    "VmGroupName": "ClusterLog-PPD01",
    "VmTemplateId": "vmtemplate-98765432109876543210987654321012"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateVmGroup(
    Description="Production log collector",
    PositioningStrategy="attract",
    SecurityGroupIds=["sg-12345678"],
    SubnetId="subnet-12345678",
    Tags=[
        {
            "Key": "key1",
            "Value": "value1",
        },
    ],
    VmCount=2,
    VmGroupName="ClusterLog-PPD01",
    VmTemplateId="vmtemplate-98765432109876543210987654321012",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmGroupApi(config);

    const result = await api.createVmGroup({
        createVmGroupRequest: {
            description: "Production log collector",
            positioningStrategy: "attract",
            securityGroupIds: ["sg-12345678"],
            subnetId: "subnet-12345678",
            tags: [
                {
                    key: "key1",
                    value: "value1",
                },
            ],
            vmCount: 2,
            vmGroupName: "ClusterLog-PPD01",
            vmTemplateId: "vmtemplate-98765432109876543210987654321012",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
Description string A description for the VM group.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
PositioningStrategy string The positioning strategy of VMs on hypervisors. By default, or if set to no-strategy our orchestrator determines the most adequate position for your VMs. If set to attract, your VMs are deployed on the same hypervisor, which improves network performance. If set to repulse, your VMs are deployed on a different hypervisor, which improves fault tolerance.
SecurityGroupIds (required) [string] One or more IDs of security groups for the VM group.
SubnetId (required) string The ID of the Subnet in which you want to create the VM group.
Tags [ResourceTag] One or more tags to add to the VM group.
» Key (required) string The key of the tag, with a minimum of 1 character.
» Value (required) string The value of the tag, between 0 and 255 characters.
VmCount (required) integer The number of VMs deployed in the VM group.
VmGroupName (required) string The name of the VM group.
VmTemplateId (required) string The ID of the VM template used to launch VMs in the VM group.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateVmGroupResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "VmGroup": {
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "Description": "Production log collector",
    "PositioningStrategy": "attract",
    "SecurityGroupIds": [
      "sg-12345678"
    ],
    "State": "available",
    "SubnetId": "subnet-12345678",
    "Tags": [
      {
        "Key": "key1",
        "Value": "value1"
      }
    ],
    "VmCount": 2,
    "VmGroupId": "vmgroup-12345678901234567890123456789012",
    "VmGroupName": "ClusterLog-PPD01",
    "VmIds": [],
    "VmTemplateId": "vmtemplate-98765432109876543210987654321012"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteVmGroup

POST /DeleteVmGroup

[WARNING]
This feature is currently under development and may not function properly.

Deletes a specified VM group.

Code samples

osc-cli api DeleteVmGroup --profile "default" \
  --VmGroupId "vmgroup-12345678901234567890123456789012"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteVmGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmGroupId": "vmgroup-12345678901234567890123456789012"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteVmGroup(
    VmGroupId="vmgroup-12345678901234567890123456789012",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmGroupApi(config);

    const result = await api.deleteVmGroup({
        deleteVmGroupRequest: {
            vmGroupId: "vmgroup-12345678901234567890123456789012",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VmGroupId (required) string The ID of the VM group you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteVmGroupResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadVmGroups

POST /ReadVmGroups

[WARNING]
This feature is currently under development and may not function properly.

Lists one or more group of virtual machines (VMs).

Code samples

osc-cli api ReadVmGroups --profile "default" \
  --Filters '{
      "VmGroupIds": ["vmgroup-12345678901234567890123456789012"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVmGroups \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "VmGroupIds": ["vmgroup-12345678901234567890123456789012"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadVmGroups(
    Filters={
        "VmGroupIds": ["vmgroup-12345678901234567890123456789012"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmGroupApi(config);

    const result = await api.readVmGroups({
        readVmGroupsRequest: {
            filters: {
                vmGroupIds: ["vmgroup-12345678901234567890123456789012"],
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersVmGroup One or more filters.
» Descriptions [string] The descriptions of the VM groups.
» SecurityGroupIds [string] The IDs of the security groups.
» SubnetIds [string] The IDs of the Subnets.
» TagKeys [string] The keys of the tags associated with the VM groups.
» TagValues [string] The values of the tags associated with the VM groups.
» Tags [string] The key/value combination of the tags associated with the VMs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» VmCounts [integer] The number of VMs in the VM group.
» VmGroupIds [string] The IDs of the VM groups.
» VmGroupNames [string] The names of the VM groups.
» VmTemplateIds [string] The IDs of the VM templates.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadVmGroupsResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "VmGroups": [
    {
      "SecurityGroupIds": [
        "sg-87654321"
      ],
      "VmIds": [
        "i-12345678"
      ],
      "CreationDate": "2010-10-01T12:34:56.789+0000",
      "VmCount": 1,
      "VmGroupName": "ClusterLog-PPD01",
      "SubnetId": "subnet-12345678",
      "PositioningStrategy": "attract",
      "State": "available",
      "VmGroupId": "vmgroup-12345678901234567890123456789012",
      "Tags": [
        {
          "Value": "value1",
          "Key": "key1"
        }
      ]
    }
  ]
}

ScaleDownVmGroup

POST /ScaleDownVmGroup

[WARNING]
This feature is currently under development and may not function properly.

Deletes virtual machines (VMs) from a VM group.
The oldest VMs are the first to be deleted.

Code samples

# Removing 1 VM from a VM group

osc-cli api ScaleDownVmGroup --profile "default" \
  --VmGroupId "vmgroup-12345678901234567890123456789012" \
  --VmSubtraction 1

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Removing 1 VM from a VM group

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ScaleDownVmGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmGroupId": "vmgroup-12345678901234567890123456789012",
    "VmSubtraction": 1
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Removing 1 VM from a VM group
result = gw.ScaleDownVmGroup(
    VmGroupId="vmgroup-12345678901234567890123456789012",
    VmSubtraction=1,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmGroupApi(config);

    /* Removing 1 VM from a VM group */
    const result = await api.scaleDownVmGroup({
        scaleDownVmGroupRequest: {
            vmGroupId: "vmgroup-12345678901234567890123456789012",
            vmSubtraction: 1,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VmGroupId (required) string The ID of the VM group you want to scale down.
VmSubtraction (required) integer The number of VMs you want to delete from the VM group.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ScaleDownVmGroupResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ScaleUpVmGroup

POST /ScaleUpVmGroup

[WARNING]
This feature is currently under development and may not function properly.

Creates additional virtual machines (VMs) in a VM group.
The new VMs use the current version of the VM template.

Code samples

# Adding 2 VMs in a VM group

osc-cli api ScaleUpVmGroup --profile "default" \
  --VmGroupId "vmgroup-12345678901234567890123456789012" \
  --VmAddition 2

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Adding 2 VMs in a VM group

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ScaleUpVmGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmGroupId": "vmgroup-12345678901234567890123456789012",
    "VmAddition": 2
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Adding 2 VMs in a VM group
result = gw.ScaleUpVmGroup(
    VmGroupId="vmgroup-12345678901234567890123456789012",
    VmAddition=2,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmGroupApi(config);

    /* Adding 2 VMs in a VM group */
    const result = await api.scaleUpVmGroup({
        scaleUpVmGroupRequest: {
            vmGroupId: "vmgroup-12345678901234567890123456789012",
            vmAddition: 2,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VmAddition (required) integer The number of VMs you want to add to the VM group.
VmGroupId (required) string The ID of the VM group you want to scale up.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ScaleUpVmGroupResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateVmGroup

POST /UpdateVmGroup

[WARNING]
This feature is currently under development and may not function properly.

Modifies the specified attributes of a group of virtual machines (VMs).

Code samples

# Updating the name and description of a VM group

osc-cli api UpdateVmGroup --profile "default" \
  --VmGroupId "vmgroup-12345678901234567890123456789012" \
  --VmGroupName "new-name" \
  --Description "New description of the VM group"
# Updating the VM template of a VM group

osc-cli api UpdateVmGroup --profile "default" \
  --VmGroupId "vmgroup-12345678901234567890123456789012" \
  --VmTemplateId "vmtemplate-98765432109876543210987654321012"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Updating the name and description of a VM group

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateVmGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmGroupId": "vmgroup-12345678901234567890123456789012",
    "VmGroupName": "new-name",
    "Description": "New description of the VM group"
  }'
# Updating the VM template of a VM group

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateVmGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmGroupId": "vmgroup-12345678901234567890123456789012",
    "VmTemplateId": "vmtemplate-98765432109876543210987654321012"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Updating the name and description of a VM group
result = gw.UpdateVmGroup(
    VmGroupId="vmgroup-12345678901234567890123456789012",
    VmGroupName="new-name",
    Description="New description of the VM group",
)
print(result)

# Updating the VM template of a VM group
result = gw.UpdateVmGroup(
    VmGroupId="vmgroup-12345678901234567890123456789012",
    VmTemplateId="vmtemplate-98765432109876543210987654321012",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmGroupApi(config);

    /* Updating the name and description of a VM group */
    const result = await api.updateVmGroup({
        updateVmGroupRequest: {
            vmGroupId: "vmgroup-12345678901234567890123456789012",
            vmGroupName: "new-name",
            description: "New description of the VM group",
        },
    });
    console.log(result);

    /* Updating the VM template of a VM group */
    const result2 = await api.updateVmGroup({
        updateVmGroupRequest: {
            vmGroupId: "vmgroup-12345678901234567890123456789012",
            vmTemplateId: "vmtemplate-98765432109876543210987654321012",
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
Description string A new description for the VM group.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Tags [ResourceTag] New tags for your VM group.
» Key (required) string The key of the tag, with a minimum of 1 character.
» Value (required) string The value of the tag, between 0 and 255 characters.
VmGroupId (required) string The ID of the VM group you want to update.
VmGroupName string A new name for your VM group.
VmTemplateId string A new VM template ID for your VM group.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateVmGroupResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "VmGroup": {
    "VmTemplateId": "vmtemplate-98765432109876543210987654321012",
    "SecurityGroupIds": [
      "sg-12345678"
    ],
    "VmIds": [],
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "VmCount": 2,
    "VmGroupName": "new-name",
    "SubnetId": "subnet-12345678",
    "PositioningStrategy": "attract",
    "State": "available",
    "VmGroupId": "vmgroup-12345678901234567890123456789012",
    "Description": "New description of the VM group",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

VmTemplate

CreateVmTemplate

POST /CreateVmTemplate

[WARNING]
This feature is currently under development and may not function properly.

Creates a virtual machine (VM) template. You can then use the VM template to create VM groups.
You can create up to 50 VM templates in your account.

Code samples

osc-cli api CreateVmTemplate --profile "default" \
  --CpuCores 2 \
  --CpuGeneration "v4" \
  --CpuPerformance "high" \
  --Description "Log collector template" \
  --ImageId "ami-12345678" \
  --KeypairName "keypair-example" \
  --Ram 2 \
  --Tags '[
      {
        "Key": "key1",
        "Value": "value1",
      },
    ]' \
  --VmTemplateName "vmtemplate-example"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVmTemplate \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "CpuCores": 2,
    "CpuGeneration": "v4",
    "CpuPerformance": "high",
    "Description": "Log collector template",
    "ImageId": "ami-12345678",
    "KeypairName": "keypair-example",
    "Ram": 2,
    "Tags": [
      {
        "Key": "key1",
        "Value": "value1"
      }
    ],
    "VmTemplateName": "vmtemplate-example"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateVmTemplate(
    CpuCores=2,
    CpuGeneration="v4",
    CpuPerformance="high",
    Description="Log collector template",
    ImageId="ami-12345678",
    KeypairName="keypair-example",
    Ram=2,
    Tags=[
        {
            "Key": "key1",
            "Value": "value1",
        },
    ],
    VmTemplateName="vmtemplate-example",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmTemplateApi(config);

    const result = await api.createVmTemplate({
        createVmTemplateRequest: {
            cpuCores: 2,
            cpuGeneration: "v4",
            cpuPerformance: "high",
            description: "Log collector template",
            imageId: "ami-12345678",
            keypairName: "keypair-example",
            ram: 2,
            tags: [
                {
                    key: "key1",
                    value: "value1",
                },
            ],
            vmTemplateName: "vmtemplate-example",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
CpuCores (required) integer The number of vCores to use for each VM.
CpuGeneration (required) string The processor generation to use for each VM (for example, v4).
CpuPerformance string The performance of the VMs (medium | high | highest).
Description string A description for the VM template.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ImageId (required) string The ID of the OMI to use for each VM. You can find a list of OMIs by calling the ReadImages method.
KeypairName string The name of the keypair to use for each VM.
Ram (required) integer The amount of RAM to use for each VM.
Tags [ResourceTag] One or more tags to add to the VM template.
» Key (required) string The key of the tag, with a minimum of 1 character.
» Value (required) string The value of the tag, between 0 and 255 characters.
VmTemplateName (required) string The name of the VM template.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateVmTemplateResponse

Example responses

{
  "VmTemplate": {
    "VmTemplateName": "vmtemplate-example",
    "CpuPerformance": "high",
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "CpuCores": 2,
    "Tags": [
      {
        "Key": "key1",
        "Value": "value1"
      }
    ],
    "Description": "Log collector template",
    "ImageId": "ami-12345678",
    "CpuGeneration": "v4",
    "VmTemplateId": "vmtemplate-98765432109876543210987654321012",
    "Ram": 2
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteVmTemplate

POST /DeleteVmTemplate

[WARNING]
This feature is currently under development and may not function properly.

Deletes a virtual machine (VM) template.
You cannot delete a template currently used by a VM group.

Code samples

osc-cli api DeleteVmTemplate --profile "default" \
  --VmTemplateId "vmtemplate-98765432109876543210987654321012"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteVmTemplate \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VmTemplateId": "vmtemplate-98765432109876543210987654321012"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteVmTemplate(
    VmTemplateId="vmtemplate-98765432109876543210987654321012",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmTemplateApi(config);

    const result = await api.deleteVmTemplate({
        deleteVmTemplateRequest: {
            vmTemplateId: "vmtemplate-98765432109876543210987654321012",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VmTemplateId (required) string The ID of the VM template you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteVmTemplateResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadVmTemplates

POST /ReadVmTemplates

[WARNING]
This feature is currently under development and may not function properly.

Lists one or more virtual machine (VM) templates.

Code samples

osc-cli api ReadVmTemplates --profile "default" \
  --Filters '{
      "VmTemplateNames": ["vmtemplate-example"],
    }'
osc-cli api ReadVmTemplates --profile "default" \
  --Filters '{
      "CpuCores": [2],
      "CpuGenerations": ["v4"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVmTemplates \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "VmTemplateNames": ["vmtemplate-example"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVmTemplates \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "CpuCores": [2],
      "CpuGenerations": ["v4"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadVmTemplates(
    Filters={
        "VmTemplateNames": ["vmtemplate-example"],
    },
)
print(result)

result = gw.ReadVmTemplates(
    Filters={
        "CpuCores": [2],
        "CpuGenerations": ["v4"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmTemplateApi(config);

    const result = await api.readVmTemplates({
        readVmTemplatesRequest: {
            filters: {
                vmTemplateNames: ["vmtemplate-example"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readVmTemplates({
        readVmTemplatesRequest: {
            filters: {
                cpuCores: [2],
                cpuGenerations: ["v4"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersVmTemplate none
» CpuCores [integer] The number of vCores.
» CpuGenerations [string] The processor generations (for example, v4).
» CpuPerformances [string] The performances of the VMs.
» Descriptions [string] The descriptions of the VM templates.
» ImageIds [string] The IDs of the OMIs.
» KeypairNames [string] The names of the keypairs.
» Rams [integer] The amount of RAM.
» TagKeys [string] The keys of the tags associated with the VM templates.
» TagValues [string] The values of the tags associated with the VM templates.
» Tags [string] The key/value combination of the tags associated with the VM templates, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» VmTemplateIds [string] The IDs of the VM templates.
» VmTemplateNames [string] The names of the VM templates.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadVmTemplatesResponse

Example responses

{
  "VmTemplates": [
    {
      "VmTemplateName": "vmtemplate-example",
      "CpuPerformance": "high",
      "CreationDate": "2010-10-01T12:34:56.789+0000",
      "CpuCores": 2,
      "Tags": [],
      "Description": "",
      "ImageId": "ami-12345678",
      "CpuGeneration": "v4",
      "VmTemplateId": "vmtemplate-98765432109876543210987654321012",
      "Ram": 2
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateVmTemplate

POST /UpdateVmTemplate

[WARNING]
This feature is currently under development and may not function properly.

Modifies the specified attributes of a template of virtual machines (VMs).

Code samples

osc-cli api UpdateVmTemplate --profile "default" \
  --Description "The new description of the VM template" \
  --VmTemplateId "vmtemplate-98765432109876543210987654321012" \
  --VmTemplateName "second-name"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateVmTemplate \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Description": "The new description of the VM template",
    "VmTemplateId": "vmtemplate-98765432109876543210987654321012",
    "VmTemplateName": "second-name"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateVmTemplate(
    Description="The new description of the VM template",
    VmTemplateId="vmtemplate-98765432109876543210987654321012",
    VmTemplateName="second-name",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VmTemplateApi(config);

    const result = await api.updateVmTemplate({
        updateVmTemplateRequest: {
            description: "The new description of the VM template",
            vmTemplateId: "vmtemplate-98765432109876543210987654321012",
            vmTemplateName: "second-name",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
Description string A new description for the VM template.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Tags [ResourceTag] New tags for your VM template.
» Key (required) string The key of the tag, with a minimum of 1 character.
» Value (required) string The value of the tag, between 0 and 255 characters.
VmTemplateId (required) string The ID of the VM template you want to update.
VmTemplateName string A new name for your VM template.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateVmTemplateResponse

Example responses

{
  "VmTemplate": {
    "VmTemplateName": "second-name",
    "CpuPerformance": "high",
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "CpuCores": 2,
    "Tags": [],
    "Description": "The new description of the VM template",
    "ImageId": "ami-12345678",
    "CpuGeneration": "v4",
    "VmTemplateId": "vmtemplate-98765432109876543210987654321012",
    "Ram": 2
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Volume

CreateVolume

POST /CreateVolume

Creates a Block Storage Unit (BSU) volume in a specified Region.
BSU volumes can be attached to a virtual machine (VM) in the same Subregion. You can create an empty volume or restore a volume from an existing snapshot.
You can create the following volume types: Enterprise (io1) for provisioned IOPS SSD volumes, Performance (gp2) for general purpose SSD volumes, or Magnetic (standard) volumes.

For more information, see About Volumes.

Code samples

# Creating an io1 volume

osc-cli api CreateVolume --profile "default" \
  --VolumeType "io1" \
  --SubregionName "eu-west-2a" \
  --Size 10 \
  --Iops 100
# Creating a volume from a snapshot

osc-cli api CreateVolume --profile "default" \
  --SnapshotId "snap-12345678" \
  --VolumeType "gp2" \
  --SubregionName "eu-west-2a" \
  --Size 10

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Creating an io1 volume

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVolume \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VolumeType": "io1",
    "SubregionName": "eu-west-2a",
    "Size": 10,
    "Iops": 100
  }'
# Creating a volume from a snapshot

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVolume \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "SnapshotId": "snap-12345678",
    "VolumeType": "gp2",
    "SubregionName": "eu-west-2a",
    "Size": 10
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Creating an io1 volume
result = gw.CreateVolume(
    VolumeType="io1",
    SubregionName="eu-west-2a",
    Size=10,
    Iops=100,
)
print(result)

# Creating a volume from a snapshot
result = gw.CreateVolume(
    SnapshotId="snap-12345678",
    VolumeType="gp2",
    SubregionName="eu-west-2a",
    Size=10,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VolumeApi(config);

    /* Creating an io1 volume */
    const result = await api.createVolume({
        createVolumeRequest: {
            volumeType: "io1",
            subregionName: "eu-west-2a",
            size: 10,
            iops: 100,
        },
    });
    console.log(result);

    /* Creating a volume from a snapshot */
    const result2 = await api.createVolume({
        createVolumeRequest: {
            snapshotId: "snap-12345678",
            volumeType: "gp2",
            subregionName: "eu-west-2a",
            size: 10,
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Iops integer The number of I/O operations per second (IOPS). This parameter must be specified only if you create an io1 volume. The maximum number of IOPS allowed for io1 volumes is 13000 with a maximum performance ratio of 300 IOPS per gibibyte.
Size integer The size of the volume, in gibibytes (GiB). The maximum allowed size for a volume is 14901 GiB. This parameter is required if the volume is not created from a snapshot (SnapshotId unspecified).
SnapshotId string The ID of the snapshot from which you want to create the volume.
SubregionName (required) string The Subregion in which you want to create the volume.
VolumeType string The type of volume you want to create (io1 | gp2 | standard). If not specified, a standard volume is created.
For more information about volume types, see About Volumes > Volume Types and IOPS.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateVolumeResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Creating an io1 volume
{
  "Volume": {
    "VolumeId": "vol-12345678",
    "Tags": [],
    "VolumeType": "io1",
    "SubregionName": "eu-west-2a",
    "State": "creating",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "Iops": 100,
    "LinkedVolumes": [],
    "Size": 10
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Creating a volume from a snapshot
{
  "Volume": {
    "VolumeId": "vol-12345678",
    "Tags": [],
    "VolumeType": "gp2",
    "SubregionName": "eu-west-2a",
    "State": "creating",
    "SnapshotId": "snap-12345678",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "Iops": 100,
    "LinkedVolumes": [],
    "Size": 10
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteVolume

POST /DeleteVolume

Deletes a specified Block Storage Unit (BSU) volume.
You can delete available volumes only, that is, volumes that are not attached to a virtual machine (VM).

Code samples

osc-cli api DeleteVolume --profile "default" \
  --VolumeId "vol-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteVolume \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VolumeId": "vol-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteVolume(
    VolumeId="vol-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VolumeApi(config);

    const result = await api.deleteVolume({
        deleteVolumeRequest: {
            volumeId: "vol-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VolumeId (required) string The ID of the volume you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteVolumeResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

LinkVolume

POST /LinkVolume

Attaches a Block Storage Unit (BSU) volume to a virtual machine (VM).
The volume and the VM must be in the same Subregion. The VM can be running or stopped. The volume is attached to the specified VM device.

Code samples

osc-cli api LinkVolume --profile "default" \
  --VolumeId "vol-12345678" \
  --VmId "i-12345678" \
  --DeviceName "/dev/sdb"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkVolume \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VolumeId": "vol-12345678",
    "VmId": "i-12345678",
    "DeviceName": "/dev/sdb"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.LinkVolume(
    VolumeId="vol-12345678",
    VmId="i-12345678",
    DeviceName="/dev/sdb",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VolumeApi(config);

    const result = await api.linkVolume({
        linkVolumeRequest: {
            volumeId: "vol-12345678",
            vmId: "i-12345678",
            deviceName: "/dev/sdb",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DeviceName (required) string The name of the device. For a root device, you must use /dev/sda1. For other volumes, you must use /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX (where the first X is a letter between b and z, and the second X is a letter between a and z).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VmId (required) string The ID of the VM you want to attach the volume to.
VolumeId (required) string The ID of the volume you want to attach.

Responses

Status Description Schema
200 The HTTP 200 response (OK). LinkVolumeResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadVolumes

POST /ReadVolumes

Lists one or more specified Block Storage Unit (BSU) volumes.

Code samples

osc-cli api ReadVolumes --profile "default" \
  --Filters '{
      "VolumeIds": ["vol-12345678"],
    }'
osc-cli api ReadVolumes --profile "default" \
  --Filters '{
      "VolumeStates": ["in-use"],
      "VolumeTypes": ["gp2", "io1"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVolumes \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "VolumeIds": ["vol-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVolumes \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "VolumeStates": ["in-use"],
      "VolumeTypes": ["gp2", "io1"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadVolumes(
    Filters={
        "VolumeIds": ["vol-12345678"],
    },
)
print(result)

result = gw.ReadVolumes(
    Filters={
        "VolumeStates": ["in-use"],
        "VolumeTypes": ["gp2","io1"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VolumeApi(config);

    const result = await api.readVolumes({
        readVolumesRequest: {
            filters: {
                volumeIds: ["vol-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readVolumes({
        readVolumesRequest: {
            filters: {
                volumeStates: ["in-use"],
                volumeTypes: ["gp2", "io1"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersVolume One or more filters.
» CreationDates [string] The dates and times of creation of the volumes, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).
» LinkVolumeDeleteOnVmDeletion boolean Whether the volumes are deleted or not when terminating the VMs.
» LinkVolumeDeviceNames [string] The VM device names.
» LinkVolumeLinkDates [string] The dates and times of creation of the volumes, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).
» LinkVolumeLinkStates [string] The attachment states of the volumes (attaching | detaching | attached | detached).
» LinkVolumeVmIds [string] One or more IDs of VMs.
» SnapshotIds [string] The snapshots from which the volumes were created.
» SubregionNames [string] The names of the Subregions in which the volumes were created.
» TagKeys [string] The keys of the tags associated with the volumes.
» TagValues [string] The values of the tags associated with the volumes.
» Tags [string] The key/value combination of the tags associated with the volumes, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» VolumeIds [string] The IDs of the volumes.
» VolumeSizes [integer] The sizes of the volumes, in gibibytes (GiB).
» VolumeStates [string] The states of the volumes (creating | available | in-use | updating | deleting | error).
» VolumeTypes [string] The types of the volumes (standard | gp2 | io1).
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadVolumesResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "Volumes": [
    {
      "VolumeId": "vol-12345678",
      "Tags": [],
      "VolumeType": "gp2",
      "SubregionName": "eu-west-2a",
      "State": "in-use",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "Iops": 100,
      "LinkedVolumes": [
        {
          "VolumeId": "vol-12345678",
          "DeleteOnVmDeletion": false,
          "DeviceName": "/dev/sdb",
          "State": "attached",
          "VmId": "i-12345678"
        }
      ],
      "Size": 10
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UnlinkVolume

POST /UnlinkVolume

Detaches a Block Storage Unit (BSU) volume from a virtual machine (VM).
To detach the root device of a VM, this VM must be stopped.

Code samples

osc-cli api UnlinkVolume --profile "default" \
  --VolumeId "vol-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkVolume \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VolumeId": "vol-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UnlinkVolume(
    VolumeId="vol-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VolumeApi(config);

    const result = await api.unlinkVolume({
        unlinkVolumeRequest: {
            volumeId: "vol-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
ForceUnlink boolean Forces the detachment of the volume in case of previous failure. Important: This action may damage your data or file systems.
VolumeId (required) string The ID of the volume you want to detach.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UnlinkVolumeResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateVolume

POST /UpdateVolume

Modifies the specified attributes of a volume.
Cold volumes are volumes that are attached to stopped or stopping VMs, or that are detached. Hot volumes are volumes that are attached to running VMs.

[NOTE]
When the modification is not instantaneous, the response displays the previous value. You can use the ReadVolumes method to see the new value.

Code samples

# Updating the size of a volume

osc-cli api UpdateVolume --profile "default" \
  --VolumeId "vol-12345678" \
  --Size 50
# Updating the type of a volume to io1

osc-cli api UpdateVolume --profile "default" \
  --VolumeId "vol-12345678" \
  --VolumeType "io1" \
  --Iops 200

# You need Curl version 7.75 or later to use the --aws-sigv4 option

# Updating the size of a volume

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateVolume \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VolumeId": "vol-12345678",
    "Size": 50
  }'
# Updating the type of a volume to io1

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateVolume \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VolumeId": "vol-12345678",
    "VolumeType": "io1",
    "Iops": 200
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

# Updating the size of a volume
result = gw.UpdateVolume(
    VolumeId="vol-12345678",
    Size=50,
)
print(result)

# Updating the type of a volume to io1
result = gw.UpdateVolume(
    VolumeId="vol-12345678",
    VolumeType="io1",
    Iops=200,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VolumeApi(config);

    /* Updating the size of a volume */
    const result = await api.updateVolume({
        updateVolumeRequest: {
            volumeId: "vol-12345678",
            size: 50,
        },
    });
    console.log(result);

    /* Updating the type of a volume to io1 */
    const result2 = await api.updateVolume({
        updateVolumeRequest: {
            volumeId: "vol-12345678",
            volumeType: "io1",
            iops: 200,
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Iops integer Cold volume: the new number of I/O operations per second (IOPS). This parameter can be specified only if you update an io1 volume or if you change the type of the volume for an io1. This modification is instantaneous.
Hot volume: the new number of I/O operations per second (IOPS). This parameter can be specified only if you update an io1 volume. This modification is not instantaneous.

The maximum number of IOPS allowed for io1 volumes is 13000 with a maximum performance ratio of 300 IOPS per gibibyte.
Size integer Cold volume: the new size of the volume, in gibibytes (GiB). This value must be equal to or greater than the current size of the volume. This modification is not instantaneous.
Hot volume: you cannot change the size of a hot volume.
VolumeId (required) string The ID of the volume you want to update.
VolumeType string Cold volume: the new type of the volume (standard | io1 | gp2). This modification is instantaneous. If you update to an io1 volume, you must also specify the Iops parameter.
Hot volume: you cannot change the type of a hot volume.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateVolumeResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

# Updating the size of a volume
{
  "Volume": {
    "VolumeId": "vol-12345678",
    "Tags": [],
    "VolumeType": "gp2",
    "SubregionName": "eu-west-2a",
    "State": "available",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "Iops": 100,
    "LinkedVolumes": [],
    "Size": 10
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
# Updating the type of a volume to io1
{
  "Volume": {
    "VolumeId": "vol-12345678",
    "Tags": [],
    "VolumeType": "io1",
    "SubregionName": "eu-west-2a",
    "State": "available",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "Iops": 200,
    "LinkedVolumes": [],
    "Size": 10
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

VpnConnection

CreateVpnConnection

POST /CreateVpnConnection

Creates a VPN connection between a specified virtual gateway and a specified client gateway.
You can create only one VPN connection between a virtual gateway and a client gateway.

[IMPORTANT]
This action can be done only if the virtual gateway is in the available state.

For more information, see About VPN Connections.

Code samples

osc-cli api CreateVpnConnection --profile "default" \
  --ClientGatewayId "cgw-12345678" \
  --VirtualGatewayId "vgw-12345678" \
  --ConnectionType "ipsec.1" \
  --StaticRoutesOnly True

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVpnConnection \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "ClientGatewayId": "cgw-12345678",
    "VirtualGatewayId": "vgw-12345678",
    "ConnectionType": "ipsec.1",
    "StaticRoutesOnly": true
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateVpnConnection(
    ClientGatewayId="cgw-12345678",
    VirtualGatewayId="vgw-12345678",
    ConnectionType="ipsec.1",
    StaticRoutesOnly=True,
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VpnConnectionApi(config);

    const result = await api.createVpnConnection({
        createVpnConnectionRequest: {
            clientGatewayId: "cgw-12345678",
            virtualGatewayId: "vgw-12345678",
            connectionType: "ipsec.1",
            staticRoutesOnly: true,
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
ClientGatewayId (required) string The ID of the client gateway.
ConnectionType (required) string The type of VPN connection (only ipsec.1 is supported).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
StaticRoutesOnly boolean By default or if false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If true, routing is controlled using static routes. For more information about how to create and delete static routes, see CreateVpnConnectionRoute and DeleteVpnConnectionRoute.
VirtualGatewayId (required) string The ID of the virtual gateway.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateVpnConnectionResponse

Example responses

{
  "VpnConnection": {
    "Routes": [],
    "Tags": [],
    "ClientGatewayConfiguration": "...",
    "StaticRoutesOnly": true,
    "VirtualGatewayId": "vgw-12345678",
    "ConnectionType": "ipsec.1",
    "ClientGatewayId": "cgw-12345678",
    "State": "pending",
    "VgwTelemetries": [
      {
        "StateDescription": "IPSEC IS DOWN",
        "AcceptedRouteCount": 0,
        "LastStateChangeDate": "2017-05-10T12:34:56.789Z",
        "OutsideIpAddress": "192.0.2.0"
      }
    ],
    "VpnConnectionId": "vpn-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

CreateVpnConnectionRoute

POST /CreateVpnConnectionRoute

Creates a static route to a VPN connection.
This enables you to select the network flows sent by the virtual gateway to the target VPN connection.

For more information, see About Routing Configuration for VPN Connections.

Code samples

osc-cli api CreateVpnConnectionRoute --profile "default" \
  --VpnConnectionId "vpn-12345678" \
  --DestinationIpRange "10.0.0.0/16"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVpnConnectionRoute \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VpnConnectionId": "vpn-12345678",
    "DestinationIpRange": "10.0.0.0/16"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.CreateVpnConnectionRoute(
    VpnConnectionId="vpn-12345678",
    DestinationIpRange="10.0.0.0/16",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VpnConnectionApi(config);

    const result = await api.createVpnConnectionRoute({
        createVpnConnectionRouteRequest: {
            vpnConnectionId: "vpn-12345678",
            destinationIpRange: "10.0.0.0/16",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DestinationIpRange (required) string The network prefix of the route, in CIDR notation (for example, 10.12.0.0/16).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VpnConnectionId (required) string The ID of the target VPN connection of the static route.

Responses

Status Description Schema
200 The HTTP 200 response (OK). CreateVpnConnectionRouteResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteVpnConnection

POST /DeleteVpnConnection

Deletes a specified VPN connection.
If you want to delete a Net and all its dependencies, we recommend to detach the virtual gateway from the Net and delete the Net before deleting the VPN connection. This enables you to delete the Net without waiting for the VPN connection to be deleted.

Code samples

osc-cli api DeleteVpnConnection --profile "default" \
  --VpnConnectionId "vpn-12345678"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteVpnConnection \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VpnConnectionId": "vpn-12345678"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteVpnConnection(
    VpnConnectionId="vpn-12345678",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VpnConnectionApi(config);

    const result = await api.deleteVpnConnection({
        deleteVpnConnectionRequest: {
            vpnConnectionId: "vpn-12345678",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VpnConnectionId (required) string The ID of the VPN connection you want to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteVpnConnectionResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

DeleteVpnConnectionRoute

POST /DeleteVpnConnectionRoute

Deletes a static route to a VPN connection previously created using the CreateVpnConnectionRoute method.

Code samples

osc-cli api DeleteVpnConnectionRoute --profile "default" \
  --VpnConnectionId "vpn-12345678" \
  --DestinationIpRange "10.0.0.0/16"

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteVpnConnectionRoute \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VpnConnectionId": "vpn-12345678",
    "DestinationIpRange": "10.0.0.0/16"
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.DeleteVpnConnectionRoute(
    VpnConnectionId="vpn-12345678",
    DestinationIpRange="10.0.0.0/16",
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VpnConnectionApi(config);

    const result = await api.deleteVpnConnectionRoute({
        deleteVpnConnectionRouteRequest: {
            vpnConnectionId: "vpn-12345678",
            destinationIpRange: "10.0.0.0/16",
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
DestinationIpRange (required) string The network prefix of the route to delete, in CIDR notation (for example, 10.12.0.0/16).
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VpnConnectionId (required) string The ID of the target VPN connection of the static route to delete.

Responses

Status Description Schema
200 The HTTP 200 response (OK). DeleteVpnConnectionRouteResponse

Example responses

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

ReadVpnConnections

POST /ReadVpnConnections

Lists one or more VPN connections.

Code samples

osc-cli api ReadVpnConnections --profile "default" \
  --Filters '{
      "VpnConnectionIds": ["vpn-12345678"],
    }'
osc-cli api ReadVpnConnections --profile "default" \
  --Filters '{
      "ClientGatewayIds": ["cgw-12345678"],
      "VirtualGatewayIds": ["vgw-12345678", "vgw-87654321"],
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVpnConnections \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "VpnConnectionIds": ["vpn-12345678"]
    }
  }'
curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVpnConnections \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Filters": {
      "ClientGatewayIds": ["cgw-12345678"],
      "VirtualGatewayIds": ["vgw-12345678", "vgw-87654321"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.ReadVpnConnections(
    Filters={
        "VpnConnectionIds": ["vpn-12345678"],
    },
)
print(result)

result = gw.ReadVpnConnections(
    Filters={
        "ClientGatewayIds": ["cgw-12345678"],
        "VirtualGatewayIds": ["vgw-12345678","vgw-87654321"],
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VpnConnectionApi(config);

    const result = await api.readVpnConnections({
        readVpnConnectionsRequest: {
            filters: {
                vpnConnectionIds: ["vpn-12345678"],
            },
        },
    });
    console.log(result);

    const result2 = await api.readVpnConnections({
        readVpnConnectionsRequest: {
            filters: {
                clientGatewayIds: ["cgw-12345678"],
                virtualGatewayIds: ["vgw-12345678", "vgw-87654321"],
            },
        },
    });
    console.log(result2);

}

main();

Available Parameters

Name Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
Filters FiltersVpnConnection One or more filters.
» BgpAsns [integer] The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of the connections.
» ClientGatewayIds [string] The IDs of the client gateways.
» ConnectionTypes [string] The types of the VPN connections (only ipsec.1 is supported).
» RouteDestinationIpRanges [string] The destination IP ranges.
» States [string] The states of the VPN connections (pending | available | deleting | deleted).
» StaticRoutesOnly boolean If false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If true, routing is controlled using static routes. For more information about how to create and delete static routes, see CreateVpnConnectionRoute and DeleteVpnConnectionRoute.
» TagKeys [string] The keys of the tags associated with the VPN connections.
» TagValues [string] The values of the tags associated with the VPN connections.
» Tags [string] The key/value combination of the tags associated with the VPN connections, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» VirtualGatewayIds [string] The IDs of the virtual gateways.
» VpnConnectionIds [string] The IDs of the VPN connections.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.

Responses

Status Description Schema
200 The HTTP 200 response (OK). ReadVpnConnectionsResponse

Example responses

{
  "VpnConnections": [
    {
      "Routes": [],
      "Tags": [],
      "ClientGatewayConfiguration": "...",
      "StaticRoutesOnly": true,
      "VirtualGatewayId": "vgw-12345678",
      "ConnectionType": "ipsec.1",
      "ClientGatewayId": "cgw-12345678",
      "State": "pending",
      "VgwTelemetries": [
        {
          "StateDescription": "IPSEC IS DOWN",
          "AcceptedRouteCount": 0,
          "LastStateChangeDate": "2017-05-10T12:34:56.789Z",
          "OutsideIpAddress": "192.0.2.0"
        }
      ],
      "VpnConnectionId": "vpn-12345678"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

UpdateVpnConnection

POST /UpdateVpnConnection

Modifies the specified attributes of a VPN connection.

Code samples

osc-cli api UpdateVpnConnection --profile "default" \
  --VpnConnectionId "vpn-12345678" \
  --VpnOptions '{
      "TunnelInsideIpRange": "169.254.254.22/30",
    }'

# You need Curl version 7.75 or later to use the --aws-sigv4 option

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateVpnConnection \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "VpnConnectionId": "vpn-12345678",
    "VpnOptions": {
      "TunnelInsideIpRange": "169.254.254.22/30"
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway(**{"profile": "default"})

result = gw.UpdateVpnConnection(
    VpnConnectionId="vpn-12345678",
    VpnOptions={
        "TunnelInsideIpRange": "169.254.254.22/30",
    },
)
print(result)

const osc = require("outscale-api");
const crypto = require("crypto");
global.crypto = crypto.webcrypto;

async function main() {
    const config = new osc.Configuration({
        basePath: "https://api." + process.env.OSC_REGION + ".outscale.com/api/v1",
        awsV4SignParameters: {
            accessKeyId: process.env.OSC_ACCESS_KEY,
            secretAccessKey: process.env.OSC_SECRET_KEY,
            service: "api",
        },
    });
    const api = new osc.VpnConnectionApi(config);

    const result = await api.updateVpnConnection({
        updateVpnConnectionRequest: {
            vpnConnectionId: "vpn-12345678",
            vpnOptions: {
                tunnelInsideIpRange: "169.254.254.22/30",
            },
        },
    });
    console.log(result);

}

main();

Available Parameters

Name Type Description
ClientGatewayId string The ID of the client gateway.
DryRun boolean If true, checks whether you have the required permissions to perform the action.
VirtualGatewayId string The ID of the virtual gateway.
VpnConnectionId (required) string The ID of the VPN connection you want to modify.
VpnOptions VpnOptionsToUpdate Information about the VPN options.
» Phase2Options Phase2OptionsToUpdate Information about Phase 2 of the Internet Key Exchange (IKE) negotiation.
»» PreSharedKey string The pre-shared key to establish the initial authentication between the client gateway and the virtual gateway. This key can contain any character except line breaks and double quotes (").
» TunnelInsideIpRange string The range of inside IPs for the tunnel. This must be a /30 CIDR block from the 169.254.254.0/24 range.

Responses

Status Description Schema
200 The HTTP 200 response (OK). UpdateVpnConnectionResponse
400 The HTTP 400 response (Bad Request). ErrorResponse
401 The HTTP 401 response (Unauthorized). ErrorResponse
500 The HTTP 500 response (Internal Server Error). ErrorResponse

Example responses

{
  "VpnConnection": {
    "VpnOptions": {
      "TunnelInsideIpRange": "169.254.254.22/30"
    },
    "Routes": [],
    "Tags": [],
    "ClientGatewayConfiguration": "...",
    "StaticRoutesOnly": true,
    "VirtualGatewayId": "vgw-12345678",
    "ConnectionType": "ipsec.1",
    "ClientGatewayId": "cgw-12345678",
    "State": "pending",
    "VgwTelemetries": [
      {
        "StateDescription": "IPSEC IS DOWN",
        "AcceptedRouteCount": 0,
        "LastStateChangeDate": "2017-05-10T12:34:56.789Z",
        "OutsideIpAddress": "192.0.2.0"
      }
    ],
    "VpnConnectionId": "vpn-12345678"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Schemas

AcceptNetPeeringResponse

Properties

Name Type Description
NetPeering NetPeering Information about the Net peering.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "NetPeering": {
    "AccepterNet": {
      "AccountId": "string",
      "IpRange": "string",
      "NetId": "string"
    },
    "ExpirationDate": "2019-08-24T14:15:22Z",
    "NetPeeringId": "string",
    "SourceNet": {
      "AccountId": "string",
      "IpRange": "string",
      "NetId": "string"
    },
    "State": {
      "Message": "string",
      "Name": "string"
    },
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

AccepterNet

Information about the accepter Net.

Properties

Name Type Description
AccountId string The account ID of the owner of the accepter Net.
IpRange string The IP range for the accepter Net, in CIDR notation (for example, 10.0.0.0/16).
NetId string The ID of the accepter Net.

Schema

{
  "AccountId": "string",
  "IpRange": "string",
  "NetId": "string"
}

AccessKey

Information about the access key.

Properties

Name Type Description
AccessKeyId string The ID of the access key.
CreationDate string (date-time) The date and time (UTC) of creation of the access key.
ExpirationDate string (date-time) The date (UTC) at which the access key expires.
LastModificationDate string (date-time) The date and time (UTC) of the last modification of the access key.
State string The state of the access key (ACTIVE if the key is valid for API calls, or INACTIVE if not).

Schema

{
  "AccessKeyId": "string",
  "CreationDate": "2019-08-24T14:15:22Z",
  "ExpirationDate": "2019-08-24T14:15:22Z",
  "LastModificationDate": "2019-08-24T14:15:22Z",
  "State": "string"
}

AccessKeySecretKey

Information about the access key.

Properties

Name Type Description
AccessKeyId string The ID of the access key.
CreationDate string (date-time) The date and time (UTC) of creation of the access key.
ExpirationDate string (date-time) The date and time (UTC) at which the access key expires.
LastModificationDate string (date-time) The date and time (UTC) of the last modification of the access key.
SecretKey string The access key that enables you to send requests.
State string The state of the access key (ACTIVE if the key is valid for API calls, or INACTIVE if not).

Schema

{
  "AccessKeyId": "string",
  "CreationDate": "2019-08-24T14:15:22Z",
  "ExpirationDate": "2019-08-24T14:15:22Z",
  "LastModificationDate": "2019-08-24T14:15:22Z",
  "SecretKey": "string",
  "State": "string"
}

AccessLog

Information about access logs.

Properties

Name Type Description
IsEnabled boolean If true, access logs are enabled for your load balancer. If false, they are not. If you set this to true in your request, the OsuBucketName parameter is required.
OsuBucketName string The name of the OOS bucket for the access logs.
OsuBucketPrefix string The path to the folder of the access logs in your OOS bucket (by default, the root level of your bucket).
PublicationInterval integer The time interval for the publication of access logs in the OOS bucket, in minutes. This value can be either 5 or 60 (by default, 60).

Schema

{
  "IsEnabled": true,
  "OsuBucketName": "string",
  "OsuBucketPrefix": "string",
  "PublicationInterval": 0
}

Account

Information about the account.

Properties

Name Type Description
AccountId string The ID of the account.
AdditionalEmails [string] One or more additional email addresses for the account. These addresses are used for notifications only.
City string The city of the account owner.
CompanyName string The name of the company for the account.
Country string The country of the account owner.
CustomerId string The ID of the customer.
Email string The main email address for the account. This address is used for your credentials and for notifications.
FirstName string The first name of the account owner.
JobTitle string The job title of the account owner.
LastName string The last name of the account owner.
MobileNumber string The mobile phone number of the account owner.
PhoneNumber string The landline phone number of the account owner.
StateProvince string The state/province of the account.
VatNumber string The value added tax (VAT) number for the account.
ZipCode string The ZIP code of the city.

Schema

{
  "AccountId": "string",
  "AdditionalEmails": [
    "string"
  ],
  "City": "string",
  "CompanyName": "string",
  "Country": "string",
  "CustomerId": "string",
  "Email": "string",
  "FirstName": "string",
  "JobTitle": "string",
  "LastName": "string",
  "MobileNumber": "string",
  "PhoneNumber": "string",
  "StateProvince": "string",
  "VatNumber": "string",
  "ZipCode": "string"
}

ApiAccessPolicy

Information about the API access policy.

Properties

Name Type Description
MaxAccessKeyExpirationSeconds integer (int64) The maximum possible lifetime for your access keys, in seconds. If 0, your access keys can have unlimited lifetimes.
RequireTrustedEnv boolean If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) enforcement. For more information, see About Your API Access Policy.

If this is enabled, it is required that you and all your users log in to Cockpit v2 using the WebAuthn method for multi-factor authentication. For more information, see About Authentication > Multi-Factor Authentication.

Schema

{
  "MaxAccessKeyExpirationSeconds": 0,
  "RequireTrustedEnv": true
}

ApiAccessRule

Information about the API access rule.

Properties

Name Type Description
ApiAccessRuleId string The ID of the API access rule.
CaIds [string] One or more IDs of Client Certificate Authorities (CAs) used for the API access rule.
Cns [string] One or more Client Certificate Common Names (CNs).
Description string The description of the API access rule.
IpRanges [string] One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).

Schema

{
  "ApiAccessRuleId": "string",
  "CaIds": [
    "string"
  ],
  "Cns": [
    "string"
  ],
  "Description": "string",
  "IpRanges": [
    "string"
  ]
}

ApplicationStickyCookiePolicy

Information about the stickiness policy.

Properties

Name Type Description
CookieName string The name of the application cookie used for stickiness.
PolicyName string The mnemonic name for the policy being created. The name must be unique within a set of policies for this load balancer.

Schema

{
  "CookieName": "string",
  "PolicyName": "string"
}

BackendVmHealth

Information about the health of a backend VM.

Properties

Name Type Description
Description string The description of the state of the backend VM.
State string The state of the backend VM (InService | OutOfService | Unknown).
StateReason string Information about the cause of OutOfService VMs.

Specifically, whether the cause is Elastic Load Balancing or the VM (ELB | Instance | N/A).
VmId string The ID of the backend VM.

Schema

{
  "Description": "string",
  "State": "string",
  "StateReason": "string",
  "VmId": "string"
}

BlockDeviceMappingCreated

Information about the created block device mapping.

Properties

Name Type Description
Bsu BsuCreated Information about the created BSU volume.
DeviceName string The name of the device.

Schema

{
  "Bsu": {
    "DeleteOnVmDeletion": true,
    "LinkDate": "2019-08-24T14:15:22Z",
    "State": "string",
    "VolumeId": "string"
  },
  "DeviceName": "string"
}

BlockDeviceMappingImage

One or more parameters used to automatically set up volumes when the VM is created.

Properties

Name Type Description
Bsu BsuToCreate Information about the BSU volume to create.
DeviceName string The device name for the volume. For a root device, you must use /dev/sda1. For other volumes, you must use /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX (where the first X is a letter between b and z, and the second X is a letter between a and z).
VirtualDeviceName string The name of the virtual device (ephemeralN).

Schema

{
  "Bsu": {
    "DeleteOnVmDeletion": true,
    "Iops": 0,
    "SnapshotId": "string",
    "VolumeSize": 0,
    "VolumeType": "string"
  },
  "DeviceName": "string",
  "VirtualDeviceName": "string"
}

BlockDeviceMappingVmCreation

Information about the block device mapping.

Properties

Name Type Description
Bsu BsuToCreate Information about the BSU volume to create.
DeviceName string The device name for the volume. For a root device, you must use /dev/sda1. For other volumes, you must use /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX (where the first X is a letter between b and z, and the second X is a letter between a and z).
NoDevice string Removes the device which is included in the block device mapping of the OMI.
VirtualDeviceName string The name of the virtual device (ephemeralN).

Schema

{
  "Bsu": {
    "DeleteOnVmDeletion": true,
    "Iops": 0,
    "SnapshotId": "string",
    "VolumeSize": 0,
    "VolumeType": "string"
  },
  "DeviceName": "string",
  "NoDevice": "string",
  "VirtualDeviceName": "string"
}

BlockDeviceMappingVmUpdate

Information about the block device mapping.

Properties

Name Type Description
Bsu BsuToUpdateVm Information about the BSU volume.
DeviceName string The device name for the volume. For a root device, you must use /dev/sda1. For other volumes, you must use /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX (where the first X is a letter between b and z, and the second X is a letter between a and z).
NoDevice string Removes the device which is included in the block device mapping of the OMI.
VirtualDeviceName string The name of the virtual device (ephemeralN).

Schema

{
  "Bsu": {
    "DeleteOnVmDeletion": true,
    "VolumeId": "string"
  },
  "DeviceName": "string",
  "NoDevice": "string",
  "VirtualDeviceName": "string"
}

BsuCreated

Information about the created BSU volume.

Properties

Name Type Description
DeleteOnVmDeletion boolean If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
LinkDate string (date-time) The date and time (UTC) of attachment of the volume to the VM, in ISO 8601 date-time format.
State string The state of the volume.
VolumeId string The ID of the volume.

Schema

{
  "DeleteOnVmDeletion": true,
  "LinkDate": "2019-08-24T14:15:22Z",
  "State": "string",
  "VolumeId": "string"
}

BsuToCreate

Information about the BSU volume to create.

Properties

Name Type Description
DeleteOnVmDeletion boolean By default or if set to true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
Iops integer The number of I/O operations per second (IOPS). This parameter must be specified only if you create an io1 volume. The maximum number of IOPS allowed for io1 volumes is 13000 with a maximum performance ratio of 300 IOPS per gibibyte.
SnapshotId string The ID of the snapshot used to create the volume.
VolumeSize integer The size of the volume, in gibibytes (GiB).

If you specify a snapshot ID, the volume size must be at least equal to the snapshot size.

If you specify a snapshot ID but no volume size, the volume is created with a size similar to the snapshot one.
VolumeType string The type of the volume (standard | io1 | gp2). If not specified in the request, a standard volume is created.

For more information about volume types, see About Volumes > Volume Types and IOPS.

Schema

{
  "DeleteOnVmDeletion": true,
  "Iops": 0,
  "SnapshotId": "string",
  "VolumeSize": 0,
  "VolumeType": "string"
}

BsuToUpdateVm

Information about the BSU volume.

Properties

Name Type Description
DeleteOnVmDeletion boolean If set to true, the volume is deleted when terminating the VM. If set to false, the volume is not deleted when terminating the VM.
VolumeId string The ID of the volume.

Schema

{
  "DeleteOnVmDeletion": true,
  "VolumeId": "string"
}

Ca

Information about the Client Certificate Authority (CA).

Properties

Name Type Description
CaFingerprint string The fingerprint of the CA.
CaId string The ID of the CA.
Description string The description of the CA.

Schema

{
  "CaFingerprint": "string",
  "CaId": "string",
  "Description": "string"
}

Catalog

Information about our catalog of prices.

Properties

Name Type Description
Entries [CatalogEntry] One or more catalog entries.

Schema

{
  "Entries": [
    {
      "Category": "string",
      "Flags": "string",
      "Operation": "string",
      "Service": "string",
      "SubregionName": "string",
      "Title": "string",
      "Type": "string",
      "UnitPrice": 0.1
    }
  ]
}

CatalogEntry

Information about the catalog entry.

Properties

Name Type Description
Category string The category of the catalog entry (for example, network).
Flags string When returned and equal to PER_MONTH, the price of the catalog entry is calculated on a monthly basis.
Operation string The API call associated with the catalog entry (for example, CreateVms or RunInstances).
Service string The service associated with the catalog entry (TinaOS-FCU, TinaOS-LBU, TinaOS-DirectLink, or TinaOS-OOS).
SubregionName string The Subregion associated with the catalog entry.
Title string The description of the catalog entry.
Type string The type of resource associated with the catalog entry.
UnitPrice number (float) The unit price of the catalog entry, in the currency of the Region's catalog.

Schema

{
  "Category": "string",
  "Flags": "string",
  "Operation": "string",
  "Service": "string",
  "SubregionName": "string",
  "Title": "string",
  "Type": "string",
  "UnitPrice": 0.1
}

Catalogs

Information about the catalogs.

Properties

Name Type Description
Entries [CatalogEntry] One or more catalog entries.
FromDate string (date-time) The beginning of the time period (UTC).
State string The state of the catalog (CURRENT | OBSOLETE).
ToDate string (date-time) The end of the time period (UTC).

Schema

{
  "Entries": [
    {
      "Category": "string",
      "Flags": "string",
      "Operation": "string",
      "Service": "string",
      "SubregionName": "string",
      "Title": "string",
      "Type": "string",
      "UnitPrice": 0.1
    }
  ],
  "FromDate": "2019-08-24T14:15:22Z",
  "State": "CURRENT",
  "ToDate": "2019-08-24T14:15:22Z"
}

CheckAuthenticationResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ClientGateway

Information about the client gateway.

Properties

Name Type Description
BgpAsn integer The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the path to your client gateway through the Internet.
ClientGatewayId string The ID of the client gateway.
ConnectionType string The type of communication tunnel used by the client gateway (only ipsec.1 is supported).
PublicIp string The public IPv4 address of the client gateway (must be a fixed address into a NATed network).
State string The state of the client gateway (pending | available | deleting | deleted).
Tags [ResourceTag] One or more tags associated with the client gateway.

Schema

{
  "BgpAsn": 0,
  "ClientGatewayId": "string",
  "ConnectionType": "string",
  "PublicIp": "string",
  "State": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

ConsumptionEntry

Information about the resources consumed during the specified time period.

Properties

Name Type Description
AccountId string The ID of your TINA account.
Category string The category of the resource (for example, network).
FromDate string (date-time) The beginning of the time period (UTC).
Operation string The API call that triggered the resource consumption (for example, RunInstances or CreateVolume).
PayingAccountId string The ID of the TINA account which is billed for your consumption. It can be different from your account in the AccountId parameter.
Price number (double) The total price of the consumed resource during the specified time period, in the currency of the Region's catalog.
Service string The service of the API call (TinaOS-FCU, TinaOS-LBU, TinaOS-DirectLink, TinaOS-OOS, or TinaOS-OSU).
SubregionName string The name of the Subregion.
Title string A description of the consumed resource.
ToDate string (date-time) The end of the time period (UTC).
Type string The type of resource, depending on the API call.
UnitPrice number (double) The unit price of the consumed resource, in the currency of the Region's catalog.
Value number (double) The consumed amount for the resource. The unit depends on the resource type. For more information, see the Title element.

Schema

{
  "AccountId": "string",
  "Category": "string",
  "FromDate": "2019-08-24T14:15:22Z",
  "Operation": "string",
  "PayingAccountId": "string",
  "Price": 0.1,
  "Service": "string",
  "SubregionName": "string",
  "Title": "string",
  "ToDate": "2019-08-24T14:15:22Z",
  "Type": "string",
  "UnitPrice": 0.1,
  "Value": 0.1
}

CreateAccessKeyResponse

Properties

Name Type Description
AccessKey AccessKeySecretKey Information about the access key.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "AccessKey": {
    "AccessKeyId": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "ExpirationDate": "2019-08-24T14:15:22Z",
    "LastModificationDate": "2019-08-24T14:15:22Z",
    "SecretKey": "string",
    "State": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateAccountResponse

Properties

Name Type Description
Account Account Information about the account.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Account": {
    "AccountId": "string",
    "AdditionalEmails": [
      "string"
    ],
    "City": "string",
    "CompanyName": "string",
    "Country": "string",
    "CustomerId": "string",
    "Email": "string",
    "FirstName": "string",
    "JobTitle": "string",
    "LastName": "string",
    "MobileNumber": "string",
    "PhoneNumber": "string",
    "StateProvince": "string",
    "VatNumber": "string",
    "ZipCode": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateApiAccessRuleResponse

Properties

Name Type Description
ApiAccessRule ApiAccessRule Information about the API access rule.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ApiAccessRule": {
    "ApiAccessRuleId": "string",
    "CaIds": [
      "string"
    ],
    "Cns": [
      "string"
    ],
    "Description": "string",
    "IpRanges": [
      "string"
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateCaResponse

Properties

Name Type Description
Ca Ca Information about the Client Certificate Authority (CA).
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Ca": {
    "CaFingerprint": "string",
    "CaId": "string",
    "Description": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateClientGatewayResponse

Properties

Name Type Description
ClientGateway ClientGateway Information about the client gateway.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ClientGateway": {
    "BgpAsn": 0,
    "ClientGatewayId": "string",
    "ConnectionType": "string",
    "PublicIp": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateDedicatedGroupResponse

Properties

Name Type Description
DedicatedGroup DedicatedGroup Information about the dedicated group.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "DedicatedGroup": {
    "AccountId": "string",
    "CpuGeneration": 0,
    "DedicatedGroupId": "string",
    "Name": "string",
    "NetIds": [
      "string"
    ],
    "SubregionName": "string",
    "VmIds": [
      "string"
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateDhcpOptionsResponse

Properties

Name Type Description
DhcpOptionsSet DhcpOptionsSet Information about the DHCP options set.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "DhcpOptionsSet": {
    "Default": true,
    "DhcpOptionsSetId": "string",
    "DomainName": "string",
    "DomainNameServers": [
      "string"
    ],
    "LogServers": [
      "string"
    ],
    "NtpServers": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateDirectLinkInterfaceResponse

Properties

Name Type Description
DirectLinkInterface DirectLinkInterfaces Information about the DirectLink interfaces.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "DirectLinkInterface": {
    "AccountId": "string",
    "BgpAsn": 0,
    "BgpKey": "string",
    "ClientPrivateIp": "string",
    "DirectLinkId": "string",
    "DirectLinkInterfaceId": "string",
    "DirectLinkInterfaceName": "string",
    "InterfaceType": "string",
    "Location": "string",
    "Mtu": 0,
    "OutscalePrivateIp": "string",
    "State": "string",
    "VirtualGatewayId": "string",
    "Vlan": 0
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateDirectLinkResponse

Properties

Name Type Description
DirectLink DirectLink Information about the DirectLink.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "DirectLink": {
    "AccountId": "string",
    "Bandwidth": "string",
    "DirectLinkId": "string",
    "DirectLinkName": "string",
    "Location": "string",
    "RegionName": "string",
    "State": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateFlexibleGpuResponse

Properties

Name Type Description
FlexibleGpu FlexibleGpu Information about the flexible GPU (fGPU).
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "FlexibleGpu": {
    "DeleteOnVmDeletion": true,
    "FlexibleGpuId": "string",
    "Generation": "string",
    "ModelName": "string",
    "State": "string",
    "SubregionName": "string",
    "VmId": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateImageExportTaskResponse

Properties

Name Type Description
ImageExportTask ImageExportTask Information about the OMI export task.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ImageExportTask": {
    "Comment": "string",
    "ImageId": "string",
    "OsuExport": {
      "DiskImageFormat": "string",
      "OsuBucket": "string",
      "OsuManifestUrl": "string",
      "OsuPrefix": "string"
    },
    "Progress": 0,
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "TaskId": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateImageResponse

Properties

Name Type Description
Image Image Information about the OMI.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Image": {
    "AccountAlias": "string",
    "AccountId": "string",
    "Architecture": "string",
    "BlockDeviceMappings": [
      {
        "Bsu": {
          "DeleteOnVmDeletion": true,
          "Iops": 0,
          "SnapshotId": "string",
          "VolumeSize": 0,
          "VolumeType": "string"
        },
        "DeviceName": "string",
        "VirtualDeviceName": "string"
      }
    ],
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "FileLocation": "string",
    "ImageId": "string",
    "ImageName": "string",
    "ImageType": "string",
    "PermissionsToLaunch": {
      "AccountIds": [
        "string"
      ],
      "GlobalPermission": true
    },
    "ProductCodes": [
      "string"
    ],
    "RootDeviceName": "string",
    "RootDeviceType": "string",
    "State": "string",
    "StateComment": {
      "StateCode": "string",
      "StateMessage": "string"
    },
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateInternetServiceResponse

Properties

Name Type Description
InternetService InternetService Information about the Internet service.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "InternetService": {
    "InternetServiceId": "string",
    "NetId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateKeypairResponse

Properties

Name Type Description
Keypair KeypairCreated Information about the created keypair.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Keypair": {
    "KeypairFingerprint": "string",
    "KeypairName": "string",
    "KeypairType": "string",
    "PrivateKey": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateListenerRuleResponse

Properties

Name Type Description
ListenerRule ListenerRule Information about the listener rule.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ListenerRule": {
    "Action": "string",
    "HostNamePattern": "string",
    "ListenerId": 0,
    "ListenerRuleId": 0,
    "ListenerRuleName": "string",
    "PathPattern": "string",
    "Priority": 0,
    "VmIds": [
      "string"
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateLoadBalancerListenersResponse

Properties

Name Type Description
LoadBalancer LoadBalancer Information about the load balancer.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateLoadBalancerPolicyResponse

Properties

Name Type Description
LoadBalancer LoadBalancer Information about the load balancer.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateLoadBalancerResponse

Properties

Name Type Description
LoadBalancer LoadBalancer Information about the load balancer.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateLoadBalancerTagsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateNatServiceResponse

Properties

Name Type Description
NatService NatService Information about the NAT service.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "NatService": {
    "NatServiceId": "string",
    "NetId": "string",
    "PublicIps": [
      {
        "PublicIp": "string",
        "PublicIpId": "string"
      }
    ],
    "State": "string",
    "SubnetId": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateNetAccessPointResponse

Properties

Name Type Description
NetAccessPoint NetAccessPoint Information about the Net access point.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "NetAccessPoint": {
    "NetAccessPointId": "string",
    "NetId": "string",
    "RouteTableIds": [
      "string"
    ],
    "ServiceName": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateNetPeeringResponse

Properties

Name Type Description
NetPeering NetPeering Information about the Net peering.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "NetPeering": {
    "AccepterNet": {
      "AccountId": "string",
      "IpRange": "string",
      "NetId": "string"
    },
    "ExpirationDate": "2019-08-24T14:15:22Z",
    "NetPeeringId": "string",
    "SourceNet": {
      "AccountId": "string",
      "IpRange": "string",
      "NetId": "string"
    },
    "State": {
      "Message": "string",
      "Name": "string"
    },
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateNetResponse

Properties

Name Type Description
Net Net Information about the Net.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Net": {
    "DhcpOptionsSetId": "string",
    "IpRange": "string",
    "NetId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "Tenancy": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateNicResponse

Properties

Name Type Description
Nic Nic Information about the NIC.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Nic": {
    "AccountId": "string",
    "Description": "string",
    "IsSourceDestChecked": true,
    "LinkNic": {
      "DeleteOnVmDeletion": true,
      "DeviceNumber": 0,
      "LinkNicId": "string",
      "State": "string",
      "VmAccountId": "string",
      "VmId": "string"
    },
    "LinkPublicIp": {
      "LinkPublicIpId": "string",
      "PublicDnsName": "string",
      "PublicIp": "string",
      "PublicIpAccountId": "string",
      "PublicIpId": "string"
    },
    "MacAddress": "string",
    "NetId": "string",
    "NicId": "string",
    "PrivateDnsName": "string",
    "PrivateIps": [
      {
        "IsPrimary": true,
        "LinkPublicIp": {
          "LinkPublicIpId": "string",
          "PublicDnsName": "string",
          "PublicIp": "string",
          "PublicIpAccountId": "string",
          "PublicIpId": "string"
        },
        "PrivateDnsName": "string",
        "PrivateIp": "string"
      }
    ],
    "SecurityGroups": [
      {
        "SecurityGroupId": "string",
        "SecurityGroupName": "string"
      }
    ],
    "State": "string",
    "SubnetId": "string",
    "SubregionName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreatePolicyResponse

Properties

Name Type Description
Policy Policy Information about the policy.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Policy": {
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "IsLinkable": true,
    "LastModificationDate": "2019-08-24T14:15:22Z",
    "Orn": "string",
    "Path": "string",
    "PolicyDefaultVersionId": "string",
    "PolicyId": "string",
    "PolicyName": "string",
    "ResourcesCount": 0
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreatePolicyVersionResponse

Properties

Name Type Description
PolicyVersion PolicyVersion Information about the policy version.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "PolicyVersion": {
    "Body": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "DefaultVersion": true,
    "VersionId": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateProductTypeResponse

Properties

Name Type Description
ProductType ProductType Information about the product type.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ProductType": {
    "Description": "string",
    "ProductTypeId": "string",
    "Vendor": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreatePublicIpResponse

Properties

Name Type Description
PublicIp PublicIp Information about the public IP.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "PublicIp": {
    "LinkPublicIpId": "string",
    "NicAccountId": "string",
    "NicId": "string",
    "PrivateIp": "string",
    "PublicIp": "string",
    "PublicIpId": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VmId": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateRouteResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
RouteTable RouteTable Information about the route table.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTable": {
    "LinkRouteTables": [
      {
        "LinkRouteTableId": "string",
        "Main": true,
        "NetId": "string",
        "RouteTableId": "string",
        "SubnetId": "string"
      }
    ],
    "NetId": "string",
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "string"
      }
    ],
    "RouteTableId": "string",
    "Routes": [
      {
        "CreationMethod": "string",
        "DestinationIpRange": "string",
        "DestinationServiceId": "string",
        "GatewayId": "string",
        "NatServiceId": "string",
        "NetAccessPointId": "string",
        "NetPeeringId": "string",
        "NicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      }
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

CreateRouteTableResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
RouteTable RouteTable Information about the route table.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTable": {
    "LinkRouteTables": [
      {
        "LinkRouteTableId": "string",
        "Main": true,
        "NetId": "string",
        "RouteTableId": "string",
        "SubnetId": "string"
      }
    ],
    "NetId": "string",
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "string"
      }
    ],
    "RouteTableId": "string",
    "Routes": [
      {
        "CreationMethod": "string",
        "DestinationIpRange": "string",
        "DestinationServiceId": "string",
        "GatewayId": "string",
        "NatServiceId": "string",
        "NetAccessPointId": "string",
        "NetPeeringId": "string",
        "NicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      }
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

CreateSecurityGroupResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
SecurityGroup SecurityGroup Information about the security group.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SecurityGroup": {
    "AccountId": "string",
    "Description": "string",
    "InboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "NetId": "string",
    "OutboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "SecurityGroupId": "string",
    "SecurityGroupName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

CreateSecurityGroupRuleResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
SecurityGroup SecurityGroup Information about the security group.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SecurityGroup": {
    "AccountId": "string",
    "Description": "string",
    "InboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "NetId": "string",
    "OutboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "SecurityGroupId": "string",
    "SecurityGroupName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

CreateServerCertificateResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
ServerCertificate ServerCertificate Information about the server certificate.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "ServerCertificate": {
    "ExpirationDate": "2019-08-24",
    "Id": "string",
    "Name": "string",
    "Orn": "string",
    "Path": "string",
    "UploadDate": "2019-08-24"
  }
}

CreateSnapshotExportTaskResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
SnapshotExportTask SnapshotExportTask Information about the snapshot export task.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SnapshotExportTask": {
    "Comment": "string",
    "OsuExport": {
      "DiskImageFormat": "string",
      "OsuBucket": "string",
      "OsuPrefix": "string"
    },
    "Progress": 0,
    "SnapshotId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "TaskId": "string"
  }
}

CreateSnapshotResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Snapshot Snapshot Information about the snapshot.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Snapshot": {
    "AccountAlias": "string",
    "AccountId": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "PermissionsToCreateVolume": {
      "AccountIds": [
        "string"
      ],
      "GlobalPermission": true
    },
    "Progress": 0,
    "SnapshotId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VolumeId": "string",
    "VolumeSize": 0
  }
}

CreateSubnetResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Subnet Subnet Information about the Subnet.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Subnet": {
    "AvailableIpsCount": 0,
    "IpRange": "string",
    "MapPublicIpOnLaunch": true,
    "NetId": "string",
    "State": "string",
    "SubnetId": "string",
    "SubregionName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

CreateTagsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateUserResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
User User Information about the EIM user.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "User": {
    "Path": "string",
    "UserId": "string",
    "UserName": "string"
  }
}

CreateVirtualGatewayResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VirtualGateway VirtualGateway Information about the virtual gateway.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VirtualGateway": {
    "ConnectionType": "string",
    "NetToVirtualGatewayLinks": [
      {
        "NetId": "string",
        "State": "string"
      }
    ],
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VirtualGatewayId": "string"
  }
}

CreateVmGroupResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VmGroup VmGroup Information about the VM group.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmGroup": {
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "PositioningStrategy": "attract",
    "SecurityGroupIds": [
      "string"
    ],
    "State": "available",
    "SubnetId": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VmCount": 0,
    "VmGroupId": "string",
    "VmGroupName": "string",
    "VmIds": [
      "string"
    ],
    "VmTemplateId": "string"
  }
}

CreateVmTemplateResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VmTemplate VmTemplate none

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmTemplate": {
    "CpuCores": 0,
    "CpuGeneration": "string",
    "CpuPerformance": "medium",
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "ImageId": "string",
    "KeypairName": "string",
    "Ram": 0,
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VmTemplateId": "string",
    "VmTemplateName": "string"
  }
}

CreateVmsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Vms [Vm] Information about one or more created VMs.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vms": [
    {
      "Architecture": "string",
      "BlockDeviceMappings": [
        {
          "Bsu": {
            "DeleteOnVmDeletion": true,
            "LinkDate": "2019-08-24T14:15:22Z",
            "State": "string",
            "VolumeId": "string"
          },
          "DeviceName": "string"
        }
      ],
      "BsuOptimized": true,
      "ClientToken": "string",
      "CreationDate": "2019-08-24T14:15:22Z",
      "DeletionProtection": true,
      "Hypervisor": "string",
      "ImageId": "string",
      "IsSourceDestChecked": true,
      "KeypairName": "string",
      "LaunchNumber": 0,
      "NestedVirtualization": true,
      "NetId": "string",
      "Nics": [
        {
          "AccountId": "string",
          "Description": "string",
          "IsSourceDestChecked": true,
          "LinkNic": {
            "DeleteOnVmDeletion": true,
            "DeviceNumber": 0,
            "LinkNicId": "string",
            "State": "string"
          },
          "LinkPublicIp": {
            "PublicDnsName": "string",
            "PublicIp": "string",
            "PublicIpAccountId": "string"
          },
          "MacAddress": "string",
          "NetId": "string",
          "NicId": "string",
          "PrivateDnsName": "string",
          "PrivateIps": [
            {
              "IsPrimary": true,
              "LinkPublicIp": {
                "PublicDnsName": "string",
                "PublicIp": "string",
                "PublicIpAccountId": "string"
              },
              "PrivateDnsName": "string",
              "PrivateIp": "string"
            }
          ],
          "SecurityGroups": [
            {
              "SecurityGroupId": "string",
              "SecurityGroupName": "string"
            }
          ],
          "State": "string",
          "SubnetId": "string"
        }
      ],
      "OsFamily": "string",
      "Performance": "string",
      "Placement": {
        "SubregionName": "string",
        "Tenancy": "string"
      },
      "PrivateDnsName": "string",
      "PrivateIp": "string",
      "ProductCodes": [
        "string"
      ],
      "PublicDnsName": "string",
      "PublicIp": "string",
      "ReservationId": "string",
      "RootDeviceName": "string",
      "RootDeviceType": "string",
      "SecurityGroups": [
        {
          "SecurityGroupId": "string",
          "SecurityGroupName": "string"
        }
      ],
      "State": "string",
      "StateReason": "string",
      "SubnetId": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "UserData": "string",
      "VmId": "string",
      "VmInitiatedShutdownBehavior": "string",
      "VmType": "string"
    }
  ]
}

CreateVolumeResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Volume Volume Information about the volume.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Volume": {
    "CreationDate": "2019-08-24T14:15:22Z",
    "Iops": 0,
    "LinkedVolumes": [
      {
        "DeleteOnVmDeletion": true,
        "DeviceName": "string",
        "State": "string",
        "VmId": "string",
        "VolumeId": "string"
      }
    ],
    "Size": 0,
    "SnapshotId": "string",
    "State": "string",
    "SubregionName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VolumeId": "string",
    "VolumeType": "string"
  }
}

CreateVpnConnectionResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VpnConnection VpnConnection Information about a VPN connection.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VpnConnection": {
    "ClientGatewayConfiguration": "string",
    "ClientGatewayId": "string",
    "ConnectionType": "string",
    "Routes": [
      {
        "DestinationIpRange": "string",
        "RouteType": "string",
        "State": "string"
      }
    ],
    "State": "string",
    "StaticRoutesOnly": true,
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VgwTelemetries": [
      {
        "AcceptedRouteCount": 0,
        "LastStateChangeDate": "2019-08-24T14:15:22Z",
        "OutsideIpAddress": "string",
        "State": "string",
        "StateDescription": "string"
      }
    ],
    "VirtualGatewayId": "string",
    "VpnConnectionId": "string",
    "VpnOptions": {
      "Phase1Options": {
        "DpdTimeoutAction": "string",
        "DpdTimeoutSeconds": 0,
        "IkeVersions": [
          "string"
        ],
        "Phase1DhGroupNumbers": [
          0
        ],
        "Phase1EncryptionAlgorithms": [
          "string"
        ],
        "Phase1IntegrityAlgorithms": [
          "string"
        ],
        "Phase1LifetimeSeconds": 0,
        "ReplayWindowSize": 0,
        "StartupAction": "string"
      },
      "Phase2Options": {
        "Phase2DhGroupNumbers": [
          0
        ],
        "Phase2EncryptionAlgorithms": [
          "string"
        ],
        "Phase2IntegrityAlgorithms": [
          "string"
        ],
        "Phase2LifetimeSeconds": 0,
        "PreSharedKey": "string"
      },
      "TunnelInsideIpRange": "string"
    }
  }
}

CreateVpnConnectionRouteResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DedicatedGroup

Information about the dedicated group.

Properties

Name Type Description
AccountId string The account ID of the owners of the dedicated group.
CpuGeneration integer The processor generation.
DedicatedGroupId string The ID of the dedicated group.
Name string The name of the dedicated group.
NetIds [string] The IDs of the Nets in the dedicated group.
SubregionName string The name of the Subregion in which the dedicated group is located.
VmIds [string] The IDs of the VMs in the dedicated group.

Schema

{
  "AccountId": "string",
  "CpuGeneration": 0,
  "DedicatedGroupId": "string",
  "Name": "string",
  "NetIds": [
    "string"
  ],
  "SubregionName": "string",
  "VmIds": [
    "string"
  ]
}

DeleteAccessKeyResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteApiAccessRuleResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteCaResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteClientGatewayResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteDedicatedGroupResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteDhcpOptionsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteDirectLinkInterfaceResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteDirectLinkResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteExportTaskResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteFlexibleGpuResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteImageResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteInternetServiceResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteKeypairResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteListenerRuleResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteLoadBalancerListenersResponse

Properties

Name Type Description
LoadBalancer LoadBalancer Information about the load balancer.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteLoadBalancerPolicyResponse

Properties

Name Type Description
LoadBalancer LoadBalancer Information about the load balancer.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteLoadBalancerResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteLoadBalancerTagsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteNatServiceResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteNetAccessPointResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteNetPeeringResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteNetResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteNicResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeletePolicyResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeletePolicyVersionResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeletePublicIpResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteRouteResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
RouteTable RouteTable Information about the route table.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTable": {
    "LinkRouteTables": [
      {
        "LinkRouteTableId": "string",
        "Main": true,
        "NetId": "string",
        "RouteTableId": "string",
        "SubnetId": "string"
      }
    ],
    "NetId": "string",
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "string"
      }
    ],
    "RouteTableId": "string",
    "Routes": [
      {
        "CreationMethod": "string",
        "DestinationIpRange": "string",
        "DestinationServiceId": "string",
        "GatewayId": "string",
        "NatServiceId": "string",
        "NetAccessPointId": "string",
        "NetPeeringId": "string",
        "NicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      }
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

DeleteRouteTableResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteSecurityGroupResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteSecurityGroupRuleResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
SecurityGroup SecurityGroup Information about the security group.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SecurityGroup": {
    "AccountId": "string",
    "Description": "string",
    "InboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "NetId": "string",
    "OutboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "SecurityGroupId": "string",
    "SecurityGroupName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

DeleteServerCertificateResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteSnapshotResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteSubnetResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteTagsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteUserResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteVirtualGatewayResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteVmGroupResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteVmTemplateResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteVmsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Vms [VmState] Information about one or more terminated VMs.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vms": [
    {
      "CurrentState": "string",
      "PreviousState": "string",
      "VmId": "string"
    }
  ]
}

DeleteVolumeResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteVpnConnectionResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteVpnConnectionRouteResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeregisterVmsInLoadBalancerResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DhcpOptionsSet

Information about the DHCP options set.

Properties

Name Type Description
Default boolean If true, the DHCP options set is a default one. If false, it is not.
DhcpOptionsSetId string The ID of the DHCP options set.
DomainName string The domain name.
DomainNameServers [string] One or more IPs for the domain name servers.
LogServers [string] One or more IPs for the log servers.
NtpServers [string] One or more IPs for the NTP servers.
Tags [ResourceTag] One or more tags associated with the DHCP options set.

Schema

{
  "Default": true,
  "DhcpOptionsSetId": "string",
  "DomainName": "string",
  "DomainNameServers": [
    "string"
  ],
  "LogServers": [
    "string"
  ],
  "NtpServers": [
    "string"
  ],
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

Information about the DirectLink.

Properties

Name Type Description
AccountId string The account ID of the owner of the DirectLink.
Bandwidth string The physical link bandwidth (either 1 Gbps or 10 Gbps).
DirectLinkId string The ID of the DirectLink (for example, dxcon-xxxxxxxx).
DirectLinkName string The name of the DirectLink.
Location string The datacenter where the DirectLink is located.
RegionName string The Region in which the DirectLink has been created.
State string The state of the DirectLink.

* requested: The DirectLink is requested but the request has not been validated yet.

* pending: The DirectLink request has been validated. It remains in the pending state until you establish the physical link.

* available: The physical link is established and the connection is ready to use.

* deleting: The deletion process is in progress.

* deleted: The DirectLink is deleted.

Schema

{
  "AccountId": "string",
  "Bandwidth": "string",
  "DirectLinkId": "string",
  "DirectLinkName": "string",
  "Location": "string",
  "RegionName": "string",
  "State": "string"
}

DirectLinkInterface

Information about the DirectLink interface.

Properties

Name Type Description
BgpAsn integer The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side of the DirectLink interface. This number must be between 64512 and 65534.
BgpKey string The BGP authentication key.
ClientPrivateIp string The IP on the customer's side of the DirectLink interface.
DirectLinkInterfaceName string The name of the DirectLink interface.
OutscalePrivateIp string The IP on the OUTSCALE side of the DirectLink interface.
VirtualGatewayId string The ID of the target virtual gateway.
Vlan integer The VLAN number associated with the DirectLink interface. This number must be unique and be between 2 and 4094.

Schema

{
  "BgpAsn": 0,
  "BgpKey": "string",
  "ClientPrivateIp": "string",
  "DirectLinkInterfaceName": "string",
  "OutscalePrivateIp": "string",
  "VirtualGatewayId": "string",
  "Vlan": 0
}

DirectLinkInterfaces

Information about the DirectLink interfaces.

Properties

Name Type Description
AccountId string The account ID of the owner of the DirectLink interface.
BgpAsn integer The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side of the DirectLink interface.
BgpKey string The BGP authentication key.
ClientPrivateIp string The IP on the customer's side of the DirectLink interface.
DirectLinkId string The ID of the DirectLink.
DirectLinkInterfaceId string The ID of the DirectLink interface.
DirectLinkInterfaceName string The name of the DirectLink interface.
InterfaceType string The type of the DirectLink interface (always private).
Location string The datacenter where the DirectLink interface is located.
Mtu integer The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always 1500).
OutscalePrivateIp string The IP on the OUTSCALE side of the DirectLink interface.
State string The state of the DirectLink interface (pending | available | deleting | deleted | confirming | rejected | expired).
VirtualGatewayId string The ID of the target virtual gateway.
Vlan integer The VLAN number associated with the DirectLink interface.

Schema

{
  "AccountId": "string",
  "BgpAsn": 0,
  "BgpKey": "string",
  "ClientPrivateIp": "string",
  "DirectLinkId": "string",
  "DirectLinkInterfaceId": "string",
  "DirectLinkInterfaceName": "string",
  "InterfaceType": "string",
  "Location": "string",
  "Mtu": 0,
  "OutscalePrivateIp": "string",
  "State": "string",
  "VirtualGatewayId": "string",
  "Vlan": 0
}

ErrorResponse

Properties

Name Type Description
Errors [Errors] One or more errors.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Errors": [
    {
      "Code": "string",
      "Details": "string",
      "Type": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

Errors

Information about the errors.

Properties

Name Type Description
Code string The code of the error.
Details string The details of the error.
Type string The type of the error.

Schema

{
  "Code": "string",
  "Details": "string",
  "Type": "string"
}

FiltersAccessKeys

One or more filters.

Properties

Name Type Description
AccessKeyIds [string] The IDs of the access keys.
States [string] The states of the access keys (ACTIVE | INACTIVE).

Schema

{
  "AccessKeyIds": [
    "string"
  ],
  "States": [
    "string"
  ]
}

FiltersApiAccessRule

One or more filters.

Properties

Name Type Description
ApiAccessRuleIds [string] One or more IDs of API access rules.
CaIds [string] One or more IDs of Client Certificate Authorities (CAs).
Cns [string] One or more Client Certificate Common Names (CNs).
Descriptions [string] One or more descriptions of API access rules.
IpRanges [string] One or more IPs or CIDR blocks (for example, 192.0.2.0/16).

Schema

{
  "ApiAccessRuleIds": [
    "string"
  ],
  "CaIds": [
    "string"
  ],
  "Cns": [
    "string"
  ],
  "Descriptions": [
    "string"
  ],
  "IpRanges": [
    "string"
  ]
}

FiltersApiLog

One or more filters.

Properties

Name Type Description
QueryAccessKeys [string] The access keys used for the logged calls.
QueryApiNames [string] The names of the APIs of the logged calls (always oapi for the OUTSCALE API).
QueryCallNames [string] The names of the logged calls.
QueryDateAfter string (date-time or date) The date and time, or the date, after which you want to retrieve logged calls, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z or 2020-06-14). By default, this date is set to 48 hours before the QueryDateBefore parameter value.
QueryDateBefore string (date-time or date) The date and time, or the date, before which you want to retrieve logged calls, in ISO 8601 format (for example, 2020-06-30T00:00:00.000Z or 2020-06-14). By default, this date is set to now, or 48 hours after the QueryDateAfter parameter value.
QueryIpAddresses [string] The IPs used for the logged calls.
QueryUserAgents [string] The user agents of the HTTP requests of the logged calls.
RequestIds [string] The request IDs provided in the responses of the logged calls.
ResponseStatusCodes [integer] The HTTP status codes of the logged calls.

Schema

{
  "QueryAccessKeys": [
    "string"
  ],
  "QueryApiNames": [
    "string"
  ],
  "QueryCallNames": [
    "string"
  ],
  "QueryDateAfter": "2019-08-24T14:15:22Z",
  "QueryDateBefore": "2019-08-24T14:15:22Z",
  "QueryIpAddresses": [
    "string"
  ],
  "QueryUserAgents": [
    "string"
  ],
  "RequestIds": [
    "string"
  ],
  "ResponseStatusCodes": [
    0
  ]
}

FiltersCa

One or more filters.

Properties

Name Type Description
CaFingerprints [string] The fingerprints of the CAs.
CaIds [string] The IDs of the CAs.
Descriptions [string] The descriptions of the CAs.

Schema

{
  "CaFingerprints": [
    "string"
  ],
  "CaIds": [
    "string"
  ],
  "Descriptions": [
    "string"
  ]
}

FiltersCatalogs

One or more filters.

Properties

Name Type Description
CurrentCatalogOnly boolean By default or if set to true, only returns the current catalog. If false, returns the current catalog and past catalogs.
FromDate string (date) The beginning of the time period, in ISO 8601 date format (for example, 2020-06-14). This date cannot be older than 3 years. You must specify the parameters FromDate and ToDate together.
ToDate string (date) The end of the time period, in ISO 8601 date format (for example, 2020-06-30). You must specify the parameters FromDate and ToDate together.

Schema

{
  "CurrentCatalogOnly": true,
  "FromDate": "2019-08-24",
  "ToDate": "2019-08-24"
}

FiltersClientGateway

One or more filters.

Properties

Name Type Description
BgpAsns [integer] The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of the connections.
ClientGatewayIds [string] The IDs of the client gateways.
ConnectionTypes [string] The types of communication tunnels used by the client gateways (only ipsec.1 is supported).
PublicIps [string] The public IPv4 addresses of the client gateways.
States [string] The states of the client gateways (pending | available | deleting | deleted).
TagKeys [string] The keys of the tags associated with the client gateways.
TagValues [string] The values of the tags associated with the client gateways.
Tags [string] The key/value combination of the tags associated with the client gateways, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "BgpAsns": [
    0
  ],
  "ClientGatewayIds": [
    "string"
  ],
  "ConnectionTypes": [
    "string"
  ],
  "PublicIps": [
    "string"
  ],
  "States": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

FiltersDedicatedGroup

One or more filters.

Properties

Name Type Description
CpuGenerations [integer] The processor generation for the VMs in the dedicated group (for example, 4).
DedicatedGroupIds [string] The IDs of the dedicated groups.
Names [string] The names of the dedicated groups.
SubregionNames [string] The names of the Subregions in which the dedicated groups are located.

Schema

{
  "CpuGenerations": [
    0
  ],
  "DedicatedGroupIds": [
    "string"
  ],
  "Names": [
    "string"
  ],
  "SubregionNames": [
    "string"
  ]
}

FiltersDhcpOptions

One or more filters.

Properties

Name Type Description
Default boolean If true, lists all default DHCP options set. If false, lists all non-default DHCP options set.
DhcpOptionsSetIds [string] The IDs of the DHCP options sets.
DomainNameServers [string] The IPs of the domain name servers used for the DHCP options sets.
DomainNames [string] The domain names used for the DHCP options sets.
LogServers [string] The IPs of the log servers used for the DHCP options sets.
NtpServers [string] The IPs of the Network Time Protocol (NTP) servers used for the DHCP options sets.
TagKeys [string] The keys of the tags associated with the DHCP options sets.
TagValues [string] The values of the tags associated with the DHCP options sets.
Tags [string] The key/value combination of the tags associated with the DHCP options sets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "Default": true,
  "DhcpOptionsSetIds": [
    "string"
  ],
  "DomainNameServers": [
    "string"
  ],
  "DomainNames": [
    "string"
  ],
  "LogServers": [
    "string"
  ],
  "NtpServers": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

One or more filters.

Properties

Name Type Description
DirectLinkIds [string] The IDs of the DirectLinks.

Schema

{
  "DirectLinkIds": [
    "string"
  ]
}

FiltersDirectLinkInterface

One or more filters.

Properties

Name Type Description
DirectLinkIds [string] The IDs of the DirectLinks.
DirectLinkInterfaceIds [string] The IDs of the DirectLink interfaces.

Schema

{
  "DirectLinkIds": [
    "string"
  ],
  "DirectLinkInterfaceIds": [
    "string"
  ]
}

FiltersExportTask

One or more filters.

Properties

Name Type Description
TaskIds [string] The IDs of the export tasks.

Schema

{
  "TaskIds": [
    "string"
  ]
}

FiltersFlexibleGpu

One or more filters.

Properties

Name Type Description
DeleteOnVmDeletion boolean Indicates whether the fGPU is deleted when terminating the VM.
FlexibleGpuIds [string] One or more IDs of fGPUs.
Generations [string] The processor generations that the fGPUs are compatible with.
ModelNames [string] One or more models of fGPUs. For more information, see About Flexible GPUs.
States [string] The states of the fGPUs (allocated | attaching | attached | detaching).
SubregionNames [string] The Subregions where the fGPUs are located.
VmIds [string] One or more IDs of VMs.

Schema

{
  "DeleteOnVmDeletion": true,
  "FlexibleGpuIds": [
    "string"
  ],
  "Generations": [
    "string"
  ],
  "ModelNames": [
    "string"
  ],
  "States": [
    "string"
  ],
  "SubregionNames": [
    "string"
  ],
  "VmIds": [
    "string"
  ]
}

FiltersImage

One or more filters.

Properties

Name Type Description
AccountAliases [string] The account aliases of the owners of the OMIs.
AccountIds [string] The account IDs of the owners of the OMIs. By default, all the OMIs for which you have launch permissions are described.
Architectures [string] The architectures of the OMIs (i386 | x86_64).
BlockDeviceMappingDeleteOnVmDeletion boolean Whether the volumes are deleted or not when terminating the VM.
BlockDeviceMappingDeviceNames [string] The device names for the volumes.
BlockDeviceMappingSnapshotIds [string] The IDs of the snapshots used to create the volumes.
BlockDeviceMappingVolumeSizes [integer] The sizes of the volumes, in gibibytes (GiB).
BlockDeviceMappingVolumeTypes [string] The types of volumes (standard | gp2 | io1).
Descriptions [string] The descriptions of the OMIs, provided when they were created.
FileLocations [string] The locations of the buckets where the OMI files are stored.
Hypervisors [string] The hypervisor type of the OMI (always xen).
ImageIds [string] The IDs of the OMIs.
ImageNames [string] The names of the OMIs, provided when they were created.
PermissionsToLaunchAccountIds [string] The account IDs which have launch permissions for the OMIs.
PermissionsToLaunchGlobalPermission boolean If true, lists all public OMIs. If false, lists all private OMIs.
ProductCodeNames [string] The names of the product codes associated with the OMI.
ProductCodes [string] The product codes associated with the OMI.
RootDeviceNames [string] The name of the root device. This value must be /dev/sda1.
RootDeviceTypes [string] The types of root device used by the OMIs (bsu or ebs).
States [string] The states of the OMIs (pending | available | failed).
TagKeys [string] The keys of the tags associated with the OMIs.
TagValues [string] The values of the tags associated with the OMIs.
Tags [string] The key/value combination of the tags associated with the OMIs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
VirtualizationTypes [string] The virtualization types (always hvm).

Schema

{
  "AccountAliases": [
    "string"
  ],
  "AccountIds": [
    "string"
  ],
  "Architectures": [
    "string"
  ],
  "BlockDeviceMappingDeleteOnVmDeletion": true,
  "BlockDeviceMappingDeviceNames": [
    "string"
  ],
  "BlockDeviceMappingSnapshotIds": [
    "string"
  ],
  "BlockDeviceMappingVolumeSizes": [
    0
  ],
  "BlockDeviceMappingVolumeTypes": [
    "string"
  ],
  "Descriptions": [
    "string"
  ],
  "FileLocations": [
    "string"
  ],
  "Hypervisors": [
    "string"
  ],
  "ImageIds": [
    "string"
  ],
  "ImageNames": [
    "string"
  ],
  "PermissionsToLaunchAccountIds": [
    "string"
  ],
  "PermissionsToLaunchGlobalPermission": true,
  "ProductCodeNames": [
    "string"
  ],
  "ProductCodes": [
    "string"
  ],
  "RootDeviceNames": [
    "string"
  ],
  "RootDeviceTypes": [
    "string"
  ],
  "States": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ],
  "VirtualizationTypes": [
    "string"
  ]
}

FiltersInternetService

One or more filters.

Properties

Name Type Description
InternetServiceIds [string] The IDs of the Internet services.
LinkNetIds [string] The IDs of the Nets the Internet services are attached to.
LinkStates [string] The current states of the attachments between the Internet services and the Nets (only available, if the Internet gateway is attached to a Net).
TagKeys [string] The keys of the tags associated with the Internet services.
TagValues [string] The values of the tags associated with the Internet services.
Tags [string] The key/value combination of the tags associated with the Internet services, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "InternetServiceIds": [
    "string"
  ],
  "LinkNetIds": [
    "string"
  ],
  "LinkStates": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

FiltersKeypair

One or more filters.

Properties

Name Type Description
KeypairFingerprints [string] The fingerprints of the keypairs.
KeypairNames [string] The names of the keypairs.
KeypairTypes [string] The types of the keypairs (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).

Schema

{
  "KeypairFingerprints": [
    "string"
  ],
  "KeypairNames": [
    "string"
  ],
  "KeypairTypes": [
    "string"
  ]
}

FiltersListenerRule

One or more filters.

Properties

Name Type Description
ListenerRuleNames [string] The names of the listener rules.

Schema

{
  "ListenerRuleNames": [
    "string"
  ]
}

FiltersLoadBalancer

One or more filters.

Properties

Name Type Description
LoadBalancerNames [string] The names of the load balancers.

Schema

{
  "LoadBalancerNames": [
    "string"
  ]
}

FiltersNatService

One or more filters.

Properties

Name Type Description
NatServiceIds [string] The IDs of the NAT services.
NetIds [string] The IDs of the Nets in which the NAT services are.
States [string] The states of the NAT services (pending | available | deleting | deleted).
SubnetIds [string] The IDs of the Subnets in which the NAT services are.
TagKeys [string] The keys of the tags associated with the NAT services.
TagValues [string] The values of the tags associated with the NAT services.
Tags [string] The key/value combination of the tags associated with the NAT services, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "NatServiceIds": [
    "string"
  ],
  "NetIds": [
    "string"
  ],
  "States": [
    "string"
  ],
  "SubnetIds": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

FiltersNet

One or more filters.

Properties

Name Type Description
DhcpOptionsSetIds [string] The IDs of the DHCP options sets.
IpRanges [string] The IP ranges for the Nets, in CIDR notation (for example, 10.0.0.0/16).
IsDefault boolean If true, the Net used is the default one.
NetIds [string] The IDs of the Nets.
States [string] The states of the Nets (pending | available | deleting).
TagKeys [string] The keys of the tags associated with the Nets.
TagValues [string] The values of the tags associated with the Nets.
Tags [string] The key/value combination of the tags associated with the Nets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "DhcpOptionsSetIds": [
    "string"
  ],
  "IpRanges": [
    "string"
  ],
  "IsDefault": true,
  "NetIds": [
    "string"
  ],
  "States": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

FiltersNetAccessPoint

One or more filters.

Properties

Name Type Description
NetAccessPointIds [string] The IDs of the Net access points.
NetIds [string] The IDs of the Nets.
ServiceNames [string] The names of the services. For more information, see ReadNetAccessPointServices.
States [string] The states of the Net access points (pending | available | deleting | deleted).
TagKeys [string] The keys of the tags associated with the Net access points.
TagValues [string] The values of the tags associated with the Net access points.
Tags [string] The key/value combination of the tags associated with the Net access points, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "NetAccessPointIds": [
    "string"
  ],
  "NetIds": [
    "string"
  ],
  "ServiceNames": [
    "string"
  ],
  "States": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

FiltersNetPeering

One or more filters.

Properties

Name Type Description
AccepterNetAccountIds [string] The account IDs of the owners of the peer Nets.
AccepterNetIpRanges [string] The IP ranges of the peer Nets, in CIDR notation (for example, 10.0.0.0/24).
AccepterNetNetIds [string] The IDs of the peer Nets.
ExpirationDates [string] The dates and times at which the Net peerings expire, in ISO 8601 date-time format (for example, 2020-06-14T00:00:00.000Z).
NetPeeringIds [string] The IDs of the Net peerings.
SourceNetAccountIds [string] The account IDs of the owners of the peer Nets.
SourceNetIpRanges [string] The IP ranges of the peer Nets.
SourceNetNetIds [string] The IDs of the peer Nets.
StateMessages [string] Additional information about the states of the Net peerings.
StateNames [string] The states of the Net peerings (pending-acceptance | active | rejected | failed | expired | deleted).
TagKeys [string] The keys of the tags associated with the Net peerings.
TagValues [string] The values of the tags associated with the Net peerings.
Tags [string] The key/value combination of the tags associated with the Net peerings, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "AccepterNetAccountIds": [
    "string"
  ],
  "AccepterNetIpRanges": [
    "string"
  ],
  "AccepterNetNetIds": [
    "string"
  ],
  "ExpirationDates": [
    "2019-08-24T14:15:22Z"
  ],
  "NetPeeringIds": [
    "string"
  ],
  "SourceNetAccountIds": [
    "string"
  ],
  "SourceNetIpRanges": [
    "string"
  ],
  "SourceNetNetIds": [
    "string"
  ],
  "StateMessages": [
    "string"
  ],
  "StateNames": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

FiltersNic

One or more filters.

Properties

Name Type Description
Descriptions [string] The descriptions of the NICs.
IsSourceDestCheck boolean Whether the source/destination checking is enabled (true) or disabled (false).
LinkNicDeleteOnVmDeletion boolean Whether the NICs are deleted when the VMs they are attached to are terminated.
LinkNicDeviceNumbers [integer] The device numbers the NICs are attached to.
LinkNicLinkNicIds [string] The attachment IDs of the NICs.
LinkNicStates [string] The states of the attachments.
LinkNicVmAccountIds [string] The account IDs of the owners of the VMs the NICs are attached to.
LinkNicVmIds [string] The IDs of the VMs the NICs are attached to.
LinkPublicIpAccountIds [string] The account IDs of the owners of the public IPs associated with the NICs.
LinkPublicIpLinkPublicIpIds [string] The association IDs returned when the public IPs were associated with the NICs.
LinkPublicIpPublicIpIds [string] The allocation IDs returned when the public IPs were allocated to their accounts.
LinkPublicIpPublicIps [string] The public IPs associated with the NICs.
MacAddresses [string] The Media Access Control (MAC) addresses of the NICs.
NetIds [string] The IDs of the Nets where the NICs are located.
NicIds [string] The IDs of the NICs.
PrivateDnsNames [string] The private DNS names associated with the primary private IPs.
PrivateIpsLinkPublicIpAccountIds [string] The account IDs of the owner of the public IPs associated with the private IPs.
PrivateIpsLinkPublicIpPublicIps [string] The public IPs associated with the private IPs.
PrivateIpsPrimaryIp boolean Whether the private IP is the primary IP associated with the NIC.
PrivateIpsPrivateIps [string] The private IPs of the NICs.
SecurityGroupIds [string] The IDs of the security groups associated with the NICs.
SecurityGroupNames [string] The names of the security groups associated with the NICs.
States [string] The states of the NICs.
SubnetIds [string] The IDs of the Subnets for the NICs.
SubregionNames [string] The Subregions where the NICs are located.
TagKeys [string] The keys of the tags associated with the NICs.
TagValues [string] The values of the tags associated with the NICs.
Tags [string] The key/value combination of the tags associated with the NICs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "Descriptions": [
    "string"
  ],
  "IsSourceDestCheck": true,
  "LinkNicDeleteOnVmDeletion": true,
  "LinkNicDeviceNumbers": [
    0
  ],
  "LinkNicLinkNicIds": [
    "string"
  ],
  "LinkNicStates": [
    "string"
  ],
  "LinkNicVmAccountIds": [
    "string"
  ],
  "LinkNicVmIds": [
    "string"
  ],
  "LinkPublicIpAccountIds": [
    "string"
  ],
  "LinkPublicIpLinkPublicIpIds": [
    "string"
  ],
  "LinkPublicIpPublicIpIds": [
    "string"
  ],
  "LinkPublicIpPublicIps": [
    "string"
  ],
  "MacAddresses": [
    "string"
  ],
  "NetIds": [
    "string"
  ],
  "NicIds": [
    "string"
  ],
  "PrivateDnsNames": [
    "string"
  ],
  "PrivateIpsLinkPublicIpAccountIds": [
    "string"
  ],
  "PrivateIpsLinkPublicIpPublicIps": [
    "string"
  ],
  "PrivateIpsPrimaryIp": true,
  "PrivateIpsPrivateIps": [
    "string"
  ],
  "SecurityGroupIds": [
    "string"
  ],
  "SecurityGroupNames": [
    "string"
  ],
  "States": [
    "string"
  ],
  "SubnetIds": [
    "string"
  ],
  "SubregionNames": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

FiltersProductType

One or more filters.

Properties

Name Type Description
ProductTypeIds [string] The IDs of the product types.

Schema

{
  "ProductTypeIds": [
    "string"
  ]
}

FiltersPublicIp

One or more filters.

Properties

Name Type Description
LinkPublicIpIds [string] The IDs representing the associations of public IPs with VMs or NICs.
NicAccountIds [string] The account IDs of the owners of the NICs.
NicIds [string] The IDs of the NICs.
Placements [string] Whether the public IPs are for use in the public Cloud or in a Net.
PrivateIps [string] The private IPs associated with the public IPs.
PublicIpIds [string] The IDs of the public IPs.
PublicIps [string] The public IPs.
TagKeys [string] The keys of the tags associated with the public IPs.
TagValues [string] The values of the tags associated with the public IPs.
Tags [string] The key/value combination of the tags associated with the public IPs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
VmIds [string] The IDs of the VMs.

Schema

{
  "LinkPublicIpIds": [
    "string"
  ],
  "NicAccountIds": [
    "string"
  ],
  "NicIds": [
    "string"
  ],
  "Placements": [
    "string"
  ],
  "PrivateIps": [
    "string"
  ],
  "PublicIpIds": [
    "string"
  ],
  "PublicIps": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ],
  "VmIds": [
    "string"
  ]
}

FiltersQuota

One or more filters.

Properties

Name Type Description
Collections [string] The group names of the quotas.
QuotaNames [string] The names of the quotas.
QuotaTypes [string] The resource IDs if these are resource-specific quotas, global if they are not.
ShortDescriptions [string] The description of the quotas.

Schema

{
  "Collections": [
    "string"
  ],
  "QuotaNames": [
    "string"
  ],
  "QuotaTypes": [
    "string"
  ],
  "ShortDescriptions": [
    "string"
  ]
}

FiltersRouteTable

One or more filters.

Properties

Name Type Description
LinkRouteTableIds [string] The IDs of the route tables involved in the associations.
LinkRouteTableLinkRouteTableIds [string] The IDs of the associations between the route tables and the Subnets.
LinkRouteTableMain boolean If true, the route tables are the main ones for their Nets.
LinkSubnetIds [string] The IDs of the Subnets involved in the associations.
NetIds [string] The IDs of the Nets for the route tables.
RouteCreationMethods [string] The methods used to create a route.
RouteDestinationIpRanges [string] The IP ranges specified in routes in the tables.
RouteDestinationServiceIds [string] The service IDs specified in routes in the tables.
RouteGatewayIds [string] The IDs of the gateways specified in routes in the tables.
RouteNatServiceIds [string] The IDs of the NAT services specified in routes in the tables.
RouteNetPeeringIds [string] The IDs of the Net peerings specified in routes in the tables.
RouteStates [string] The states of routes in the route tables (always active).
RouteTableIds [string] The IDs of the route tables.
RouteVmIds [string] The IDs of the VMs specified in routes in the tables.
TagKeys [string] The keys of the tags associated with the route tables.
TagValues [string] The values of the tags associated with the route tables.
Tags [string] The key/value combination of the tags associated with the route tables, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "LinkRouteTableIds": [
    "string"
  ],
  "LinkRouteTableLinkRouteTableIds": [
    "string"
  ],
  "LinkRouteTableMain": true,
  "LinkSubnetIds": [
    "string"
  ],
  "NetIds": [
    "string"
  ],
  "RouteCreationMethods": [
    "string"
  ],
  "RouteDestinationIpRanges": [
    "string"
  ],
  "RouteDestinationServiceIds": [
    "string"
  ],
  "RouteGatewayIds": [
    "string"
  ],
  "RouteNatServiceIds": [
    "string"
  ],
  "RouteNetPeeringIds": [
    "string"
  ],
  "RouteStates": [
    "string"
  ],
  "RouteTableIds": [
    "string"
  ],
  "RouteVmIds": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

FiltersSecurityGroup

One or more filters.

Properties

Name Type Description
Descriptions [string] The descriptions of the security groups.
InboundRuleAccountIds [string] The account IDs that have been granted permissions.
InboundRuleFromPortRanges [integer] The beginnings of the port ranges for the TCP and UDP protocols, or the ICMP type numbers.
InboundRuleIpRanges [string] The IP ranges that have been granted permissions, in CIDR notation (for example, 10.0.0.0/24).
InboundRuleProtocols [string] The IP protocols for the permissions (tcp | udp | icmp, or a protocol number, or -1 for all protocols).
InboundRuleSecurityGroupIds [string] The IDs of the security groups that have been granted permissions.
InboundRuleSecurityGroupNames [string] The names of the security groups that have been granted permissions.
InboundRuleToPortRanges [integer] The ends of the port ranges for the TCP and UDP protocols, or the ICMP code numbers.
NetIds [string] The IDs of the Nets specified when the security groups were created.
OutboundRuleAccountIds [string] The account IDs that have been granted permissions.
OutboundRuleFromPortRanges [integer] The beginnings of the port ranges for the TCP and UDP protocols, or the ICMP type numbers.
OutboundRuleIpRanges [string] The IP ranges that have been granted permissions, in CIDR notation (for example, 10.0.0.0/24).
OutboundRuleProtocols [string] The IP protocols for the permissions (tcp | udp | icmp, or a protocol number, or -1 for all protocols).
OutboundRuleSecurityGroupIds [string] The IDs of the security groups that have been granted permissions.
OutboundRuleSecurityGroupNames [string] The names of the security groups that have been granted permissions.
OutboundRuleToPortRanges [integer] The ends of the port ranges for the TCP and UDP protocols, or the ICMP code numbers.
SecurityGroupIds [string] The IDs of the security groups.
SecurityGroupNames [string] The names of the security groups.
TagKeys [string] The keys of the tags associated with the security groups.
TagValues [string] The values of the tags associated with the security groups.
Tags [string] The key/value combination of the tags associated with the security groups, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "Descriptions": [
    "string"
  ],
  "InboundRuleAccountIds": [
    "string"
  ],
  "InboundRuleFromPortRanges": [
    0
  ],
  "InboundRuleIpRanges": [
    "string"
  ],
  "InboundRuleProtocols": [
    "string"
  ],
  "InboundRuleSecurityGroupIds": [
    "string"
  ],
  "InboundRuleSecurityGroupNames": [
    "string"
  ],
  "InboundRuleToPortRanges": [
    0
  ],
  "NetIds": [
    "string"
  ],
  "OutboundRuleAccountIds": [
    "string"
  ],
  "OutboundRuleFromPortRanges": [
    0
  ],
  "OutboundRuleIpRanges": [
    "string"
  ],
  "OutboundRuleProtocols": [
    "string"
  ],
  "OutboundRuleSecurityGroupIds": [
    "string"
  ],
  "OutboundRuleSecurityGroupNames": [
    "string"
  ],
  "OutboundRuleToPortRanges": [
    0
  ],
  "SecurityGroupIds": [
    "string"
  ],
  "SecurityGroupNames": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

FiltersServerCertificate

One or more filters.

Properties

Name Type Description
Paths [string] The paths to the server certificates.

Schema

{
  "Paths": [
    "string"
  ]
}

FiltersService

One or more filters.

Properties

Name Type Description
ServiceIds [string] The IDs of the services.
ServiceNames [string] The names of the services.

Schema

{
  "ServiceIds": [
    "string"
  ],
  "ServiceNames": [
    "string"
  ]
}

FiltersSnapshot

One or more filters.

Properties

Name Type Description
AccountAliases [string] The account aliases of the owners of the snapshots.
AccountIds [string] The account IDs of the owners of the snapshots.
Descriptions [string] The descriptions of the snapshots.
FromCreationDate string (date-time) The beginning of the time period, in ISO 8601 date-time format (for example, 2020-06-14T00:00:00.000Z).
PermissionsToCreateVolumeAccountIds [string] The account IDs which have permissions to create volumes.
PermissionsToCreateVolumeGlobalPermission boolean If true, lists all public volumes. If false, lists all private volumes.
Progresses [integer] The progresses of the snapshots, as a percentage.
SnapshotIds [string] The IDs of the snapshots.
States [string] The states of the snapshots (in-queue | pending | completed | error | deleting).
TagKeys [string] The keys of the tags associated with the snapshots.
TagValues [string] The values of the tags associated with the snapshots.
Tags [string] The key/value combination of the tags associated with the snapshots, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
ToCreationDate string (date-time) The end of the time period, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).
VolumeIds [string] The IDs of the volumes used to create the snapshots.
VolumeSizes [integer] The sizes of the volumes used to create the snapshots, in gibibytes (GiB).

Schema

{
  "AccountAliases": [
    "string"
  ],
  "AccountIds": [
    "string"
  ],
  "Descriptions": [
    "string"
  ],
  "FromCreationDate": "2019-08-24T14:15:22Z",
  "PermissionsToCreateVolumeAccountIds": [
    "string"
  ],
  "PermissionsToCreateVolumeGlobalPermission": true,
  "Progresses": [
    0
  ],
  "SnapshotIds": [
    "string"
  ],
  "States": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ],
  "ToCreationDate": "2019-08-24T14:15:22Z",
  "VolumeIds": [
    "string"
  ],
  "VolumeSizes": [
    0
  ]
}

FiltersSubnet

One or more filters.

Properties

Name Type Description
AvailableIpsCounts [integer] The number of available IPs.
IpRanges [string] The IP ranges in the Subnets, in CIDR notation (for example, 10.0.0.0/16).
NetIds [string] The IDs of the Nets in which the Subnets are.
States [string] The states of the Subnets (pending | available | deleted).
SubnetIds [string] The IDs of the Subnets.
SubregionNames [string] The names of the Subregions in which the Subnets are located.
TagKeys [string] The keys of the tags associated with the Subnets.
TagValues [string] The values of the tags associated with the Subnets.
Tags [string] The key/value combination of the tags associated with the Subnets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Schema

{
  "AvailableIpsCounts": [
    0
  ],
  "IpRanges": [
    "string"
  ],
  "NetIds": [
    "string"
  ],
  "States": [
    "string"
  ],
  "SubnetIds": [
    "string"
  ],
  "SubregionNames": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ]
}

FiltersSubregion

One or more filters.

Properties

Name Type Description
RegionNames [string] The names of the Regions containing the Subregions.
States [string] The states of the Subregions.
SubregionNames [string] The names of the Subregions.

Schema

{
  "RegionNames": [
    "string"
  ],
  "States": [
    "string"
  ],
  "SubregionNames": [
    "string"
  ]
}

FiltersTag

One or more filters.

Properties

Name Type Description
Keys [string] The keys of the tags that are assigned to the resources. You can use this filter alongside the Values filter. In that case, you filter the resources corresponding to each tag, regardless of the other filter.
ResourceIds [string] The IDs of the resources with which the tags are associated.
ResourceTypes [string] The resource type (vm | image | volume | snapshot | public-ip | security-group | route-table | nic | net | subnet | net-peering | net-access-point | nat-service | internet-service | client-gateway | virtual-gateway | vpn-connection | dhcp-options | task).
Values [string] The values of the tags that are assigned to the resources. You can use this filter alongside the TagKeys filter. In that case, you filter the resources corresponding to each tag, regardless of the other filter.

Schema

{
  "Keys": [
    "string"
  ],
  "ResourceIds": [
    "string"
  ],
  "ResourceTypes": [
    "string"
  ],
  "Values": [
    "string"
  ]
}

FiltersVirtualGateway

One or more filters.

Properties

Name Type Description
ConnectionTypes [string] The types of the virtual gateways (only ipsec.1 is supported).
LinkNetIds [string] The IDs of the Nets the virtual gateways are attached to.
LinkStates [string] The current states of the attachments between the virtual gateways and the Nets (attaching | attached | detaching | detached).
States [string] The states of the virtual gateways (pending | available | deleting | deleted).
TagKeys [string] The keys of the tags associated with the virtual gateways.
TagValues [string] The values of the tags associated with the virtual gateways.
Tags [string] The key/value combination of the tags associated with the virtual gateways, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
VirtualGatewayIds [string] The IDs of the virtual gateways.

Schema

{
  "ConnectionTypes": [
    "string"
  ],
  "LinkNetIds": [
    "string"
  ],
  "LinkStates": [
    "string"
  ],
  "States": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ],
  "VirtualGatewayIds": [
    "string"
  ]
}

FiltersVm

One or more filters.

Properties

Name Type Description
Architectures [string] The architectures of the VMs (i386 | x86_64).
BlockDeviceMappingDeleteOnVmDeletion boolean Whether the BSU volumes are deleted when terminating the VMs.
BlockDeviceMappingDeviceNames [string] The device names for the BSU volumes (in the format /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX).
BlockDeviceMappingLinkDates [string (date or date-time)] The link dates for the BSU volumes mapped to the VMs (for example, 2016-01-23T18:45:30.000Z).
BlockDeviceMappingStates [string] The states for the BSU volumes (attaching | attached | detaching | detached).
BlockDeviceMappingVolumeIds [string] The volume IDs of the BSU volumes.
ClientTokens [string] The idempotency tokens provided when launching the VMs.
CreationDates [string (date or date-time)] The dates when the VMs were launched.
ImageIds [string] The IDs of the OMIs used to launch the VMs.
IsSourceDestChecked boolean Whether the source/destination checking is enabled (true) or disabled (false).
KeypairNames [string] The names of the keypairs used when launching the VMs.
LaunchNumbers [integer] The numbers for the VMs when launching a group of several VMs (for example, 0, 1, 2, and so on).
Lifecycles [string] Whether the VMs are Spot Instances (spot).
NetIds [string] The IDs of the Nets in which the VMs are running.
NicAccountIds [string] The IDs of the NICs.
NicDescriptions [string] The descriptions of the NICs.
NicIsSourceDestChecked boolean Whether the source/destination checking is enabled (true) or disabled (false).
NicLinkNicDeleteOnVmDeletion boolean Whether the NICs are deleted when the VMs they are attached to are deleted.
NicLinkNicDeviceNumbers [integer] The device numbers the NICs are attached to.
NicLinkNicLinkNicDates [string (date or date-time)] The dates and times (UTC) when the NICs were attached to the VMs.
NicLinkNicLinkNicIds [string] The IDs of the NIC attachments.
NicLinkNicStates [string] The states of the attachments.
NicLinkNicVmAccountIds [string] The account IDs of the owners of the VMs the NICs are attached to.
NicLinkNicVmIds [string] The IDs of the VMs the NICs are attached to.
NicLinkPublicIpAccountIds [string] The account IDs of the owners of the public IPs associated with the NICs.
NicLinkPublicIpLinkPublicIpIds [string] The association IDs returned when the public IPs were associated with the NICs.
NicLinkPublicIpPublicIpIds [string] The allocation IDs returned when the public IPs were allocated to their accounts.
NicLinkPublicIpPublicIps [string] The public IPs associated with the NICs.
NicMacAddresses [string] The Media Access Control (MAC) addresses of the NICs.
NicNetIds [string] The IDs of the Nets where the NICs are located.
NicNicIds [string] The IDs of the NICs.
NicPrivateIpsLinkPublicIpAccountIds [string] The account IDs of the owner of the public IPs associated with the private IPs.
NicPrivateIpsLinkPublicIpIds [string] The public IPs associated with the private IPs.
NicPrivateIpsPrimaryIp boolean Whether the private IPs are the primary IPs associated with the NICs.
NicPrivateIpsPrivateIps [string] The private IPs of the NICs.
NicSecurityGroupIds [string] The IDs of the security groups associated with the NICs.
NicSecurityGroupNames [string] The names of the security groups associated with the NICs.
NicStates [string] The states of the NICs (available | in-use).
NicSubnetIds [string] The IDs of the Subnets for the NICs.
NicSubregionNames [string] The Subregions where the NICs are located.
Platforms [string] The platforms. Use windows if you have Windows VMs. Otherwise, leave this filter blank.
PrivateIps [string] The private IPs of the VMs.
ProductCodes [string] The product codes associated with the OMI used to create the VMs.
PublicIps [string] The public IPs of the VMs.
ReservationIds [string] The IDs of the reservation of the VMs, created every time you launch VMs. These reservation IDs can be associated with several VMs when you lauch a group of VMs using the same launch request.
RootDeviceNames [string] The names of the root devices for the VMs (for example, /dev/sda1)
RootDeviceTypes [string] The root devices types used by the VMs (always ebs)
SecurityGroupIds [string] The IDs of the security groups for the VMs (only in the public Cloud).
SecurityGroupNames [string] The names of the security groups for the VMs (only in the public Cloud).
StateReasonCodes [integer] The reason codes for the state changes.
StateReasonMessages [string] The messages describing the state changes.
StateReasons [string] The reasons explaining the current states of the VMs. This filter is like the StateReasonCodes one.
SubnetIds [string] The IDs of the Subnets for the VMs.
SubregionNames [string] The names of the Subregions of the VMs.
TagKeys [string] The keys of the tags associated with the VMs.
TagValues [string] The values of the tags associated with the VMs.
Tags [string] The key/value combination of the tags associated with the VMs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
Tenancies [string] The tenancies of the VMs (dedicated | default | host).
VmIds [string] One or more IDs of VMs.
VmSecurityGroupIds [string] The IDs of the security groups for the VMs.
VmSecurityGroupNames [string] The names of the security group for the VMs.
VmStateCodes [integer] The state codes of the VMs: -1 (quarantine), 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).
VmStateNames [string] The state names of the VMs (pending | running | stopping | stopped | shutting-down | terminated | quarantine).
VmTypes [string] The VM types (for example, t2.micro). For more information, see VM Types.

Schema

{
  "Architectures": [
    "string"
  ],
  "BlockDeviceMappingDeleteOnVmDeletion": true,
  "BlockDeviceMappingDeviceNames": [
    "string"
  ],
  "BlockDeviceMappingLinkDates": [
    "2019-08-24"
  ],
  "BlockDeviceMappingStates": [
    "string"
  ],
  "BlockDeviceMappingVolumeIds": [
    "string"
  ],
  "ClientTokens": [
    "string"
  ],
  "CreationDates": [
    "2019-08-24"
  ],
  "ImageIds": [
    "string"
  ],
  "IsSourceDestChecked": true,
  "KeypairNames": [
    "string"
  ],
  "LaunchNumbers": [
    0
  ],
  "Lifecycles": [
    "string"
  ],
  "NetIds": [
    "string"
  ],
  "NicAccountIds": [
    "string"
  ],
  "NicDescriptions": [
    "string"
  ],
  "NicIsSourceDestChecked": true,
  "NicLinkNicDeleteOnVmDeletion": true,
  "NicLinkNicDeviceNumbers": [
    0
  ],
  "NicLinkNicLinkNicDates": [
    "2019-08-24"
  ],
  "NicLinkNicLinkNicIds": [
    "string"
  ],
  "NicLinkNicStates": [
    "string"
  ],
  "NicLinkNicVmAccountIds": [
    "string"
  ],
  "NicLinkNicVmIds": [
    "string"
  ],
  "NicLinkPublicIpAccountIds": [
    "string"
  ],
  "NicLinkPublicIpLinkPublicIpIds": [
    "string"
  ],
  "NicLinkPublicIpPublicIpIds": [
    "string"
  ],
  "NicLinkPublicIpPublicIps": [
    "string"
  ],
  "NicMacAddresses": [
    "string"
  ],
  "NicNetIds": [
    "string"
  ],
  "NicNicIds": [
    "string"
  ],
  "NicPrivateIpsLinkPublicIpAccountIds": [
    "string"
  ],
  "NicPrivateIpsLinkPublicIpIds": [
    "string"
  ],
  "NicPrivateIpsPrimaryIp": true,
  "NicPrivateIpsPrivateIps": [
    "string"
  ],
  "NicSecurityGroupIds": [
    "string"
  ],
  "NicSecurityGroupNames": [
    "string"
  ],
  "NicStates": [
    "string"
  ],
  "NicSubnetIds": [
    "string"
  ],
  "NicSubregionNames": [
    "string"
  ],
  "Platforms": [
    "string"
  ],
  "PrivateIps": [
    "string"
  ],
  "ProductCodes": [
    "string"
  ],
  "PublicIps": [
    "string"
  ],
  "ReservationIds": [
    "string"
  ],
  "RootDeviceNames": [
    "string"
  ],
  "RootDeviceTypes": [
    "string"
  ],
  "SecurityGroupIds": [
    "string"
  ],
  "SecurityGroupNames": [
    "string"
  ],
  "StateReasonCodes": [
    0
  ],
  "StateReasonMessages": [
    "string"
  ],
  "StateReasons": [
    "string"
  ],
  "SubnetIds": [
    "string"
  ],
  "SubregionNames": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ],
  "Tenancies": [
    "string"
  ],
  "VmIds": [
    "string"
  ],
  "VmSecurityGroupIds": [
    "string"
  ],
  "VmSecurityGroupNames": [
    "string"
  ],
  "VmStateCodes": [
    0
  ],
  "VmStateNames": [
    "string"
  ],
  "VmTypes": [
    "string"
  ]
}

FiltersVmGroup

One or more filters.

Properties

Name Type Description
Descriptions [string] The descriptions of the VM groups.
SecurityGroupIds [string] The IDs of the security groups.
SubnetIds [string] The IDs of the Subnets.
TagKeys [string] The keys of the tags associated with the VM groups.
TagValues [string] The values of the tags associated with the VM groups.
Tags [string] The key/value combination of the tags associated with the VMs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
VmCounts [integer] The number of VMs in the VM group.
VmGroupIds [string] The IDs of the VM groups.
VmGroupNames [string] The names of the VM groups.
VmTemplateIds [string] The IDs of the VM templates.

Schema

{
  "Descriptions": [
    "string"
  ],
  "SecurityGroupIds": [
    "string"
  ],
  "SubnetIds": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ],
  "VmCounts": [
    0
  ],
  "VmGroupIds": [
    "string"
  ],
  "VmGroupNames": [
    "string"
  ],
  "VmTemplateIds": [
    "string"
  ]
}

FiltersVmTemplate

Properties

Name Type Description
CpuCores [integer] The number of vCores.
CpuGenerations [string] The processor generations (for example, v4).
CpuPerformances [string] The performances of the VMs.
Descriptions [string] The descriptions of the VM templates.
ImageIds [string] The IDs of the OMIs.
KeypairNames [string] The names of the keypairs.
Rams [integer] The amount of RAM.
TagKeys [string] The keys of the tags associated with the VM templates.
TagValues [string] The values of the tags associated with the VM templates.
Tags [string] The key/value combination of the tags associated with the VM templates, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
VmTemplateIds [string] The IDs of the VM templates.
VmTemplateNames [string] The names of the VM templates.

Schema

{
  "CpuCores": [
    0
  ],
  "CpuGenerations": [
    "string"
  ],
  "CpuPerformances": [
    "string"
  ],
  "Descriptions": [
    "string"
  ],
  "ImageIds": [
    "string"
  ],
  "KeypairNames": [
    "string"
  ],
  "Rams": [
    0
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ],
  "VmTemplateIds": [
    "string"
  ],
  "VmTemplateNames": [
    "string"
  ]
}

FiltersVmType

One or more filters.

Properties

Name Type Description
BsuOptimized boolean This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.
EphemeralsTypes [string] The types of ephemeral storage disk.
Eths [integer] The number of Ethernet interfaces available.
Gpus [integer] The number of GPUs available.
MemorySizes [number] The amounts of memory, in gibibytes (GiB).
VcoreCounts [integer] The numbers of vCores.
VmTypeNames [string] The names of the VM types. For more information, see VM Types.
VolumeCounts [integer] The maximum number of ephemeral storage disks.
VolumeSizes [integer] The size of one ephemeral storage disk, in gibibytes (GiB).

Schema

{
  "BsuOptimized": true,
  "EphemeralsTypes": [
    "string"
  ],
  "Eths": [
    0
  ],
  "Gpus": [
    0
  ],
  "MemorySizes": [
    0.1
  ],
  "VcoreCounts": [
    0
  ],
  "VmTypeNames": [
    "string"
  ],
  "VolumeCounts": [
    0
  ],
  "VolumeSizes": [
    0
  ]
}

FiltersVmsState

One or more filters.

Properties

Name Type Description
MaintenanceEventCodes [string] The code for the scheduled event (system-reboot | system-maintenance).
MaintenanceEventDescriptions [string] The description of the scheduled event.
MaintenanceEventsNotAfter [string] The latest date and time (UTC) the event can end.
MaintenanceEventsNotBefore [string] The earliest date and time (UTC) the event can start.
SubregionNames [string] The names of the Subregions of the VMs.
VmIds [string] One or more IDs of VMs.
VmStates [string] The states of the VMs (pending | running | stopping | stopped | shutting-down | terminated | quarantine).

Schema

{
  "MaintenanceEventCodes": [
    "string"
  ],
  "MaintenanceEventDescriptions": [
    "string"
  ],
  "MaintenanceEventsNotAfter": [
    "2019-08-24"
  ],
  "MaintenanceEventsNotBefore": [
    "2019-08-24"
  ],
  "SubregionNames": [
    "string"
  ],
  "VmIds": [
    "string"
  ],
  "VmStates": [
    "string"
  ]
}

FiltersVolume

One or more filters.

Properties

Name Type Description
CreationDates [string] The dates and times of creation of the volumes, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).
LinkVolumeDeleteOnVmDeletion boolean Whether the volumes are deleted or not when terminating the VMs.
LinkVolumeDeviceNames [string] The VM device names.
LinkVolumeLinkDates [string] The dates and times of creation of the volumes, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).
LinkVolumeLinkStates [string] The attachment states of the volumes (attaching | detaching | attached | detached).
LinkVolumeVmIds [string] One or more IDs of VMs.
SnapshotIds [string] The snapshots from which the volumes were created.
SubregionNames [string] The names of the Subregions in which the volumes were created.
TagKeys [string] The keys of the tags associated with the volumes.
TagValues [string] The values of the tags associated with the volumes.
Tags [string] The key/value combination of the tags associated with the volumes, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
VolumeIds [string] The IDs of the volumes.
VolumeSizes [integer] The sizes of the volumes, in gibibytes (GiB).
VolumeStates [string] The states of the volumes (creating | available | in-use | updating | deleting | error).
VolumeTypes [string] The types of the volumes (standard | gp2 | io1).

Schema

{
  "CreationDates": [
    "2019-08-24T14:15:22Z"
  ],
  "LinkVolumeDeleteOnVmDeletion": true,
  "LinkVolumeDeviceNames": [
    "string"
  ],
  "LinkVolumeLinkDates": [
    "2019-08-24T14:15:22Z"
  ],
  "LinkVolumeLinkStates": [
    "string"
  ],
  "LinkVolumeVmIds": [
    "string"
  ],
  "SnapshotIds": [
    "string"
  ],
  "SubregionNames": [
    "string"
  ],
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ],
  "VolumeIds": [
    "string"
  ],
  "VolumeSizes": [
    0
  ],
  "VolumeStates": [
    "string"
  ],
  "VolumeTypes": [
    "string"
  ]
}

FiltersVpnConnection

One or more filters.

Properties

Name Type Description
BgpAsns [integer] The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of the connections.
ClientGatewayIds [string] The IDs of the client gateways.
ConnectionTypes [string] The types of the VPN connections (only ipsec.1 is supported).
RouteDestinationIpRanges [string] The destination IP ranges.
States [string] The states of the VPN connections (pending | available | deleting | deleted).
StaticRoutesOnly boolean If false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If true, routing is controlled using static routes. For more information about how to create and delete static routes, see CreateVpnConnectionRoute and DeleteVpnConnectionRoute.
TagKeys [string] The keys of the tags associated with the VPN connections.
TagValues [string] The values of the tags associated with the VPN connections.
Tags [string] The key/value combination of the tags associated with the VPN connections, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
VirtualGatewayIds [string] The IDs of the virtual gateways.
VpnConnectionIds [string] The IDs of the VPN connections.

Schema

{
  "BgpAsns": [
    0
  ],
  "ClientGatewayIds": [
    "string"
  ],
  "ConnectionTypes": [
    "string"
  ],
  "RouteDestinationIpRanges": [
    "string"
  ],
  "States": [
    "string"
  ],
  "StaticRoutesOnly": true,
  "TagKeys": [
    "string"
  ],
  "TagValues": [
    "string"
  ],
  "Tags": [
    "string"
  ],
  "VirtualGatewayIds": [
    "string"
  ],
  "VpnConnectionIds": [
    "string"
  ]
}

FlexibleGpu

Information about the flexible GPU (fGPU).

Properties

Name Type Description
DeleteOnVmDeletion boolean If true, the fGPU is deleted when the VM is terminated.
FlexibleGpuId string The ID of the fGPU.
Generation string The compatible processor generation.
ModelName string The model of fGPU. For more information, see About Flexible GPUs.
State string The state of the fGPU (allocated | attaching | attached | detaching).
SubregionName string The Subregion where the fGPU is located.
VmId string The ID of the VM the fGPU is attached to, if any.

Schema

{
  "DeleteOnVmDeletion": true,
  "FlexibleGpuId": "string",
  "Generation": "string",
  "ModelName": "string",
  "State": "string",
  "SubregionName": "string",
  "VmId": "string"
}

FlexibleGpuCatalog

Information about the flexible GPU (fGPU) that is available in the public catalog.

Properties

Name Type Description
Generations [string] The generations of VMs that the fGPU is compatible with.
MaxCpu integer The maximum number of VM vCores that the fGPU is compatible with.
MaxRam integer The maximum amount of VM memory that the fGPU is compatible with.
ModelName string The model of fGPU.
VRam integer The amount of video RAM (VRAM) of the fGPU.

Schema

{
  "Generations": [
    "string"
  ],
  "MaxCpu": 0,
  "MaxRam": 0,
  "ModelName": "string",
  "VRam": 0
}

HealthCheck

Information about the health check configuration.

Properties

Name Type Description
CheckInterval integer The number of seconds between two requests (between 5 and 600 both included).
HealthyThreshold integer The number of consecutive successful requests before considering the VM as healthy (between 2 and 10 both included).
Path string If you use the HTTP or HTTPS protocols, the request URL path.
Port integer The port number (between 1 and 65535, both included).
Protocol string The protocol for the URL of the VM (HTTP | HTTPS | TCP | SSL).
Timeout integer The maximum waiting time for a response before considering the VM as unhealthy, in seconds (between 2 and 60 both included).
UnhealthyThreshold integer The number of consecutive failed requests before considering the VM as unhealthy (between 2 and 10 both included).

Schema

{
  "CheckInterval": 0,
  "HealthyThreshold": 0,
  "Path": "string",
  "Port": 0,
  "Protocol": "string",
  "Timeout": 0,
  "UnhealthyThreshold": 0
}

Image

Information about the OMI.

Properties

Name Type Description
AccountAlias string The account alias of the owner of the OMI.
AccountId string The account ID of the owner of the OMI.
Architecture string The architecture of the OMI.
BlockDeviceMappings [BlockDeviceMappingImage] One or more block device mappings.
CreationDate string (date-time) The date and time (UTC) of creation of the OMI.
Description string The description of the OMI.
FileLocation string The location from which the OMI files were created.
ImageId string The ID of the OMI.
ImageName string The name of the OMI.
ImageType string The type of the OMI.
PermissionsToLaunch PermissionsOnResource Permissions for the resource.
ProductCodes [string] The product codes associated with the OMI.
RootDeviceName string The name of the root device.
RootDeviceType string The type of root device used by the OMI (always bsu).
State string The state of the OMI (pending | available | failed).
StateComment StateComment Information about the change of state.
Tags [ResourceTag] One or more tags associated with the OMI.

Schema

{
  "AccountAlias": "string",
  "AccountId": "string",
  "Architecture": "string",
  "BlockDeviceMappings": [
    {
      "Bsu": {
        "DeleteOnVmDeletion": true,
        "Iops": 0,
        "SnapshotId": "string",
        "VolumeSize": 0,
        "VolumeType": "string"
      },
      "DeviceName": "string",
      "VirtualDeviceName": "string"
    }
  ],
  "CreationDate": "2019-08-24T14:15:22Z",
  "Description": "string",
  "FileLocation": "string",
  "ImageId": "string",
  "ImageName": "string",
  "ImageType": "string",
  "PermissionsToLaunch": {
    "AccountIds": [
      "string"
    ],
    "GlobalPermission": true
  },
  "ProductCodes": [
    "string"
  ],
  "RootDeviceName": "string",
  "RootDeviceType": "string",
  "State": "string",
  "StateComment": {
    "StateCode": "string",
    "StateMessage": "string"
  },
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

ImageExportTask

Information about the OMI export task.

Properties

Name Type Description
Comment string If the OMI export task fails, an error message appears.
ImageId string The ID of the OMI to be exported.
OsuExport OsuExportImageExportTask Information about the OMI export task.
Progress integer The progress of the OMI export task, as a percentage.
State string The state of the OMI export task (pending/queued | pending | completed | failed | cancelled).
Tags [ResourceTag] One or more tags associated with the image export task.
TaskId string The ID of the OMI export task.

Schema

{
  "Comment": "string",
  "ImageId": "string",
  "OsuExport": {
    "DiskImageFormat": "string",
    "OsuBucket": "string",
    "OsuManifestUrl": "string",
    "OsuPrefix": "string"
  },
  "Progress": 0,
  "State": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "TaskId": "string"
}

InternetService

Information about the Internet service.

Properties

Name Type Description
InternetServiceId string The ID of the Internet service.
NetId string The ID of the Net attached to the Internet service.
State string The state of the attachment of the Internet service to the Net (always available).
Tags [ResourceTag] One or more tags associated with the Internet service.

Schema

{
  "InternetServiceId": "string",
  "NetId": "string",
  "State": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

Keypair

Information about the keypair.

Properties

Name Type Description
KeypairFingerprint string The MD5 public key fingerprint as specified in section 4 of RFC 4716.
KeypairName string The name of the keypair.
KeypairType string The type of the keypair (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).

Schema

{
  "KeypairFingerprint": "string",
  "KeypairName": "string",
  "KeypairType": "string"
}

KeypairCreated

Information about the created keypair.

Properties

Name Type Description
KeypairFingerprint string The MD5 public key fingerprint, as specified in section 4 of RFC 4716.
KeypairName string The name of the keypair.
KeypairType string The type of the keypair (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).
PrivateKey string The private key, returned only if you are creating a keypair (not if you are importing). When you save this private key in a .rsa file, make sure you replace the \n escape sequences with real line breaks.

Schema

{
  "KeypairFingerprint": "string",
  "KeypairName": "string",
  "KeypairType": "string",
  "PrivateKey": "string"
}

LinkFlexibleGpuResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkInternetServiceResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkLoadBalancerBackendMachinesResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkNic

Information about the NIC attachment.

Properties

Name Type Description
DeleteOnVmDeletion boolean If true, the NIC is deleted when the VM is terminated.
DeviceNumber integer The device index for the NIC attachment (between 1 and 7, both included).
LinkNicId string The ID of the NIC to attach.
State string The state of the attachment (attaching | attached | detaching | detached).
VmAccountId string The account ID of the owner of the VM.
VmId string The ID of the VM.

Schema

{
  "DeleteOnVmDeletion": true,
  "DeviceNumber": 0,
  "LinkNicId": "string",
  "State": "string",
  "VmAccountId": "string",
  "VmId": "string"
}

LinkNicLight

Information about the network interface card (NIC).

Properties

Name Type Description
DeleteOnVmDeletion boolean If true, the NIC is deleted when the VM is terminated.
DeviceNumber integer The device index for the NIC attachment (between 1 and 7, both included).
LinkNicId string The ID of the NIC to attach.
State string The state of the attachment (attaching | attached | detaching | detached).

Schema

{
  "DeleteOnVmDeletion": true,
  "DeviceNumber": 0,
  "LinkNicId": "string",
  "State": "string"
}

LinkNicResponse

Properties

Name Type Description
LinkNicId string The ID of the NIC attachment.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LinkNicId": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkNicToUpdate

Information about the NIC attachment. If you are modifying the DeleteOnVmDeletion attribute, you must specify the ID of the NIC attachment.

Properties

Name Type Description
DeleteOnVmDeletion boolean If true, the NIC is deleted when the VM is terminated. If false, the NIC is detached from the VM.
LinkNicId string The ID of the NIC attachment.

Schema

{
  "DeleteOnVmDeletion": true,
  "LinkNicId": "string"
}

LinkPolicyResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkPrivateIpsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkPublicIp

Information about the public IP association.

Properties

Name Type Description
LinkPublicIpId string (Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
PublicDnsName string The name of the public DNS.
PublicIp string The public IP associated with the NIC.
PublicIpAccountId string The account ID of the owner of the public IP.
PublicIpId string The allocation ID of the public IP.

Schema

{
  "LinkPublicIpId": "string",
  "PublicDnsName": "string",
  "PublicIp": "string",
  "PublicIpAccountId": "string",
  "PublicIpId": "string"
}

LinkPublicIpLightForVm

Information about the public IP associated with the NIC.

Properties

Name Type Description
PublicDnsName string The name of the public DNS.
PublicIp string The public IP associated with the NIC.
PublicIpAccountId string The account ID of the owner of the public IP.

Schema

{
  "PublicDnsName": "string",
  "PublicIp": "string",
  "PublicIpAccountId": "string"
}

LinkPublicIpResponse

Properties

Name Type Description
LinkPublicIpId string (Net only) The ID representing the association of the public IP with the VM or the NIC.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LinkPublicIpId": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkRouteTable

One or more associations between the route table and the Subnets.

Properties

Name Type Description
LinkRouteTableId string The ID of the association between the route table and the Subnet.
Main boolean If true, the route table is the main one.
NetId string The ID of the Net.
RouteTableId string The ID of the route table.
SubnetId string The ID of the Subnet.

Schema

{
  "LinkRouteTableId": "string",
  "Main": true,
  "NetId": "string",
  "RouteTableId": "string",
  "SubnetId": "string"
}

LinkRouteTableResponse

Properties

Name Type Description
LinkRouteTableId string The ID of the association between the route table and the Subnet.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LinkRouteTableId": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkVirtualGatewayResponse

Properties

Name Type Description
NetToVirtualGatewayLink NetToVirtualGatewayLink Information about the attachment.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "NetToVirtualGatewayLink": {
    "NetId": "string",
    "State": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkVolumeResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkedPolicy

Information about the linked policy.

Properties

Name Type Description
CreationDate string (date-time) The date and time (UTC) of creation of the linked policy.
LastModificationDate string (date-time) The date and time (UTC) at which the linked policy was last modified.
Orn string The Outscale Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
PolicyId string The ID of the policy.
PolicyName string The name of the policy.

Schema

{
  "CreationDate": "2019-08-24T14:15:22Z",
  "LastModificationDate": "2019-08-24T14:15:22Z",
  "Orn": "string",
  "PolicyId": "string",
  "PolicyName": "string"
}

LinkedVolume

Information about volume attachment.

Properties

Name Type Description
DeleteOnVmDeletion boolean If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.
DeviceName string The name of the device.
State string The state of the attachment of the volume (attaching | detaching | attached | detached).
VmId string The ID of the VM.
VolumeId string The ID of the volume.

Schema

{
  "DeleteOnVmDeletion": true,
  "DeviceName": "string",
  "State": "string",
  "VmId": "string",
  "VolumeId": "string"
}

Listener

Information about the listener.

Properties

Name Type Description
BackendPort integer The port on which the backend VM is listening (between 1 and 65535, both included).
BackendProtocol string The protocol for routing traffic to backend VMs (HTTP | HTTPS | TCP | SSL).
LoadBalancerPort integer The port on which the load balancer is listening (between 1 and 65535, both included).
LoadBalancerProtocol string The routing protocol (HTTP | HTTPS | TCP | SSL).
PolicyNames [string] The names of the policies. If there are no policies enabled, the list is empty.
ServerCertificateId string The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).

Schema

{
  "BackendPort": 0,
  "BackendProtocol": "string",
  "LoadBalancerPort": 0,
  "LoadBalancerProtocol": "string",
  "PolicyNames": [
    "string"
  ],
  "ServerCertificateId": "string"
}

ListenerForCreation

Information about the listener to create.

Properties

Name Type Description
BackendPort integer The port on which the backend VM is listening (between 1 and 65535, both included).
BackendProtocol string The protocol for routing traffic to backend VMs (HTTP | HTTPS | TCP | SSL).
LoadBalancerPort integer The port on which the load balancer is listening (between 1 and 65535, both included).
LoadBalancerProtocol string The routing protocol (HTTP | HTTPS | TCP | SSL).
ServerCertificateId string The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).

Schema

{
  "BackendPort": 0,
  "BackendProtocol": "string",
  "LoadBalancerPort": 0,
  "LoadBalancerProtocol": "string",
  "ServerCertificateId": "string"
}

ListenerRule

Information about the listener rule.

Properties

Name Type Description
Action string The type of action for the rule (always forward).
HostNamePattern string A host-name pattern for the rule, with a maximum length of 128 characters. This host-name pattern supports maximum three wildcards, and must not contain any special characters except [-.?].
ListenerId integer The ID of the listener.
ListenerRuleId integer The ID of the listener rule.
ListenerRuleName string A human-readable name for the listener rule.
PathPattern string A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except [_-.$/~"'@:+?].
Priority integer The priority level of the listener rule, between 1 and 19999 both included. Each rule must have a unique priority level. Otherwise, an error is returned.
VmIds [string] The IDs of the backend VMs.

Schema

{
  "Action": "string",
  "HostNamePattern": "string",
  "ListenerId": 0,
  "ListenerRuleId": 0,
  "ListenerRuleName": "string",
  "PathPattern": "string",
  "Priority": 0,
  "VmIds": [
    "string"
  ]
}

ListenerRuleForCreation

Information about the listener rule.

Properties

Name Type Description
Action string The type of action for the rule (always forward).
HostNamePattern string A host-name pattern for the rule, with a maximum length of 128 characters. This host-name pattern supports maximum three wildcards, and must not contain any special characters except [-.?].
ListenerRuleName string A human-readable name for the listener rule.
PathPattern string A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except [_-.$/~"'@:+?].
Priority integer The priority level of the listener rule, between 1 and 19999 both included. Each rule must have a unique priority level. Otherwise, an error is returned.

Schema

{
  "Action": "string",
  "HostNamePattern": "string",
  "ListenerRuleName": "string",
  "PathPattern": "string",
  "Priority": 0
}

LoadBalancer

Information about the load balancer.

Properties

Name Type Description
AccessLog AccessLog Information about access logs.
ApplicationStickyCookiePolicies [ApplicationStickyCookiePolicy] The stickiness policies defined for the load balancer.
BackendIps [string] One or more public IPs of backend VMs.
BackendVmIds [string] One or more IDs of backend VMs for the load balancer.
DnsName string The DNS name of the load balancer.
HealthCheck HealthCheck Information about the health check configuration.
Listeners [Listener] The listeners for the load balancer.
LoadBalancerName string The name of the load balancer.
LoadBalancerStickyCookiePolicies [LoadBalancerStickyCookiePolicy] The policies defined for the load balancer.
LoadBalancerType string The type of load balancer. Valid only for load balancers in a Net.

If LoadBalancerType is internet-facing, the load balancer has a public DNS name that resolves to a public IP.

If LoadBalancerType is internal, the load balancer has a public DNS name that resolves to a private IP.
NetId string The ID of the Net for the load balancer.
PublicIp string (internet-facing only) The public IP associated with the load balancer.
SecuredCookies boolean Whether secure cookies are enabled for the load balancer.
SecurityGroups [string] One or more IDs of security groups for the load balancers. Valid only for load balancers in a Net.
SourceSecurityGroup SourceSecurityGroup Information about the source security group of the load balancer, which you can use as part of your inbound rules for your registered VMs.

To only allow traffic from load balancers, add a security group rule that specifies this source security group as the inbound source.
Subnets [string] The ID of the Subnet in which the load balancer was created.
SubregionNames [string] The ID of the Subregion in which the load balancer was created.
Tags [ResourceTag] One or more tags associated with the load balancer.

Schema

{
  "AccessLog": {
    "IsEnabled": true,
    "OsuBucketName": "string",
    "OsuBucketPrefix": "string",
    "PublicationInterval": 0
  },
  "ApplicationStickyCookiePolicies": [
    {
      "CookieName": "string",
      "PolicyName": "string"
    }
  ],
  "BackendIps": [
    "string"
  ],
  "BackendVmIds": [
    "string"
  ],
  "DnsName": "string",
  "HealthCheck": {
    "CheckInterval": 0,
    "HealthyThreshold": 0,
    "Path": "string",
    "Port": 0,
    "Protocol": "string",
    "Timeout": 0,
    "UnhealthyThreshold": 0
  },
  "Listeners": [
    {
      "BackendPort": 0,
      "BackendProtocol": "string",
      "LoadBalancerPort": 0,
      "LoadBalancerProtocol": "string",
      "PolicyNames": [
        "string"
      ],
      "ServerCertificateId": "string"
    }
  ],
  "LoadBalancerName": "string",
  "LoadBalancerStickyCookiePolicies": [
    {
      "CookieExpirationPeriod": 0,
      "PolicyName": "string"
    }
  ],
  "LoadBalancerType": "string",
  "NetId": "string",
  "PublicIp": "string",
  "SecuredCookies": true,
  "SecurityGroups": [
    "string"
  ],
  "SourceSecurityGroup": {
    "SecurityGroupAccountId": "string",
    "SecurityGroupName": "string"
  },
  "Subnets": [
    "string"
  ],
  "SubregionNames": [
    "string"
  ],
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

LoadBalancerLight

Information about the load balancer.

Properties

Name Type Description
LoadBalancerName string The name of the load balancer to which the listener is attached.
LoadBalancerPort integer The port of load balancer on which the load balancer is listening (between 1 and 65535 both included).

Schema

{
  "LoadBalancerName": "string",
  "LoadBalancerPort": 0
}

LoadBalancerStickyCookiePolicy

Information about the stickiness policy.

Properties

Name Type Description
CookieExpirationPeriod integer The time period, in seconds, after which the cookie should be considered stale.

If 1, the stickiness session lasts for the duration of the browser session.
PolicyName string The name of the stickiness policy.

Schema

{
  "CookieExpirationPeriod": 0,
  "PolicyName": "string"
}

LoadBalancerTag

Information about the load balancer tag.

Properties

Name Type Description
Key string The key of the tag.
LoadBalancerName string The name of the load balancer.
Value string The value of the tag.

Schema

{
  "Key": "string",
  "LoadBalancerName": "string",
  "Value": "string"
}

Location

Information about the DirectLink location.

Properties

Name Type Description
Code string The location code, to be set as the Location parameter of the CreateDirectLink method when creating a DirectLink.
Name string The name and description of the location, corresponding to a datacenter.

Schema

{
  "Code": "string",
  "Name": "string"
}

Log

Information about the log.

Properties

Name Type Description
AccountId string The account ID of the logged call.
CallDuration integer The duration of the logged call, in microseconds.
QueryAccessKey string The access key used for the logged call.
QueryApiName string The name of the API used by the logged call (always oapi for the OUTSCALE API).
QueryApiVersion string The version of the API used by the logged call.
QueryCallName string The name of the logged call.
QueryDate string (date-time) The date and time (UTC) of the logged call.
QueryHeaderRaw string The raw header of the HTTP request of the logged call.
QueryHeaderSize integer The size of the raw header of the HTTP request of the logged call, in bytes.
QueryIpAddress string The IP used for the logged call.
QueryPayloadRaw string The raw payload of the HTTP request of the logged call.
QueryPayloadSize integer The size of the raw payload of the HTTP request of the logged call, in bytes.
QueryUserAgent string The user agent of the HTTP request of the logged call.
RequestId string The request ID provided in the response of the logged call.
ResponseSize integer The size of the response of the logged call, in bytes.
ResponseStatusCode integer The HTTP status code of the response of the logged call.

Schema

{
  "AccountId": "string",
  "CallDuration": 0,
  "QueryAccessKey": "string",
  "QueryApiName": "string",
  "QueryApiVersion": "string",
  "QueryCallName": "string",
  "QueryDate": "2019-08-24T14:15:22Z",
  "QueryHeaderRaw": "string",
  "QueryHeaderSize": 0,
  "QueryIpAddress": "string",
  "QueryPayloadRaw": "string",
  "QueryPayloadSize": 0,
  "QueryUserAgent": "string",
  "RequestId": "string",
  "ResponseSize": 0,
  "ResponseStatusCode": 0
}

MaintenanceEvent

Information about the maintenance event.

Properties

Name Type Description
Code string The code of the event (system-reboot | system-maintenance).
Description string The description of the event.
NotAfter string (date) The latest scheduled end date and time (UTC) for the event.
NotBefore string (date) The earliest scheduled start date and time (UTC) for the event.

Schema

{
  "Code": "string",
  "Description": "string",
  "NotAfter": "2019-08-24",
  "NotBefore": "2019-08-24"
}

NatService

Information about the NAT service.

Properties

Name Type Description
NatServiceId string The ID of the NAT service.
NetId string The ID of the Net in which the NAT service is.
PublicIps [PublicIpLight] Information about the public IP or IPs associated with the NAT service.
State string The state of the NAT service (pending | available | deleting | deleted).
SubnetId string The ID of the Subnet in which the NAT service is.
Tags [ResourceTag] One or more tags associated with the NAT service.

Schema

{
  "NatServiceId": "string",
  "NetId": "string",
  "PublicIps": [
    {
      "PublicIp": "string",
      "PublicIpId": "string"
    }
  ],
  "State": "string",
  "SubnetId": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

Net

Information about the Net.

Properties

Name Type Description
DhcpOptionsSetId string The ID of the DHCP options set (or default if you want to associate the default one).
IpRange string The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).
NetId string The ID of the Net.
State string The state of the Net (pending | available | deleting).
Tags [ResourceTag] One or more tags associated with the Net.
Tenancy string The VM tenancy in a Net.

Schema

{
  "DhcpOptionsSetId": "string",
  "IpRange": "string",
  "NetId": "string",
  "State": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "Tenancy": "string"
}

NetAccessPoint

Information about the Net access point.

Properties

Name Type Description
NetAccessPointId string The ID of the Net access point.
NetId string The ID of the Net with which the Net access point is associated.
RouteTableIds [string] The ID of the route tables associated with the Net access point.
ServiceName string The name of the service with which the Net access point is associated.
State string The state of the Net access point (pending | available | deleting | deleted).
Tags [ResourceTag] One or more tags associated with the Net access point.

Schema

{
  "NetAccessPointId": "string",
  "NetId": "string",
  "RouteTableIds": [
    "string"
  ],
  "ServiceName": "string",
  "State": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

NetPeering

Information about the Net peering.

Properties

Name Type Description
AccepterNet AccepterNet Information about the accepter Net.
ExpirationDate string (date-time) The date and time (UTC) at which the Net peerings expire.
NetPeeringId string The ID of the Net peering.
SourceNet SourceNet Information about the source Net.
State NetPeeringState Information about the state of the Net peering.
Tags [ResourceTag] One or more tags associated with the Net peering.

Schema

{
  "AccepterNet": {
    "AccountId": "string",
    "IpRange": "string",
    "NetId": "string"
  },
  "ExpirationDate": "2019-08-24T14:15:22Z",
  "NetPeeringId": "string",
  "SourceNet": {
    "AccountId": "string",
    "IpRange": "string",
    "NetId": "string"
  },
  "State": {
    "Message": "string",
    "Name": "string"
  },
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

NetPeeringState

Information about the state of the Net peering.

Properties

Name Type Description
Message string Additional information about the state of the Net peering.
Name string The state of the Net peering (pending-acceptance | active | rejected | failed | expired | deleted).

Schema

{
  "Message": "string",
  "Name": "string"
}

Information about the attachment.

Properties

Name Type Description
NetId string The ID of the Net to which the virtual gateway is attached.
State string The state of the attachment (attaching | attached | detaching | detached).

Schema

{
  "NetId": "string",
  "State": "string"
}

Nic

Information about the NIC.

Properties

Name Type Description
AccountId string The account ID of the owner of the NIC.
Description string The description of the NIC.
IsSourceDestChecked boolean (Net only) If true, the source/destination check is enabled. If false, it is disabled. This value must be false for a NAT VM to perform network address translation (NAT) in a Net.
LinkNic LinkNic Information about the NIC attachment.
LinkPublicIp LinkPublicIp Information about the public IP association.
MacAddress string The Media Access Control (MAC) address of the NIC.
NetId string The ID of the Net for the NIC.
NicId string The ID of the NIC.
PrivateDnsName string The name of the private DNS.
PrivateIps [PrivateIp] The private IPs of the NIC.
SecurityGroups [SecurityGroupLight] One or more IDs of security groups for the NIC.
State string The state of the NIC (available | attaching | in-use | detaching).
SubnetId string The ID of the Subnet.
SubregionName string The Subregion in which the NIC is located.
Tags [ResourceTag] One or more tags associated with the NIC.

Schema

{
  "AccountId": "string",
  "Description": "string",
  "IsSourceDestChecked": true,
  "LinkNic": {
    "DeleteOnVmDeletion": true,
    "DeviceNumber": 0,
    "LinkNicId": "string",
    "State": "string",
    "VmAccountId": "string",
    "VmId": "string"
  },
  "LinkPublicIp": {
    "LinkPublicIpId": "string",
    "PublicDnsName": "string",
    "PublicIp": "string",
    "PublicIpAccountId": "string",
    "PublicIpId": "string"
  },
  "MacAddress": "string",
  "NetId": "string",
  "NicId": "string",
  "PrivateDnsName": "string",
  "PrivateIps": [
    {
      "IsPrimary": true,
      "LinkPublicIp": {
        "LinkPublicIpId": "string",
        "PublicDnsName": "string",
        "PublicIp": "string",
        "PublicIpAccountId": "string",
        "PublicIpId": "string"
      },
      "PrivateDnsName": "string",
      "PrivateIp": "string"
    }
  ],
  "SecurityGroups": [
    {
      "SecurityGroupId": "string",
      "SecurityGroupName": "string"
    }
  ],
  "State": "string",
  "SubnetId": "string",
  "SubregionName": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

NicForVmCreation

Information about the network interface card (NIC) when creating a virtual machine (VM).

Properties

Name Type Description
DeleteOnVmDeletion boolean If true, the NIC is deleted when the VM is terminated. You can specify this parameter only for a new NIC. To modify this value for an existing NIC, see UpdateNic.
Description string The description of the NIC, if you are creating a NIC when creating the VM.
DeviceNumber integer The index of the VM device for the NIC attachment (between 0 and 7, both included). This parameter is required if you create a NIC when creating the VM.
NicId string The ID of the NIC, if you are attaching an existing NIC when creating a VM.
PrivateIps [PrivateIpLight] One or more private IPs to assign to the NIC, if you create a NIC when creating a VM. Only one private IP can be the primary private IP.
SecondaryPrivateIpCount integer The number of secondary private IPs, if you create a NIC when creating a VM. This parameter cannot be specified if you specified more than one private IP in the PrivateIps parameter.
SecurityGroupIds [string] One or more IDs of security groups for the NIC, if you create a NIC when creating a VM.
SubnetId string The ID of the Subnet for the NIC, if you create a NIC when creating a VM. This parameter is required if you create a NIC when creating the VM.

Schema

{
  "DeleteOnVmDeletion": true,
  "Description": "string",
  "DeviceNumber": 0,
  "NicId": "string",
  "PrivateIps": [
    {
      "IsPrimary": true,
      "PrivateIp": "string"
    }
  ],
  "SecondaryPrivateIpCount": 0,
  "SecurityGroupIds": [
    "string"
  ],
  "SubnetId": "string"
}

NicLight

Information about the network interface card (NIC).

Properties

Name Type Description
AccountId string The account ID of the owner of the NIC.
Description string The description of the NIC.
IsSourceDestChecked boolean (Net only) If true, the source/destination check is enabled. If false, it is disabled. This value must be false for a NAT VM to perform network address translation (NAT) in a Net.
LinkNic LinkNicLight Information about the network interface card (NIC).
LinkPublicIp LinkPublicIpLightForVm Information about the public IP associated with the NIC.
MacAddress string The Media Access Control (MAC) address of the NIC.
NetId string The ID of the Net for the NIC.
NicId string The ID of the NIC.
PrivateDnsName string The name of the private DNS.
PrivateIps [PrivateIpLightForVm] The private IP or IPs of the NIC.
SecurityGroups [SecurityGroupLight] One or more IDs of security groups for the NIC.
State string The state of the NIC (available | attaching | in-use | detaching).
SubnetId string The ID of the Subnet for the NIC.

Schema

{
  "AccountId": "string",
  "Description": "string",
  "IsSourceDestChecked": true,
  "LinkNic": {
    "DeleteOnVmDeletion": true,
    "DeviceNumber": 0,
    "LinkNicId": "string",
    "State": "string"
  },
  "LinkPublicIp": {
    "PublicDnsName": "string",
    "PublicIp": "string",
    "PublicIpAccountId": "string"
  },
  "MacAddress": "string",
  "NetId": "string",
  "NicId": "string",
  "PrivateDnsName": "string",
  "PrivateIps": [
    {
      "IsPrimary": true,
      "LinkPublicIp": {
        "PublicDnsName": "string",
        "PublicIp": "string",
        "PublicIpAccountId": "string"
      },
      "PrivateDnsName": "string",
      "PrivateIp": "string"
    }
  ],
  "SecurityGroups": [
    {
      "SecurityGroupId": "string",
      "SecurityGroupName": "string"
    }
  ],
  "State": "string",
  "SubnetId": "string"
}

OsuApiKey

Information about the OOS API key.

Properties

Name Type Description
ApiKeyId string The API key of the OOS account that enables you to access the bucket.
SecretKey string The secret key of the OOS account that enables you to access the bucket.

Schema

{
  "ApiKeyId": "string",
  "SecretKey": "string"
}

OsuExportImageExportTask

Information about the OMI export task.

Properties

Name Type Description
DiskImageFormat string The format of the export disk (qcow2 | raw).
OsuBucket string The name of the OOS bucket the OMI is exported to.
OsuManifestUrl string The URL of the manifest file.
OsuPrefix string The prefix for the key of the OOS object corresponding to the image.

Schema

{
  "DiskImageFormat": "string",
  "OsuBucket": "string",
  "OsuManifestUrl": "string",
  "OsuPrefix": "string"
}

OsuExportSnapshotExportTask

Information about the snapshot export task.

Properties

Name Type Description
DiskImageFormat string The format of the export disk (qcow2 | raw).
OsuBucket string The name of the OOS bucket the snapshot is exported to.
OsuPrefix string The prefix for the key of the OOS object corresponding to the snapshot.

Schema

{
  "DiskImageFormat": "string",
  "OsuBucket": "string",
  "OsuPrefix": "string"
}

OsuExportToCreate

Information about the OOS export task to create.

Properties

Name Type Description
DiskImageFormat string The format of the export disk (qcow2 | raw).
OsuApiKey OsuApiKey Information about the OOS API key.
OsuBucket string The name of the OOS bucket where you want to export the object.
OsuManifestUrl string The URL of the manifest file.
OsuPrefix string The prefix for the key of the OOS object.

Schema

{
  "DiskImageFormat": "string",
  "OsuApiKey": {
    "ApiKeyId": "string",
    "SecretKey": "string"
  },
  "OsuBucket": "string",
  "OsuManifestUrl": "string",
  "OsuPrefix": "string"
}

PermissionsOnResource

Permissions for the resource.

Properties

Name Type Description
AccountIds [string] One or more account IDs that the permission is associated with.
GlobalPermission boolean A global permission for all accounts.

(Request) Set this parameter to true to make the resource public (if the parent parameter is Additions) or to make the resource private (if the parent parameter is Removals).

(Response) If true, the resource is public. If false, the resource is private.

Schema

{
  "AccountIds": [
    "string"
  ],
  "GlobalPermission": true
}

PermissionsOnResourceCreation

Information about the permissions for the resource.
Specify either the Additions or the Removals parameter.

Properties

Name Type Description
Additions PermissionsOnResource Permissions for the resource.
Removals PermissionsOnResource Permissions for the resource.

Schema

{
  "Additions": {
    "AccountIds": [
      "string"
    ],
    "GlobalPermission": true
  },
  "Removals": {
    "AccountIds": [
      "string"
    ],
    "GlobalPermission": true
  }
}

Phase1Options

Information about Phase 1 of the Internet Key Exchange (IKE) negotiation. When Phase 1 finishes successfully, peers proceed to Phase 2 negotiations.

Properties

Name Type Description
DpdTimeoutAction string The action to carry out after a Dead Peer Detection (DPD) timeout occurs.
DpdTimeoutSeconds integer The maximum waiting time for a Dead Peer Detection (DPD) response before considering the peer as dead, in seconds.
IkeVersions [string] The Internet Key Exchange (IKE) versions allowed for the VPN tunnel.
Phase1DhGroupNumbers [integer] The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for phase 1.
Phase1EncryptionAlgorithms [string] The encryption algorithms allowed for the VPN tunnel for phase 1.
Phase1IntegrityAlgorithms [string] The integrity algorithms allowed for the VPN tunnel for phase 1.
Phase1LifetimeSeconds integer The lifetime for phase 1 of the IKE negotiation process, in seconds.
ReplayWindowSize integer The number of packets in an IKE replay window.
StartupAction string The action to carry out when establishing tunnels for a VPN connection.

Schema

{
  "DpdTimeoutAction": "string",
  "DpdTimeoutSeconds": 0,
  "IkeVersions": [
    "string"
  ],
  "Phase1DhGroupNumbers": [
    0
  ],
  "Phase1EncryptionAlgorithms": [
    "string"
  ],
  "Phase1IntegrityAlgorithms": [
    "string"
  ],
  "Phase1LifetimeSeconds": 0,
  "ReplayWindowSize": 0,
  "StartupAction": "string"
}

Phase2Options

Information about Phase 2 of the Internet Key Exchange (IKE) negotiation.

Properties

Name Type Description
Phase2DhGroupNumbers [integer] The Diffie-Hellman (DH) group numbers allowed for the VPN tunnel for phase 2.
Phase2EncryptionAlgorithms [string] The encryption algorithms allowed for the VPN tunnel for phase 2.
Phase2IntegrityAlgorithms [string] The integrity algorithms allowed for the VPN tunnel for phase 2.
Phase2LifetimeSeconds integer The lifetime for phase 2 of the Internet Key Exchange (IKE) negociation process, in seconds.
PreSharedKey string The pre-shared key to establish the initial authentication between the client gateway and the virtual gateway. This key can contain any character except line breaks and double quotes (").

Schema

{
  "Phase2DhGroupNumbers": [
    0
  ],
  "Phase2EncryptionAlgorithms": [
    "string"
  ],
  "Phase2IntegrityAlgorithms": [
    "string"
  ],
  "Phase2LifetimeSeconds": 0,
  "PreSharedKey": "string"
}

Phase2OptionsToUpdate

Information about Phase 2 of the Internet Key Exchange (IKE) negotiation.

Properties

Name Type Description
PreSharedKey string The pre-shared key to establish the initial authentication between the client gateway and the virtual gateway. This key can contain any character except line breaks and double quotes (").

Schema

{
  "PreSharedKey": "string"
}

Placement

Information about the placement of the VM.

Properties

Name Type Description
SubregionName string The name of the Subregion. If you specify this parameter, you must not specify the Nics parameter.
Tenancy string The tenancy of the VM (default, dedicated, or a dedicated group ID).

Schema

{
  "SubregionName": "string",
  "Tenancy": "string"
}

Policy

Information about the policy.

Properties

Name Type Description
CreationDate string (date-time) The date and time (UTC) of creation of the policy.
Description string A friendly name for the policy (between 0 and 1000 characters).
IsLinkable boolean Indicates whether the policy can be linked to a group or an EIM user.
LastModificationDate string (date-time) The date and time (UTC) at which the policy was last modified.
Orn string The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
Path string The path to the policy.
PolicyDefaultVersionId string The ID of the policy default version.
PolicyId string The ID of the policy.
PolicyName string The name of the policy.
ResourcesCount integer The number of resources attached to the policy.

Schema

{
  "CreationDate": "2019-08-24T14:15:22Z",
  "Description": "string",
  "IsLinkable": true,
  "LastModificationDate": "2019-08-24T14:15:22Z",
  "Orn": "string",
  "Path": "string",
  "PolicyDefaultVersionId": "string",
  "PolicyId": "string",
  "PolicyName": "string",
  "ResourcesCount": 0
}

PolicyVersion

Information about the policy version.

Properties

Name Type Description
Body string The policy document as a json string.
CreationDate string (date-time) The date and time (UTC) of creation of the version.
DefaultVersion boolean If true, the version is the default one.
VersionId string The ID of the version.

Schema

{
  "Body": "string",
  "CreationDate": "2019-08-24T14:15:22Z",
  "DefaultVersion": true,
  "VersionId": "string"
}

PrivateIp

Information about the private IP.

Properties

Name Type Description
IsPrimary boolean If true, the IP is the primary private IP of the NIC.
LinkPublicIp LinkPublicIp Information about the public IP association.
PrivateDnsName string The name of the private DNS.
PrivateIp string The private IP of the NIC.

Schema

{
  "IsPrimary": true,
  "LinkPublicIp": {
    "LinkPublicIpId": "string",
    "PublicDnsName": "string",
    "PublicIp": "string",
    "PublicIpAccountId": "string",
    "PublicIpId": "string"
  },
  "PrivateDnsName": "string",
  "PrivateIp": "string"
}

PrivateIpLight

Information about the private IP.

Properties

Name Type Description
IsPrimary boolean If true, the IP is the primary private IP of the NIC.
PrivateIp string The private IP of the NIC.

Schema

{
  "IsPrimary": true,
  "PrivateIp": "string"
}

PrivateIpLightForVm

Information about the private IP of the NIC.

Properties

Name Type Description
IsPrimary boolean If true, the IP is the primary private IP of the NIC.
LinkPublicIp LinkPublicIpLightForVm Information about the public IP associated with the NIC.
PrivateDnsName string The name of the private DNS.
PrivateIp string The private IP.

Schema

{
  "IsPrimary": true,
  "LinkPublicIp": {
    "PublicDnsName": "string",
    "PublicIp": "string",
    "PublicIpAccountId": "string"
  },
  "PrivateDnsName": "string",
  "PrivateIp": "string"
}

ProductType

Information about the product type.

Properties

Name Type Description
Description string The description of the product type.
ProductTypeId string The ID of the product type.
Vendor string The vendor of the product type.

Schema

{
  "Description": "string",
  "ProductTypeId": "string",
  "Vendor": "string"
}

PublicIp

Information about the public IP.

Properties

Name Type Description
LinkPublicIpId string (Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
NicAccountId string The account ID of the owner of the NIC.
NicId string The ID of the NIC the public IP is associated with (if any).
PrivateIp string The private IP associated with the public IP.
PublicIp string The public IP.
PublicIpId string The allocation ID of the public IP.
Tags [ResourceTag] One or more tags associated with the public IP.
VmId string The ID of the VM the public IP is associated with (if any).

Schema

{
  "LinkPublicIpId": "string",
  "NicAccountId": "string",
  "NicId": "string",
  "PrivateIp": "string",
  "PublicIp": "string",
  "PublicIpId": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "VmId": "string"
}

PublicIpLight

Information about the public IP.

Properties

Name Type Description
PublicIp string The public IP associated with the NAT service.
PublicIpId string The allocation ID of the public IP associated with the NAT service.

Schema

{
  "PublicIp": "string",
  "PublicIpId": "string"
}

Quota

Information about the quota.

Properties

Name Type Description
AccountId string The account ID of the owner of the quotas.
Description string The description of the quota.
MaxValue integer The maximum value of the quota for the account (if there is no limit, 0).
Name string The unique name of the quota.
QuotaCollection string The group name of the quota.
ShortDescription string The description of the quota.
UsedValue integer The limit value currently used by the account.

Schema

{
  "AccountId": "string",
  "Description": "string",
  "MaxValue": 0,
  "Name": "string",
  "QuotaCollection": "string",
  "ShortDescription": "string",
  "UsedValue": 0
}

QuotaTypes

One or more quotas.

Properties

Name Type Description
QuotaType string The resource ID if it is a resource-specific quota, global if it is not.
Quotas [Quota] One or more quotas associated with the account.

Schema

{
  "QuotaType": "string",
  "Quotas": [
    {
      "AccountId": "string",
      "Description": "string",
      "MaxValue": 0,
      "Name": "string",
      "QuotaCollection": "string",
      "ShortDescription": "string",
      "UsedValue": 0
    }
  ]
}

ReadAccessKeysResponse

Properties

Name Type Description
AccessKeys [AccessKey] A list of access keys.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "AccessKeys": [
    {
      "AccessKeyId": "string",
      "CreationDate": "2019-08-24T14:15:22Z",
      "ExpirationDate": "2019-08-24T14:15:22Z",
      "LastModificationDate": "2019-08-24T14:15:22Z",
      "State": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadAccountsResponse

Properties

Name Type Description
Accounts [Account] The list of the accounts.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Accounts": [
    {
      "AccountId": "string",
      "AdditionalEmails": [
        "string"
      ],
      "City": "string",
      "CompanyName": "string",
      "Country": "string",
      "CustomerId": "string",
      "Email": "string",
      "FirstName": "string",
      "JobTitle": "string",
      "LastName": "string",
      "MobileNumber": "string",
      "PhoneNumber": "string",
      "StateProvince": "string",
      "VatNumber": "string",
      "ZipCode": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadAdminPasswordResponse

Properties

Name Type Description
AdminPassword string The password of the VM. After the first boot, returns an empty string.
ResponseContext ResponseContext Information about the context of the response.
VmId string The ID of the VM.

Schema

{
  "AdminPassword": "string",
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmId": "string"
}

ReadApiAccessPolicyResponse

Properties

Name Type Description
ApiAccessPolicy ApiAccessPolicy Information about the API access policy.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ApiAccessPolicy": {
    "MaxAccessKeyExpirationSeconds": 0,
    "RequireTrustedEnv": true
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadApiAccessRulesResponse

Properties

Name Type Description
ApiAccessRules [ApiAccessRule] A list of API access rules.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ApiAccessRules": [
    {
      "ApiAccessRuleId": "string",
      "CaIds": [
        "string"
      ],
      "Cns": [
        "string"
      ],
      "Description": "string",
      "IpRanges": [
        "string"
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadApiLogsResponse

Properties

Name Type Description
Logs [Log] Information about one or more logs.
NextPageToken string The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Logs": [
    {
      "AccountId": "string",
      "CallDuration": 0,
      "QueryAccessKey": "string",
      "QueryApiName": "string",
      "QueryApiVersion": "string",
      "QueryCallName": "string",
      "QueryDate": "2019-08-24T14:15:22Z",
      "QueryHeaderRaw": "string",
      "QueryHeaderSize": 0,
      "QueryIpAddress": "string",
      "QueryPayloadRaw": "string",
      "QueryPayloadSize": 0,
      "QueryUserAgent": "string",
      "RequestId": "string",
      "ResponseSize": 0,
      "ResponseStatusCode": 0
    }
  ],
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadCasResponse

Properties

Name Type Description
Cas [Ca] Information about one or more CAs.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Cas": [
    {
      "CaFingerprint": "string",
      "CaId": "string",
      "Description": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadCatalogResponse

Properties

Name Type Description
Catalog Catalog Information about our catalog of prices.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Catalog": {
    "Entries": [
      {
        "Category": "string",
        "Flags": "string",
        "Operation": "string",
        "Service": "string",
        "SubregionName": "string",
        "Title": "string",
        "Type": "string",
        "UnitPrice": 0.1
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadCatalogsResponse

Properties

Name Type Description
Catalogs [Catalogs] Information about one or more catalogs.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Catalogs": [
    {
      "Entries": [
        {
          "Category": "string",
          "Flags": "string",
          "Operation": "string",
          "Service": "string",
          "SubregionName": "string",
          "Title": "string",
          "Type": "string",
          "UnitPrice": 0.1
        }
      ],
      "FromDate": "2019-08-24T14:15:22Z",
      "State": "CURRENT",
      "ToDate": "2019-08-24T14:15:22Z"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadClientGatewaysResponse

Properties

Name Type Description
ClientGateways [ClientGateway] Information about one or more client gateways.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ClientGateways": [
    {
      "BgpAsn": 0,
      "ClientGatewayId": "string",
      "ConnectionType": "string",
      "PublicIp": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadConsoleOutputResponse

Properties

Name Type Description
ConsoleOutput string The Base64-encoded output of the console. If a command line tool is used, the output is decoded by the tool.
ResponseContext ResponseContext Information about the context of the response.
VmId string The ID of the VM.

Schema

{
  "ConsoleOutput": "string",
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmId": "string"
}

ReadConsumptionAccountResponse

Properties

Name Type Description
ConsumptionEntries [ConsumptionEntry] Information about the resources consumed during the specified time period.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ConsumptionEntries": [
    {
      "AccountId": "string",
      "Category": "string",
      "FromDate": "2019-08-24T14:15:22Z",
      "Operation": "string",
      "PayingAccountId": "string",
      "Price": 0.1,
      "Service": "string",
      "SubregionName": "string",
      "Title": "string",
      "ToDate": "2019-08-24T14:15:22Z",
      "Type": "string",
      "UnitPrice": 0.1,
      "Value": 0.1
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadDedicatedGroupsResponse

Properties

Name Type Description
DedicatedGroups [DedicatedGroup] Information about one or more dedicated groups.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "DedicatedGroups": [
    {
      "AccountId": "string",
      "CpuGeneration": 0,
      "DedicatedGroupId": "string",
      "Name": "string",
      "NetIds": [
        "string"
      ],
      "SubregionName": "string",
      "VmIds": [
        "string"
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadDhcpOptionsResponse

Properties

Name Type Description
DhcpOptionsSets [DhcpOptionsSet] Information about one or more DHCP options sets.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "DhcpOptionsSets": [
    {
      "Default": true,
      "DhcpOptionsSetId": "string",
      "DomainName": "string",
      "DomainNameServers": [
        "string"
      ],
      "LogServers": [
        "string"
      ],
      "NtpServers": [
        "string"
      ],
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadDirectLinkInterfacesResponse

Properties

Name Type Description
DirectLinkInterfaces [DirectLinkInterfaces] Information about one or more DirectLink interfaces.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "DirectLinkInterfaces": [
    {
      "AccountId": "string",
      "BgpAsn": 0,
      "BgpKey": "string",
      "ClientPrivateIp": "string",
      "DirectLinkId": "string",
      "DirectLinkInterfaceId": "string",
      "DirectLinkInterfaceName": "string",
      "InterfaceType": "string",
      "Location": "string",
      "Mtu": 0,
      "OutscalePrivateIp": "string",
      "State": "string",
      "VirtualGatewayId": "string",
      "Vlan": 0
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadDirectLinksResponse

Properties

Name Type Description
DirectLinks [DirectLink] Information about one or more DirectLinks.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "DirectLinks": [
    {
      "AccountId": "string",
      "Bandwidth": "string",
      "DirectLinkId": "string",
      "DirectLinkName": "string",
      "Location": "string",
      "RegionName": "string",
      "State": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadFlexibleGpuCatalogResponse

Properties

Name Type Description
FlexibleGpuCatalog [FlexibleGpuCatalog] Information about one or more fGPUs available in the public catalog.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "FlexibleGpuCatalog": [
    {
      "Generations": [
        "string"
      ],
      "MaxCpu": 0,
      "MaxRam": 0,
      "ModelName": "string",
      "VRam": 0
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadFlexibleGpusResponse

Properties

Name Type Description
FlexibleGpus [FlexibleGpu] Information about one or more fGPUs.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "FlexibleGpus": [
    {
      "DeleteOnVmDeletion": true,
      "FlexibleGpuId": "string",
      "Generation": "string",
      "ModelName": "string",
      "State": "string",
      "SubregionName": "string",
      "VmId": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadImageExportTasksResponse

Properties

Name Type Description
ImageExportTasks [ImageExportTask] Information about one or more image export tasks.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ImageExportTasks": [
    {
      "Comment": "string",
      "ImageId": "string",
      "OsuExport": {
        "DiskImageFormat": "string",
        "OsuBucket": "string",
        "OsuManifestUrl": "string",
        "OsuPrefix": "string"
      },
      "Progress": 0,
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "TaskId": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadImagesResponse

Properties

Name Type Description
Images [Image] Information about one or more OMIs.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Images": [
    {
      "AccountAlias": "string",
      "AccountId": "string",
      "Architecture": "string",
      "BlockDeviceMappings": [
        {
          "Bsu": {
            "DeleteOnVmDeletion": true,
            "Iops": 0,
            "SnapshotId": "string",
            "VolumeSize": 0,
            "VolumeType": "string"
          },
          "DeviceName": "string",
          "VirtualDeviceName": "string"
        }
      ],
      "CreationDate": "2019-08-24T14:15:22Z",
      "Description": "string",
      "FileLocation": "string",
      "ImageId": "string",
      "ImageName": "string",
      "ImageType": "string",
      "PermissionsToLaunch": {
        "AccountIds": [
          "string"
        ],
        "GlobalPermission": true
      },
      "ProductCodes": [
        "string"
      ],
      "RootDeviceName": "string",
      "RootDeviceType": "string",
      "State": "string",
      "StateComment": {
        "StateCode": "string",
        "StateMessage": "string"
      },
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadInternetServicesResponse

Properties

Name Type Description
InternetServices [InternetService] Information about one or more Internet services.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "InternetServices": [
    {
      "InternetServiceId": "string",
      "NetId": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadKeypairsResponse

Properties

Name Type Description
Keypairs [Keypair] Information about one or more keypairs.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Keypairs": [
    {
      "KeypairFingerprint": "string",
      "KeypairName": "string",
      "KeypairType": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadLinkedPoliciesFilters

One or more filters.

Properties

Name Type Description
PathPrefix string The path prefix of the policies, set to a slash (/) by default.

Schema

{
  "PathPrefix": "string"
}

ReadLinkedPoliciesResponse

Properties

Name Type Description
HasMoreItems boolean If true, there are more items to return using the FirstItem parameter in a new request.
MaxResultsLimit integer Indicates maximum results defined for the operation.
MaxResultsTruncated boolean If true, indicates whether requested page size is more than allowed.
Policies [LinkedPolicy] One or more policies linked to the specified user.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "HasMoreItems": true,
  "MaxResultsLimit": 0,
  "MaxResultsTruncated": true,
  "Policies": [
    {
      "CreationDate": "2019-08-24T14:15:22Z",
      "LastModificationDate": "2019-08-24T14:15:22Z",
      "Orn": "string",
      "PolicyId": "string",
      "PolicyName": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadListenerRulesResponse

Properties

Name Type Description
ListenerRules [ListenerRule] The list of the rules to describe.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ListenerRules": [
    {
      "Action": "string",
      "HostNamePattern": "string",
      "ListenerId": 0,
      "ListenerRuleId": 0,
      "ListenerRuleName": "string",
      "PathPattern": "string",
      "Priority": 0,
      "VmIds": [
        "string"
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadLoadBalancerTagsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Tags [LoadBalancerTag] Information about one or more load balancer tags.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Tags": [
    {
      "Key": "string",
      "LoadBalancerName": "string",
      "Value": "string"
    }
  ]
}

ReadLoadBalancersResponse

Properties

Name Type Description
LoadBalancers [LoadBalancer] Information about one or more load balancers.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LoadBalancers": [
    {
      "AccessLog": {
        "IsEnabled": true,
        "OsuBucketName": "string",
        "OsuBucketPrefix": "string",
        "PublicationInterval": 0
      },
      "ApplicationStickyCookiePolicies": [
        {
          "CookieName": "string",
          "PolicyName": "string"
        }
      ],
      "BackendIps": [
        "string"
      ],
      "BackendVmIds": [
        "string"
      ],
      "DnsName": "string",
      "HealthCheck": {
        "CheckInterval": 0,
        "HealthyThreshold": 0,
        "Path": "string",
        "Port": 0,
        "Protocol": "string",
        "Timeout": 0,
        "UnhealthyThreshold": 0
      },
      "Listeners": [
        {
          "BackendPort": 0,
          "BackendProtocol": "string",
          "LoadBalancerPort": 0,
          "LoadBalancerProtocol": "string",
          "PolicyNames": [
            "string"
          ],
          "ServerCertificateId": "string"
        }
      ],
      "LoadBalancerName": "string",
      "LoadBalancerStickyCookiePolicies": [
        {
          "CookieExpirationPeriod": 0,
          "PolicyName": "string"
        }
      ],
      "LoadBalancerType": "string",
      "NetId": "string",
      "PublicIp": "string",
      "SecuredCookies": true,
      "SecurityGroups": [
        "string"
      ],
      "SourceSecurityGroup": {
        "SecurityGroupAccountId": "string",
        "SecurityGroupName": "string"
      },
      "Subnets": [
        "string"
      ],
      "SubregionNames": [
        "string"
      ],
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadLocationsResponse

Properties

Name Type Description
Locations [Location] Information about one or more locations.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Locations": [
    {
      "Code": "string",
      "Name": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadNatServicesResponse

Properties

Name Type Description
NatServices [NatService] Information about one or more NAT services.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "NatServices": [
    {
      "NatServiceId": "string",
      "NetId": "string",
      "PublicIps": [
        {
          "PublicIp": "string",
          "PublicIpId": "string"
        }
      ],
      "State": "string",
      "SubnetId": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadNetAccessPointServicesResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Services [Service] The names of the services you can use for Net access points.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Services": [
    {
      "IpRanges": [
        "string"
      ],
      "ServiceId": "string",
      "ServiceName": "string"
    }
  ]
}

ReadNetAccessPointsResponse

Properties

Name Type Description
NetAccessPoints [NetAccessPoint] One or more Net access points.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "NetAccessPoints": [
    {
      "NetAccessPointId": "string",
      "NetId": "string",
      "RouteTableIds": [
        "string"
      ],
      "ServiceName": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadNetPeeringsResponse

Properties

Name Type Description
NetPeerings [NetPeering] Information about one or more Net peerings.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "NetPeerings": [
    {
      "AccepterNet": {
        "AccountId": "string",
        "IpRange": "string",
        "NetId": "string"
      },
      "ExpirationDate": "2019-08-24T14:15:22Z",
      "NetPeeringId": "string",
      "SourceNet": {
        "AccountId": "string",
        "IpRange": "string",
        "NetId": "string"
      },
      "State": {
        "Message": "string",
        "Name": "string"
      },
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadNetsResponse

Properties

Name Type Description
Nets [Net] Information about the described Nets.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Nets": [
    {
      "DhcpOptionsSetId": "string",
      "IpRange": "string",
      "NetId": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "Tenancy": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadNicsResponse

Properties

Name Type Description
Nics [Nic] Information about one or more NICs.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Nics": [
    {
      "AccountId": "string",
      "Description": "string",
      "IsSourceDestChecked": true,
      "LinkNic": {
        "DeleteOnVmDeletion": true,
        "DeviceNumber": 0,
        "LinkNicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      },
      "LinkPublicIp": {
        "LinkPublicIpId": "string",
        "PublicDnsName": "string",
        "PublicIp": "string",
        "PublicIpAccountId": "string",
        "PublicIpId": "string"
      },
      "MacAddress": "string",
      "NetId": "string",
      "NicId": "string",
      "PrivateDnsName": "string",
      "PrivateIps": [
        {
          "IsPrimary": true,
          "LinkPublicIp": {
            "LinkPublicIpId": "string",
            "PublicDnsName": "string",
            "PublicIp": "string",
            "PublicIpAccountId": "string",
            "PublicIpId": "string"
          },
          "PrivateDnsName": "string",
          "PrivateIp": "string"
        }
      ],
      "SecurityGroups": [
        {
          "SecurityGroupId": "string",
          "SecurityGroupName": "string"
        }
      ],
      "State": "string",
      "SubnetId": "string",
      "SubregionName": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadPoliciesFilters

One or more filters.

Properties

Name Type Description
OnlyLinked boolean If set to true, lists only the policies attached to a user.
PathPrefix string The path prefix you can use to filter the results, set to a slash (/) by default.
Scope string The scope to filter policies (OWS | LOCAL).

Schema

{
  "OnlyLinked": true,
  "PathPrefix": "string",
  "Scope": "LOCAL"
}

ReadPoliciesResponse

Properties

Name Type Description
HasMoreItems boolean If true, there are more items to return using the FirstItem parameter in a new request.
MaxResultsLimit integer Indicates maximum results defined for the operation.
MaxResultsTruncated boolean If true, indicates whether requested page size is more than allowed.
Policies [Policy] Information about one or more policies.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "HasMoreItems": true,
  "MaxResultsLimit": 0,
  "MaxResultsTruncated": true,
  "Policies": [
    {
      "CreationDate": "2019-08-24T14:15:22Z",
      "Description": "string",
      "IsLinkable": true,
      "LastModificationDate": "2019-08-24T14:15:22Z",
      "Orn": "string",
      "Path": "string",
      "PolicyDefaultVersionId": "string",
      "PolicyId": "string",
      "PolicyName": "string",
      "ResourcesCount": 0
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadPolicyResponse

Properties

Name Type Description
Policy Policy Information about the policy.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Policy": {
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "IsLinkable": true,
    "LastModificationDate": "2019-08-24T14:15:22Z",
    "Orn": "string",
    "Path": "string",
    "PolicyDefaultVersionId": "string",
    "PolicyId": "string",
    "PolicyName": "string",
    "ResourcesCount": 0
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadPolicyVersionResponse

Properties

Name Type Description
PolicyVersion PolicyVersion Information about the policy version.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "PolicyVersion": {
    "Body": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "DefaultVersion": true,
    "VersionId": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadPolicyVersionsResponse

Properties

Name Type Description
HasMoreItems boolean If true, there are more items to return using the FirstItem parameter in a new request.
MaxResultsLimit integer Indicates maximum results defined for the operation.
PolicyVersions [PolicyVersion] A list of all the versions of the policy.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "HasMoreItems": true,
  "MaxResultsLimit": 0,
  "PolicyVersions": [
    {
      "Body": "string",
      "CreationDate": "2019-08-24T14:15:22Z",
      "DefaultVersion": true,
      "VersionId": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadProductTypesResponse

Properties

Name Type Description
ProductTypes [ProductType] Information about one or more product types.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ProductTypes": [
    {
      "Description": "string",
      "ProductTypeId": "string",
      "Vendor": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadPublicCatalogResponse

Properties

Name Type Description
Catalog Catalog Information about our catalog of prices.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Catalog": {
    "Entries": [
      {
        "Category": "string",
        "Flags": "string",
        "Operation": "string",
        "Service": "string",
        "SubregionName": "string",
        "Title": "string",
        "Type": "string",
        "UnitPrice": 0.1
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadPublicIpRangesResponse

Properties

Name Type Description
PublicIps [string] The list of public IPv4 addresses used in the Region, in CIDR notation.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "PublicIps": [
    "string"
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadPublicIpsResponse

Properties

Name Type Description
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
PublicIps [PublicIp] Information about one or more public IPs.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "NextPageToken": "string",
  "PublicIps": [
    {
      "LinkPublicIpId": "string",
      "NicAccountId": "string",
      "NicId": "string",
      "PrivateIp": "string",
      "PublicIp": "string",
      "PublicIpId": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "VmId": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadQuotasResponse

Properties

Name Type Description
QuotaTypes [QuotaTypes] Information about one or more quotas.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "QuotaTypes": [
    {
      "QuotaType": "string",
      "Quotas": [
        {
          "AccountId": "string",
          "Description": "string",
          "MaxValue": 0,
          "Name": "string",
          "QuotaCollection": "string",
          "ShortDescription": "string",
          "UsedValue": 0
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadRegionsResponse

Properties

Name Type Description
Regions [Region] Information about one or more Regions.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Regions": [
    {
      "Endpoint": "string",
      "RegionName": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadRouteTablesResponse

Properties

Name Type Description
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RouteTables [RouteTable] Information about one or more route tables.

Schema

{
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTables": [
    {
      "LinkRouteTables": [
        {
          "LinkRouteTableId": "string",
          "Main": true,
          "NetId": "string",
          "RouteTableId": "string",
          "SubnetId": "string"
        }
      ],
      "NetId": "string",
      "RoutePropagatingVirtualGateways": [
        {
          "VirtualGatewayId": "string"
        }
      ],
      "RouteTableId": "string",
      "Routes": [
        {
          "CreationMethod": "string",
          "DestinationIpRange": "string",
          "DestinationServiceId": "string",
          "GatewayId": "string",
          "NatServiceId": "string",
          "NetAccessPointId": "string",
          "NetPeeringId": "string",
          "NicId": "string",
          "State": "string",
          "VmAccountId": "string",
          "VmId": "string"
        }
      ],
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ]
}

ReadSecretAccessKeyResponse

Properties

Name Type Description
AccessKey AccessKeySecretKey Information about the access key.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "AccessKey": {
    "AccessKeyId": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "ExpirationDate": "2019-08-24T14:15:22Z",
    "LastModificationDate": "2019-08-24T14:15:22Z",
    "SecretKey": "string",
    "State": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadSecurityGroupsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
SecurityGroups [SecurityGroup] Information about one or more security groups.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SecurityGroups": [
    {
      "AccountId": "string",
      "Description": "string",
      "InboundRules": [
        {
          "FromPortRange": 0,
          "IpProtocol": "string",
          "IpRanges": [
            "string"
          ],
          "SecurityGroupsMembers": [
            {
              "AccountId": "string",
              "SecurityGroupId": "string",
              "SecurityGroupName": "string"
            }
          ],
          "ServiceIds": [
            "string"
          ],
          "ToPortRange": 0
        }
      ],
      "NetId": "string",
      "OutboundRules": [
        {
          "FromPortRange": 0,
          "IpProtocol": "string",
          "IpRanges": [
            "string"
          ],
          "SecurityGroupsMembers": [
            {
              "AccountId": "string",
              "SecurityGroupId": "string",
              "SecurityGroupName": "string"
            }
          ],
          "ServiceIds": [
            "string"
          ],
          "ToPortRange": 0
        }
      ],
      "SecurityGroupId": "string",
      "SecurityGroupName": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ]
}

ReadServerCertificatesResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
ServerCertificates [ServerCertificate] Information about one or more server certificates.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "ServerCertificates": [
    {
      "ExpirationDate": "2019-08-24",
      "Id": "string",
      "Name": "string",
      "Orn": "string",
      "Path": "string",
      "UploadDate": "2019-08-24"
    }
  ]
}

ReadSnapshotExportTasksResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
SnapshotExportTasks [SnapshotExportTask] Information about one or more snapshot export tasks.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SnapshotExportTasks": [
    {
      "Comment": "string",
      "OsuExport": {
        "DiskImageFormat": "string",
        "OsuBucket": "string",
        "OsuPrefix": "string"
      },
      "Progress": 0,
      "SnapshotId": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "TaskId": "string"
    }
  ]
}

ReadSnapshotsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Snapshots [Snapshot] Information about one or more snapshots and their permissions.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Snapshots": [
    {
      "AccountAlias": "string",
      "AccountId": "string",
      "CreationDate": "2019-08-24T14:15:22Z",
      "Description": "string",
      "PermissionsToCreateVolume": {
        "AccountIds": [
          "string"
        ],
        "GlobalPermission": true
      },
      "Progress": 0,
      "SnapshotId": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "VolumeId": "string",
      "VolumeSize": 0
    }
  ]
}

ReadSubnetsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Subnets [Subnet] Information about one or more Subnets.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Subnets": [
    {
      "AvailableIpsCount": 0,
      "IpRange": "string",
      "MapPublicIpOnLaunch": true,
      "NetId": "string",
      "State": "string",
      "SubnetId": "string",
      "SubregionName": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ]
}

ReadSubregionsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Subregions [Subregion] Information about one or more Subregions.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Subregions": [
    {
      "LocationCode": "string",
      "RegionName": "string",
      "State": "string",
      "SubregionName": "string"
    }
  ]
}

ReadTagsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Tags [Tag] Information about one or more tags.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Tags": [
    {
      "Key": "string",
      "ResourceId": "string",
      "ResourceType": "string",
      "Value": "string"
    }
  ]
}

ReadUsersResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Users [User] A list of EIM users.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Users": [
    {
      "Path": "string",
      "UserId": "string",
      "UserName": "string"
    }
  ]
}

ReadVirtualGatewaysResponse

Properties

Name Type Description
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
VirtualGateways [VirtualGateway] Information about one or more virtual gateways.

Schema

{
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  },
  "VirtualGateways": [
    {
      "ConnectionType": "string",
      "NetToVirtualGatewayLinks": [
        {
          "NetId": "string",
          "State": "string"
        }
      ],
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "VirtualGatewayId": "string"
    }
  ]
}

ReadVmGroupsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VmGroups [VmGroup] [Information about the VM group.]

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmGroups": [
    {
      "CreationDate": "2019-08-24T14:15:22Z",
      "Description": "string",
      "PositioningStrategy": "attract",
      "SecurityGroupIds": [
        "string"
      ],
      "State": "available",
      "SubnetId": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "VmCount": 0,
      "VmGroupId": "string",
      "VmGroupName": "string",
      "VmIds": [
        "string"
      ],
      "VmTemplateId": "string"
    }
  ]
}

ReadVmTemplatesResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VmTemplates [VmTemplate] Information about one or more VM templates.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmTemplates": [
    {
      "CpuCores": 0,
      "CpuGeneration": "string",
      "CpuPerformance": "medium",
      "CreationDate": "2019-08-24T14:15:22Z",
      "Description": "string",
      "ImageId": "string",
      "KeypairName": "string",
      "Ram": 0,
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "VmTemplateId": "string",
      "VmTemplateName": "string"
    }
  ]
}

ReadVmTypesResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VmTypes [VmType] Information about one or more VM types.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmTypes": [
    {
      "BsuOptimized": true,
      "EphemeralsType": "string",
      "Eth": 0,
      "Gpu": 0,
      "MaxPrivateIps": 0,
      "MemorySize": 0.1,
      "VcoreCount": 0,
      "VmTypeName": "string",
      "VolumeCount": 0,
      "VolumeSize": 0
    }
  ]
}

ReadVmsHealthResponse

Properties

Name Type Description
BackendVmHealth [BackendVmHealth] Information about the health of one or more backend VMs.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "BackendVmHealth": [
    {
      "Description": "string",
      "State": "string",
      "StateReason": "string",
      "VmId": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadVmsResponse

Properties

Name Type Description
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
Vms [Vm] Information about one or more VMs.

Schema

{
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vms": [
    {
      "Architecture": "string",
      "BlockDeviceMappings": [
        {
          "Bsu": {
            "DeleteOnVmDeletion": true,
            "LinkDate": "2019-08-24T14:15:22Z",
            "State": "string",
            "VolumeId": "string"
          },
          "DeviceName": "string"
        }
      ],
      "BsuOptimized": true,
      "ClientToken": "string",
      "CreationDate": "2019-08-24T14:15:22Z",
      "DeletionProtection": true,
      "Hypervisor": "string",
      "ImageId": "string",
      "IsSourceDestChecked": true,
      "KeypairName": "string",
      "LaunchNumber": 0,
      "NestedVirtualization": true,
      "NetId": "string",
      "Nics": [
        {
          "AccountId": "string",
          "Description": "string",
          "IsSourceDestChecked": true,
          "LinkNic": {
            "DeleteOnVmDeletion": true,
            "DeviceNumber": 0,
            "LinkNicId": "string",
            "State": "string"
          },
          "LinkPublicIp": {
            "PublicDnsName": "string",
            "PublicIp": "string",
            "PublicIpAccountId": "string"
          },
          "MacAddress": "string",
          "NetId": "string",
          "NicId": "string",
          "PrivateDnsName": "string",
          "PrivateIps": [
            {
              "IsPrimary": true,
              "LinkPublicIp": {
                "PublicDnsName": "string",
                "PublicIp": "string",
                "PublicIpAccountId": "string"
              },
              "PrivateDnsName": "string",
              "PrivateIp": "string"
            }
          ],
          "SecurityGroups": [
            {
              "SecurityGroupId": "string",
              "SecurityGroupName": "string"
            }
          ],
          "State": "string",
          "SubnetId": "string"
        }
      ],
      "OsFamily": "string",
      "Performance": "string",
      "Placement": {
        "SubregionName": "string",
        "Tenancy": "string"
      },
      "PrivateDnsName": "string",
      "PrivateIp": "string",
      "ProductCodes": [
        "string"
      ],
      "PublicDnsName": "string",
      "PublicIp": "string",
      "ReservationId": "string",
      "RootDeviceName": "string",
      "RootDeviceType": "string",
      "SecurityGroups": [
        {
          "SecurityGroupId": "string",
          "SecurityGroupName": "string"
        }
      ],
      "State": "string",
      "StateReason": "string",
      "SubnetId": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "UserData": "string",
      "VmId": "string",
      "VmInitiatedShutdownBehavior": "string",
      "VmType": "string"
    }
  ]
}

ReadVmsStateResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VmStates [VmStates] Information about one or more VM states.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmStates": [
    {
      "MaintenanceEvents": [
        {
          "Code": "string",
          "Description": "string",
          "NotAfter": "2019-08-24",
          "NotBefore": "2019-08-24"
        }
      ],
      "SubregionName": "string",
      "VmId": "string",
      "VmState": "string"
    }
  ]
}

ReadVolumesResponse

Properties

Name Type Description
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
Volumes [Volume] Information about one or more volumes.

Schema

{
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  },
  "Volumes": [
    {
      "CreationDate": "2019-08-24T14:15:22Z",
      "Iops": 0,
      "LinkedVolumes": [
        {
          "DeleteOnVmDeletion": true,
          "DeviceName": "string",
          "State": "string",
          "VmId": "string",
          "VolumeId": "string"
        }
      ],
      "Size": 0,
      "SnapshotId": "string",
      "State": "string",
      "SubregionName": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "VolumeId": "string",
      "VolumeType": "string"
    }
  ]
}

ReadVpnConnectionsResponse

Properties

Name Type Description
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
VpnConnections [VpnConnection] Information about one or more VPN connections.

Schema

{
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  },
  "VpnConnections": [
    {
      "ClientGatewayConfiguration": "string",
      "ClientGatewayId": "string",
      "ConnectionType": "string",
      "Routes": [
        {
          "DestinationIpRange": "string",
          "RouteType": "string",
          "State": "string"
        }
      ],
      "State": "string",
      "StaticRoutesOnly": true,
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "VgwTelemetries": [
        {
          "AcceptedRouteCount": 0,
          "LastStateChangeDate": "2019-08-24T14:15:22Z",
          "OutsideIpAddress": "string",
          "State": "string",
          "StateDescription": "string"
        }
      ],
      "VirtualGatewayId": "string",
      "VpnConnectionId": "string",
      "VpnOptions": {
        "Phase1Options": {
          "DpdTimeoutAction": "string",
          "DpdTimeoutSeconds": 0,
          "IkeVersions": [
            "string"
          ],
          "Phase1DhGroupNumbers": [
            0
          ],
          "Phase1EncryptionAlgorithms": [
            "string"
          ],
          "Phase1IntegrityAlgorithms": [
            "string"
          ],
          "Phase1LifetimeSeconds": 0,
          "ReplayWindowSize": 0,
          "StartupAction": "string"
        },
        "Phase2Options": {
          "Phase2DhGroupNumbers": [
            0
          ],
          "Phase2EncryptionAlgorithms": [
            "string"
          ],
          "Phase2IntegrityAlgorithms": [
            "string"
          ],
          "Phase2LifetimeSeconds": 0,
          "PreSharedKey": "string"
        },
        "TunnelInsideIpRange": "string"
      }
    }
  ]
}

RebootVmsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

Region

Information about the Region.

Properties

Name Type Description
Endpoint string The hostname of the gateway to access the Region.
RegionName string The administrative name of the Region.

Schema

{
  "Endpoint": "string",
  "RegionName": "string"
}

RegisterVmsInLoadBalancerResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

RejectNetPeeringResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ResourceLoadBalancerTag

Information about the tag.

Properties

Name Type Description
Key string The key of the tag, with a minimum of 1 character.

Schema

{
  "Key": "string"
}

ResourceTag

Information about the tag.

Properties

Name Type Description
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.

Schema

{
  "Key": "string",
  "Value": "string"
}

ResponseContext

Information about the context of the response.

Properties

Name Type Description
RequestId string The ID of the request.

Schema

{
  "RequestId": "string"
}

Route

Information about the route.

Properties

Name Type Description
CreationMethod string The method used to create the route.
DestinationIpRange string The IP range used for the destination match, in CIDR notation (for example, 10.0.0.0/24).
DestinationServiceId string The ID of the OUTSCALE service.
GatewayId string The ID of the Internet service or virtual gateway attached to the Net.
NatServiceId string The ID of a NAT service attached to the Net.
NetAccessPointId string The ID of the Net access point.
NetPeeringId string The ID of the Net peering.
NicId string The ID of the NIC.
State string The state of a route in the route table (always active).
VmAccountId string The account ID of the owner of the VM.
VmId string The ID of a VM specified in a route in the table.

Schema

{
  "CreationMethod": "string",
  "DestinationIpRange": "string",
  "DestinationServiceId": "string",
  "GatewayId": "string",
  "NatServiceId": "string",
  "NetAccessPointId": "string",
  "NetPeeringId": "string",
  "NicId": "string",
  "State": "string",
  "VmAccountId": "string",
  "VmId": "string"
}

RouteLight

Information about the route.

Properties

Name Type Description
DestinationIpRange string The IP range used for the destination match, in CIDR notation (for example, 10.0.0.0/24).
RouteType string The type of route (always static).
State string The current state of the static route (pending | available | deleting | deleted).

Schema

{
  "DestinationIpRange": "string",
  "RouteType": "string",
  "State": "string"
}

RoutePropagatingVirtualGateway

Information about the route propagating virtual gateway.

Properties

Name Type Description
VirtualGatewayId string The ID of the virtual gateway.

Schema

{
  "VirtualGatewayId": "string"
}

RouteTable

Information about the route table.

Properties

Name Type Description
LinkRouteTables [LinkRouteTable] One or more associations between the route table and Subnets.
NetId string The ID of the Net for the route table.
RoutePropagatingVirtualGateways [RoutePropagatingVirtualGateway] Information about virtual gateways propagating routes.
RouteTableId string The ID of the route table.
Routes [Route] One or more routes in the route table.
Tags [ResourceTag] One or more tags associated with the route table.

Schema

{
  "LinkRouteTables": [
    {
      "LinkRouteTableId": "string",
      "Main": true,
      "NetId": "string",
      "RouteTableId": "string",
      "SubnetId": "string"
    }
  ],
  "NetId": "string",
  "RoutePropagatingVirtualGateways": [
    {
      "VirtualGatewayId": "string"
    }
  ],
  "RouteTableId": "string",
  "Routes": [
    {
      "CreationMethod": "string",
      "DestinationIpRange": "string",
      "DestinationServiceId": "string",
      "GatewayId": "string",
      "NatServiceId": "string",
      "NetAccessPointId": "string",
      "NetPeeringId": "string",
      "NicId": "string",
      "State": "string",
      "VmAccountId": "string",
      "VmId": "string"
    }
  ],
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

ScaleDownVmGroupResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ScaleUpVmGroupResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

SecurityGroup

Information about the security group.

Properties

Name Type Description
AccountId string The account ID that has been granted permission.
Description string The description of the security group.
InboundRules [SecurityGroupRule] The inbound rules associated with the security group.
NetId string The ID of the Net for the security group.
OutboundRules [SecurityGroupRule] The outbound rules associated with the security group.
SecurityGroupId string The ID of the security group.
SecurityGroupName string The name of the security group.
Tags [ResourceTag] One or more tags associated with the security group.

Schema

{
  "AccountId": "string",
  "Description": "string",
  "InboundRules": [
    {
      "FromPortRange": 0,
      "IpProtocol": "string",
      "IpRanges": [
        "string"
      ],
      "SecurityGroupsMembers": [
        {
          "AccountId": "string",
          "SecurityGroupId": "string",
          "SecurityGroupName": "string"
        }
      ],
      "ServiceIds": [
        "string"
      ],
      "ToPortRange": 0
    }
  ],
  "NetId": "string",
  "OutboundRules": [
    {
      "FromPortRange": 0,
      "IpProtocol": "string",
      "IpRanges": [
        "string"
      ],
      "SecurityGroupsMembers": [
        {
          "AccountId": "string",
          "SecurityGroupId": "string",
          "SecurityGroupName": "string"
        }
      ],
      "ServiceIds": [
        "string"
      ],
      "ToPortRange": 0
    }
  ],
  "SecurityGroupId": "string",
  "SecurityGroupName": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

SecurityGroupLight

Information about the security group.

Properties

Name Type Description
SecurityGroupId string The ID of the security group.
SecurityGroupName string The name of the security group.

Schema

{
  "SecurityGroupId": "string",
  "SecurityGroupName": "string"
}

SecurityGroupRule

Information about the security group rule.

Properties

Name Type Description
FromPortRange integer The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
IpProtocol string The IP protocol name (tcp, udp, icmp, or -1 for all protocols). By default, -1. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website.
IpRanges [string] One or more IP ranges for the security group rules, in CIDR notation (for example, 10.0.0.0/16).
SecurityGroupsMembers [SecurityGroupsMember] Information about one or more source or destination security groups.
ServiceIds [string] One or more service IDs to allow traffic from a Net to access the corresponding OUTSCALE services. For more information, see ReadNetAccessPointServices.
ToPortRange integer The end of the port range for the TCP and UDP protocols, or an ICMP code number.

Schema

{
  "FromPortRange": 0,
  "IpProtocol": "string",
  "IpRanges": [
    "string"
  ],
  "SecurityGroupsMembers": [
    {
      "AccountId": "string",
      "SecurityGroupId": "string",
      "SecurityGroupName": "string"
    }
  ],
  "ServiceIds": [
    "string"
  ],
  "ToPortRange": 0
}

SecurityGroupsMember

Information about a source or destination security group.

Properties

Name Type Description
AccountId string The account ID that owns the source or destination security group.
SecurityGroupId string The ID of a source or destination security group that you want to link to the security group of the rule.
SecurityGroupName string (Public Cloud only) The name of a source or destination security group that you want to link to the security group of the rule.

Schema

{
  "AccountId": "string",
  "SecurityGroupId": "string",
  "SecurityGroupName": "string"
}

ServerCertificate

Information about the server certificate.

Properties

Name Type Description
ExpirationDate string (date) The date at which the server certificate expires.
Id string The ID of the server certificate.
Name string The name of the server certificate.
Orn string The Outscale Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > Outscale Resource Names (ORNs).
Path string The path to the server certificate.
UploadDate string (date) The date at which the server certificate has been uploaded.

Schema

{
  "ExpirationDate": "2019-08-24",
  "Id": "string",
  "Name": "string",
  "Orn": "string",
  "Path": "string",
  "UploadDate": "2019-08-24"
}

Service

Information about the service.

Properties

Name Type Description
IpRanges [string] The list of network prefixes used by the service, in CIDR notation.
ServiceId string The ID of the service.
ServiceName string The name of the service.

Schema

{
  "IpRanges": [
    "string"
  ],
  "ServiceId": "string",
  "ServiceName": "string"
}

SetDefaultPolicyVersionResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

Snapshot

Information about the snapshot.

Properties

Name Type Description
AccountAlias string The account alias of the owner of the snapshot.
AccountId string The account ID of the owner of the snapshot.
CreationDate string (date-time) The date and time (UTC) of creation of the snapshot.
Description string The description of the snapshot.
PermissionsToCreateVolume PermissionsOnResource Permissions for the resource.
Progress integer The progress of the snapshot, as a percentage.
SnapshotId string The ID of the snapshot.
State string The state of the snapshot (in-queue | pending | completed | error | deleting)).
Tags [ResourceTag] One or more tags associated with the snapshot.
VolumeId string The ID of the volume used to create the snapshot.
VolumeSize integer The size of the volume used to create the snapshot, in gibibytes (GiB).

Schema

{
  "AccountAlias": "string",
  "AccountId": "string",
  "CreationDate": "2019-08-24T14:15:22Z",
  "Description": "string",
  "PermissionsToCreateVolume": {
    "AccountIds": [
      "string"
    ],
    "GlobalPermission": true
  },
  "Progress": 0,
  "SnapshotId": "string",
  "State": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "VolumeId": "string",
  "VolumeSize": 0
}

SnapshotExportTask

Information about the snapshot export task.

Properties

Name Type Description
Comment string If the snapshot export task fails, an error message appears.
OsuExport OsuExportSnapshotExportTask Information about the snapshot export task.
Progress integer The progress of the snapshot export task, as a percentage.
SnapshotId string The ID of the snapshot to be exported.
State string The state of the snapshot export task (pending | active | completed | failed).
Tags [ResourceTag] One or more tags associated with the snapshot export task.
TaskId string The ID of the snapshot export task.

Schema

{
  "Comment": "string",
  "OsuExport": {
    "DiskImageFormat": "string",
    "OsuBucket": "string",
    "OsuPrefix": "string"
  },
  "Progress": 0,
  "SnapshotId": "string",
  "State": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "TaskId": "string"
}

SourceNet

Information about the source Net.

Properties

Name Type Description
AccountId string The account ID of the owner of the source Net.
IpRange string The IP range for the source Net, in CIDR notation (for example, 10.0.0.0/16).
NetId string The ID of the source Net.

Schema

{
  "AccountId": "string",
  "IpRange": "string",
  "NetId": "string"
}

SourceSecurityGroup

Information about the source security group of the load balancer, which you can use as part of your inbound rules for your registered VMs.
To only allow traffic from load balancers, add a security group rule that specifies this source security group as the inbound source.

Properties

Name Type Description
SecurityGroupAccountId string The account ID of the owner of the security group.
SecurityGroupName string The name of the security group.

Schema

{
  "SecurityGroupAccountId": "string",
  "SecurityGroupName": "string"
}

StartVmsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Vms [VmState] Information about one or more started VMs.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vms": [
    {
      "CurrentState": "string",
      "PreviousState": "string",
      "VmId": "string"
    }
  ]
}

StateComment

Information about the change of state.

Properties

Name Type Description
StateCode string The code of the change of state.
StateMessage string A message explaining the change of state.

Schema

{
  "StateCode": "string",
  "StateMessage": "string"
}

StopVmsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Vms [VmState] Information about one or more stopped VMs.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vms": [
    {
      "CurrentState": "string",
      "PreviousState": "string",
      "VmId": "string"
    }
  ]
}

Subnet

Information about the Subnet.

Properties

Name Type Description
AvailableIpsCount integer The number of available IPs in the Subnets.
IpRange string The IP range in the Subnet, in CIDR notation (for example, 10.0.0.0/16).
MapPublicIpOnLaunch boolean If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet.
NetId string The ID of the Net in which the Subnet is.
State string The state of the Subnet (pending | available | deleted).
SubnetId string The ID of the Subnet.
SubregionName string The name of the Subregion in which the Subnet is located.
Tags [ResourceTag] One or more tags associated with the Subnet.

Schema

{
  "AvailableIpsCount": 0,
  "IpRange": "string",
  "MapPublicIpOnLaunch": true,
  "NetId": "string",
  "State": "string",
  "SubnetId": "string",
  "SubregionName": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ]
}

Subregion

Information about the Subregion.

Properties

Name Type Description
LocationCode string The location code of the Subregion.
RegionName string The name of the Region containing the Subregion.
State string The state of the Subregion.
SubregionName string The name of the Subregion.

Schema

{
  "LocationCode": "string",
  "RegionName": "string",
  "State": "string",
  "SubregionName": "string"
}

Tag

Information about the tag.

Properties

Name Type Description
Key string The key of the tag, with a minimum of 1 character.
ResourceId string The ID of the resource.
ResourceType string The type of the resource.
Value string The value of the tag, between 0 and 255 characters.

Schema

{
  "Key": "string",
  "ResourceId": "string",
  "ResourceType": "string",
  "Value": "string"
}

UnlinkFlexibleGpuResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkInternetServiceResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkLoadBalancerBackendMachinesResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkNicResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkPolicyResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkPrivateIpsResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkPublicIpResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkRouteTableResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkVirtualGatewayResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkVolumeResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateAccessKeyResponse

Properties

Name Type Description
AccessKey AccessKey Information about the access key.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "AccessKey": {
    "AccessKeyId": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "ExpirationDate": "2019-08-24T14:15:22Z",
    "LastModificationDate": "2019-08-24T14:15:22Z",
    "State": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateAccountResponse

Properties

Name Type Description
Account Account Information about the account.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Account": {
    "AccountId": "string",
    "AdditionalEmails": [
      "string"
    ],
    "City": "string",
    "CompanyName": "string",
    "Country": "string",
    "CustomerId": "string",
    "Email": "string",
    "FirstName": "string",
    "JobTitle": "string",
    "LastName": "string",
    "MobileNumber": "string",
    "PhoneNumber": "string",
    "StateProvince": "string",
    "VatNumber": "string",
    "ZipCode": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateApiAccessPolicyResponse

Properties

Name Type Description
ApiAccessPolicy ApiAccessPolicy Information about the API access policy.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ApiAccessPolicy": {
    "MaxAccessKeyExpirationSeconds": 0,
    "RequireTrustedEnv": true
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateApiAccessRuleResponse

Properties

Name Type Description
ApiAccessRule ApiAccessRule Information about the API access rule.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ApiAccessRule": {
    "ApiAccessRuleId": "string",
    "CaIds": [
      "string"
    ],
    "Cns": [
      "string"
    ],
    "Description": "string",
    "IpRanges": [
      "string"
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateCaResponse

Properties

Name Type Description
Ca Ca Information about the Client Certificate Authority (CA).
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Ca": {
    "CaFingerprint": "string",
    "CaId": "string",
    "Description": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateDedicatedGroupResponse

Properties

Name Type Description
DedicatedGroup DedicatedGroup Information about the dedicated group.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "DedicatedGroup": {
    "AccountId": "string",
    "CpuGeneration": 0,
    "DedicatedGroupId": "string",
    "Name": "string",
    "NetIds": [
      "string"
    ],
    "SubregionName": "string",
    "VmIds": [
      "string"
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateDirectLinkInterfaceResponse

Properties

Name Type Description
DirectLinkInterface DirectLinkInterfaces Information about the DirectLink interfaces.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "DirectLinkInterface": {
    "AccountId": "string",
    "BgpAsn": 0,
    "BgpKey": "string",
    "ClientPrivateIp": "string",
    "DirectLinkId": "string",
    "DirectLinkInterfaceId": "string",
    "DirectLinkInterfaceName": "string",
    "InterfaceType": "string",
    "Location": "string",
    "Mtu": 0,
    "OutscalePrivateIp": "string",
    "State": "string",
    "VirtualGatewayId": "string",
    "Vlan": 0
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateFlexibleGpuResponse

Properties

Name Type Description
FlexibleGpu FlexibleGpu Information about the flexible GPU (fGPU).
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "FlexibleGpu": {
    "DeleteOnVmDeletion": true,
    "FlexibleGpuId": "string",
    "Generation": "string",
    "ModelName": "string",
    "State": "string",
    "SubregionName": "string",
    "VmId": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateImageResponse

Properties

Name Type Description
Image Image Information about the OMI.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Image": {
    "AccountAlias": "string",
    "AccountId": "string",
    "Architecture": "string",
    "BlockDeviceMappings": [
      {
        "Bsu": {
          "DeleteOnVmDeletion": true,
          "Iops": 0,
          "SnapshotId": "string",
          "VolumeSize": 0,
          "VolumeType": "string"
        },
        "DeviceName": "string",
        "VirtualDeviceName": "string"
      }
    ],
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "FileLocation": "string",
    "ImageId": "string",
    "ImageName": "string",
    "ImageType": "string",
    "PermissionsToLaunch": {
      "AccountIds": [
        "string"
      ],
      "GlobalPermission": true
    },
    "ProductCodes": [
      "string"
    ],
    "RootDeviceName": "string",
    "RootDeviceType": "string",
    "State": "string",
    "StateComment": {
      "StateCode": "string",
      "StateMessage": "string"
    },
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateListenerRuleResponse

Properties

Name Type Description
ListenerRule ListenerRule Information about the listener rule.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "ListenerRule": {
    "Action": "string",
    "HostNamePattern": "string",
    "ListenerId": 0,
    "ListenerRuleId": 0,
    "ListenerRuleName": "string",
    "PathPattern": "string",
    "Priority": 0,
    "VmIds": [
      "string"
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateLoadBalancerResponse

Properties

Name Type Description
LoadBalancer LoadBalancer Information about the load balancer.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateNetAccessPointResponse

Properties

Name Type Description
NetAccessPoint NetAccessPoint Information about the Net access point.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "NetAccessPoint": {
    "NetAccessPointId": "string",
    "NetId": "string",
    "RouteTableIds": [
      "string"
    ],
    "ServiceName": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateNetResponse

Properties

Name Type Description
Net Net Information about the Net.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Net": {
    "DhcpOptionsSetId": "string",
    "IpRange": "string",
    "NetId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "Tenancy": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateNicResponse

Properties

Name Type Description
Nic Nic Information about the NIC.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "Nic": {
    "AccountId": "string",
    "Description": "string",
    "IsSourceDestChecked": true,
    "LinkNic": {
      "DeleteOnVmDeletion": true,
      "DeviceNumber": 0,
      "LinkNicId": "string",
      "State": "string",
      "VmAccountId": "string",
      "VmId": "string"
    },
    "LinkPublicIp": {
      "LinkPublicIpId": "string",
      "PublicDnsName": "string",
      "PublicIp": "string",
      "PublicIpAccountId": "string",
      "PublicIpId": "string"
    },
    "MacAddress": "string",
    "NetId": "string",
    "NicId": "string",
    "PrivateDnsName": "string",
    "PrivateIps": [
      {
        "IsPrimary": true,
        "LinkPublicIp": {
          "LinkPublicIpId": "string",
          "PublicDnsName": "string",
          "PublicIp": "string",
          "PublicIpAccountId": "string",
          "PublicIpId": "string"
        },
        "PrivateDnsName": "string",
        "PrivateIp": "string"
      }
    ],
    "SecurityGroups": [
      {
        "SecurityGroupId": "string",
        "SecurityGroupName": "string"
      }
    ],
    "State": "string",
    "SubnetId": "string",
    "SubregionName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateRoutePropagationResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
RouteTable RouteTable Information about the route table.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTable": {
    "LinkRouteTables": [
      {
        "LinkRouteTableId": "string",
        "Main": true,
        "NetId": "string",
        "RouteTableId": "string",
        "SubnetId": "string"
      }
    ],
    "NetId": "string",
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "string"
      }
    ],
    "RouteTableId": "string",
    "Routes": [
      {
        "CreationMethod": "string",
        "DestinationIpRange": "string",
        "DestinationServiceId": "string",
        "GatewayId": "string",
        "NatServiceId": "string",
        "NetAccessPointId": "string",
        "NetPeeringId": "string",
        "NicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      }
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

UpdateRouteResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
RouteTable RouteTable Information about the route table.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTable": {
    "LinkRouteTables": [
      {
        "LinkRouteTableId": "string",
        "Main": true,
        "NetId": "string",
        "RouteTableId": "string",
        "SubnetId": "string"
      }
    ],
    "NetId": "string",
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "string"
      }
    ],
    "RouteTableId": "string",
    "Routes": [
      {
        "CreationMethod": "string",
        "DestinationIpRange": "string",
        "DestinationServiceId": "string",
        "GatewayId": "string",
        "NatServiceId": "string",
        "NetAccessPointId": "string",
        "NetPeeringId": "string",
        "NicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      }
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

UpdateRouteTableLinkResponse

Properties

Name Type Description
LinkRouteTableId string The ID of the association between the route table and the Subnet.
ResponseContext ResponseContext Information about the context of the response.

Schema

{
  "LinkRouteTableId": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateServerCertificateResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
ServerCertificate ServerCertificate Information about the server certificate.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "ServerCertificate": {
    "ExpirationDate": "2019-08-24",
    "Id": "string",
    "Name": "string",
    "Orn": "string",
    "Path": "string",
    "UploadDate": "2019-08-24"
  }
}

UpdateSnapshotResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Snapshot Snapshot Information about the snapshot.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Snapshot": {
    "AccountAlias": "string",
    "AccountId": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "PermissionsToCreateVolume": {
      "AccountIds": [
        "string"
      ],
      "GlobalPermission": true
    },
    "Progress": 0,
    "SnapshotId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VolumeId": "string",
    "VolumeSize": 0
  }
}

UpdateSubnetResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Subnet Subnet Information about the Subnet.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Subnet": {
    "AvailableIpsCount": 0,
    "IpRange": "string",
    "MapPublicIpOnLaunch": true,
    "NetId": "string",
    "State": "string",
    "SubnetId": "string",
    "SubregionName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

UpdateUserResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
User User Information about the EIM user.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "User": {
    "Path": "string",
    "UserId": "string",
    "UserName": "string"
  }
}

UpdateVmGroupResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VmGroup VmGroup Information about the VM group.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmGroup": {
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "PositioningStrategy": "attract",
    "SecurityGroupIds": [
      "string"
    ],
    "State": "available",
    "SubnetId": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VmCount": 0,
    "VmGroupId": "string",
    "VmGroupName": "string",
    "VmIds": [
      "string"
    ],
    "VmTemplateId": "string"
  }
}

UpdateVmResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Vm Vm Information about the VM.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vm": {
    "Architecture": "string",
    "BlockDeviceMappings": [
      {
        "Bsu": {
          "DeleteOnVmDeletion": true,
          "LinkDate": "2019-08-24T14:15:22Z",
          "State": "string",
          "VolumeId": "string"
        },
        "DeviceName": "string"
      }
    ],
    "BsuOptimized": true,
    "ClientToken": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "DeletionProtection": true,
    "Hypervisor": "string",
    "ImageId": "string",
    "IsSourceDestChecked": true,
    "KeypairName": "string",
    "LaunchNumber": 0,
    "NestedVirtualization": true,
    "NetId": "string",
    "Nics": [
      {
        "AccountId": "string",
        "Description": "string",
        "IsSourceDestChecked": true,
        "LinkNic": {
          "DeleteOnVmDeletion": true,
          "DeviceNumber": 0,
          "LinkNicId": "string",
          "State": "string"
        },
        "LinkPublicIp": {
          "PublicDnsName": "string",
          "PublicIp": "string",
          "PublicIpAccountId": "string"
        },
        "MacAddress": "string",
        "NetId": "string",
        "NicId": "string",
        "PrivateDnsName": "string",
        "PrivateIps": [
          {
            "IsPrimary": true,
            "LinkPublicIp": {
              "PublicDnsName": "string",
              "PublicIp": "string",
              "PublicIpAccountId": "string"
            },
            "PrivateDnsName": "string",
            "PrivateIp": "string"
          }
        ],
        "SecurityGroups": [
          {
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "State": "string",
        "SubnetId": "string"
      }
    ],
    "OsFamily": "string",
    "Performance": "string",
    "Placement": {
      "SubregionName": "string",
      "Tenancy": "string"
    },
    "PrivateDnsName": "string",
    "PrivateIp": "string",
    "ProductCodes": [
      "string"
    ],
    "PublicDnsName": "string",
    "PublicIp": "string",
    "ReservationId": "string",
    "RootDeviceName": "string",
    "RootDeviceType": "string",
    "SecurityGroups": [
      {
        "SecurityGroupId": "string",
        "SecurityGroupName": "string"
      }
    ],
    "State": "string",
    "StateReason": "string",
    "SubnetId": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "UserData": "string",
    "VmId": "string",
    "VmInitiatedShutdownBehavior": "string",
    "VmType": "string"
  }
}

UpdateVmTemplateResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VmTemplate VmTemplate none

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmTemplate": {
    "CpuCores": 0,
    "CpuGeneration": "string",
    "CpuPerformance": "medium",
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "ImageId": "string",
    "KeypairName": "string",
    "Ram": 0,
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VmTemplateId": "string",
    "VmTemplateName": "string"
  }
}

UpdateVolumeResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
Volume Volume Information about the volume.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Volume": {
    "CreationDate": "2019-08-24T14:15:22Z",
    "Iops": 0,
    "LinkedVolumes": [
      {
        "DeleteOnVmDeletion": true,
        "DeviceName": "string",
        "State": "string",
        "VmId": "string",
        "VolumeId": "string"
      }
    ],
    "Size": 0,
    "SnapshotId": "string",
    "State": "string",
    "SubregionName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VolumeId": "string",
    "VolumeType": "string"
  }
}

UpdateVpnConnectionResponse

Properties

Name Type Description
ResponseContext ResponseContext Information about the context of the response.
VpnConnection VpnConnection Information about a VPN connection.

Schema

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VpnConnection": {
    "ClientGatewayConfiguration": "string",
    "ClientGatewayId": "string",
    "ConnectionType": "string",
    "Routes": [
      {
        "DestinationIpRange": "string",
        "RouteType": "string",
        "State": "string"
      }
    ],
    "State": "string",
    "StaticRoutesOnly": true,
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VgwTelemetries": [
      {
        "AcceptedRouteCount": 0,
        "LastStateChangeDate": "2019-08-24T14:15:22Z",
        "OutsideIpAddress": "string",
        "State": "string",
        "StateDescription": "string"
      }
    ],
    "VirtualGatewayId": "string",
    "VpnConnectionId": "string",
    "VpnOptions": {
      "Phase1Options": {
        "DpdTimeoutAction": "string",
        "DpdTimeoutSeconds": 0,
        "IkeVersions": [
          "string"
        ],
        "Phase1DhGroupNumbers": [
          0
        ],
        "Phase1EncryptionAlgorithms": [
          "string"
        ],
        "Phase1IntegrityAlgorithms": [
          "string"
        ],
        "Phase1LifetimeSeconds": 0,
        "ReplayWindowSize": 0,
        "StartupAction": "string"
      },
      "Phase2Options": {
        "Phase2DhGroupNumbers": [
          0
        ],
        "Phase2EncryptionAlgorithms": [
          "string"
        ],
        "Phase2IntegrityAlgorithms": [
          "string"
        ],
        "Phase2LifetimeSeconds": 0,
        "PreSharedKey": "string"
      },
      "TunnelInsideIpRange": "string"
    }
  }
}

User

Information about the EIM user.

Properties

Name Type Description
Path string The path to the EIM user.
UserId string The ID of the EIM user.
UserName string The name of the EIM user.

Schema

{
  "Path": "string",
  "UserId": "string",
  "UserName": "string"
}

VgwTelemetry

Information about the current state of a VPN tunnel.

Properties

Name Type Description
AcceptedRouteCount integer The number of routes accepted through BGP (Border Gateway Protocol) route exchanges.
LastStateChangeDate string (date-time) The date and time (UTC) of the latest state update.
OutsideIpAddress string The IP on the OUTSCALE side of the tunnel.
State string The state of the IPSEC tunnel (UP | DOWN).
StateDescription string A description of the current state of the tunnel.

Schema

{
  "AcceptedRouteCount": 0,
  "LastStateChangeDate": "2019-08-24T14:15:22Z",
  "OutsideIpAddress": "string",
  "State": "string",
  "StateDescription": "string"
}

VirtualGateway

Information about the virtual gateway.

Properties

Name Type Description
ConnectionType string The type of VPN connection supported by the virtual gateway (only ipsec.1 is supported).
NetToVirtualGatewayLinks [NetToVirtualGatewayLink] The Net to which the virtual gateway is attached.
State string The state of the virtual gateway (pending | available | deleting | deleted).
Tags [ResourceTag] One or more tags associated with the virtual gateway.
VirtualGatewayId string The ID of the virtual gateway.

Schema

{
  "ConnectionType": "string",
  "NetToVirtualGatewayLinks": [
    {
      "NetId": "string",
      "State": "string"
    }
  ],
  "State": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "VirtualGatewayId": "string"
}

Vm

Information about the VM.

Properties

Name Type Description
Architecture string The architecture of the VM (i386 | x86_64).
BlockDeviceMappings [BlockDeviceMappingCreated] The block device mapping of the VM.
BsuOptimized boolean This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.
ClientToken string The idempotency token provided when launching the VM.
CreationDate string (date-time) The date and time (UTC) of creation of the VM.
DeletionProtection boolean If true, you cannot delete the VM unless you change this parameter back to false.
Hypervisor string The hypervisor type of the VMs (ovm | xen).
ImageId string The ID of the OMI used to create the VM.
IsSourceDestChecked boolean (Net only) If true, the source/destination check is enabled. If false, it is disabled. This value must be false for a NAT VM to perform network address translation (NAT) in a Net.
KeypairName string The name of the keypair used when launching the VM.
LaunchNumber integer The number for the VM when launching a group of several VMs (for example, 0, 1, 2, and so on).
NestedVirtualization boolean If true, nested virtualization is enabled. If false, it is disabled.
NetId string The ID of the Net in which the VM is running.
Nics [NicLight] (Net only) The network interface cards (NICs) the VMs are attached to.
OsFamily string Indicates the operating system (OS) of the VM.
Performance string The performance of the VM (medium | high | highest).
Placement Placement Information about the placement of the VM.
PrivateDnsName string The name of the private DNS.
PrivateIp string The primary private IP of the VM.
ProductCodes [string] The product codes associated with the OMI used to create the VM.
PublicDnsName string The name of the public DNS.
PublicIp string The public IP of the VM.
ReservationId string The reservation ID of the VM.
RootDeviceName string The name of the root device for the VM (for example, /dev/sda1).
RootDeviceType string The type of root device used by the VM (always bsu).
SecurityGroups [SecurityGroupLight] One or more security groups associated with the VM.
State string The state of the VM (pending | running | stopping | stopped | shutting-down | terminated | quarantine).
StateReason string The reason explaining the current state of the VM.
SubnetId string The ID of the Subnet for the VM.
Tags [ResourceTag] One or more tags associated with the VM.
UserData string The Base64-encoded MIME user data.
VmId string The ID of the VM.
VmInitiatedShutdownBehavior string The VM behavior when you stop it. If set to stop, the VM stops. If set to restart, the VM stops then automatically restarts. If set to terminate, the VM stops and is deleted.
VmType string The type of VM. For more information, see VM Types.

Schema

{
  "Architecture": "string",
  "BlockDeviceMappings": [
    {
      "Bsu": {
        "DeleteOnVmDeletion": true,
        "LinkDate": "2019-08-24T14:15:22Z",
        "State": "string",
        "VolumeId": "string"
      },
      "DeviceName": "string"
    }
  ],
  "BsuOptimized": true,
  "ClientToken": "string",
  "CreationDate": "2019-08-24T14:15:22Z",
  "DeletionProtection": true,
  "Hypervisor": "string",
  "ImageId": "string",
  "IsSourceDestChecked": true,
  "KeypairName": "string",
  "LaunchNumber": 0,
  "NestedVirtualization": true,
  "NetId": "string",
  "Nics": [
    {
      "AccountId": "string",
      "Description": "string",
      "IsSourceDestChecked": true,
      "LinkNic": {
        "DeleteOnVmDeletion": true,
        "DeviceNumber": 0,
        "LinkNicId": "string",
        "State": "string"
      },
      "LinkPublicIp": {
        "PublicDnsName": "string",
        "PublicIp": "string",
        "PublicIpAccountId": "string"
      },
      "MacAddress": "string",
      "NetId": "string",
      "NicId": "string",
      "PrivateDnsName": "string",
      "PrivateIps": [
        {
          "IsPrimary": true,
          "LinkPublicIp": {
            "PublicDnsName": "string",
            "PublicIp": "string",
            "PublicIpAccountId": "string"
          },
          "PrivateDnsName": "string",
          "PrivateIp": "string"
        }
      ],
      "SecurityGroups": [
        {
          "SecurityGroupId": "string",
          "SecurityGroupName": "string"
        }
      ],
      "State": "string",
      "SubnetId": "string"
    }
  ],
  "OsFamily": "string",
  "Performance": "string",
  "Placement": {
    "SubregionName": "string",
    "Tenancy": "string"
  },
  "PrivateDnsName": "string",
  "PrivateIp": "string",
  "ProductCodes": [
    "string"
  ],
  "PublicDnsName": "string",
  "PublicIp": "string",
  "ReservationId": "string",
  "RootDeviceName": "string",
  "RootDeviceType": "string",
  "SecurityGroups": [
    {
      "SecurityGroupId": "string",
      "SecurityGroupName": "string"
    }
  ],
  "State": "string",
  "StateReason": "string",
  "SubnetId": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "UserData": "string",
  "VmId": "string",
  "VmInitiatedShutdownBehavior": "string",
  "VmType": "string"
}

VmGroup

Information about the VM group.

Properties

Name Type Description
CreationDate string (date-time) The date and time (UTC) of creation of the VM group.
Description string The description of the VM group.
PositioningStrategy string The positioning strategy of the VMs on hypervisors. By default, or if set to no-strategy, TINA determines the most adequate position for the VMs. If set to attract, the VMs are deployed on the same hypervisor, which improves network performance. If set to repulse, the VMs are deployed on a different hypervisor, which improves fault tolerance.
SecurityGroupIds [string] One or more IDs of security groups for the VM group.
State string none
SubnetId string The ID of the Subnet for the VM group.
Tags [ResourceTag] One or more tags associated with the VM.
VmCount integer The number of VMs in the VM group.
VmGroupId string The ID of the VM group.
VmGroupName string The name of the VM group.
VmIds [string] The IDs of the VMs in the VM group.
VmTemplateId string The ID of the VM template used by the VM group.

Schema

{
  "CreationDate": "2019-08-24T14:15:22Z",
  "Description": "string",
  "PositioningStrategy": "attract",
  "SecurityGroupIds": [
    "string"
  ],
  "State": "available",
  "SubnetId": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "VmCount": 0,
  "VmGroupId": "string",
  "VmGroupName": "string",
  "VmIds": [
    "string"
  ],
  "VmTemplateId": "string"
}

VmState

Information about the state of the VM.

Properties

Name Type Description
CurrentState string The current state of the VM (InService | OutOfService | Unknown).
PreviousState string The previous state of the VM (InService | OutOfService | Unknown).
VmId string The ID of the VM.

Schema

{
  "CurrentState": "string",
  "PreviousState": "string",
  "VmId": "string"
}

VmStates

Information about the states of the VMs.

Properties

Name Type Description
MaintenanceEvents [MaintenanceEvent] One or more scheduled events associated with the VM.
SubregionName string The name of the Subregion of the VM.
VmId string The ID of the VM.
VmState string The state of the VM (pending | running | stopping | stopped | shutting-down | terminated | quarantine).

Schema

{
  "MaintenanceEvents": [
    {
      "Code": "string",
      "Description": "string",
      "NotAfter": "2019-08-24",
      "NotBefore": "2019-08-24"
    }
  ],
  "SubregionName": "string",
  "VmId": "string",
  "VmState": "string"
}

VmTemplate

Properties

Name Type Description
CpuCores integer The number of vCores.
CpuGeneration string The processor generation.
CpuPerformance string The performance of the VMs.
CreationDate string (date-time) The date and time (UTC) of creation of the VM template.
Description string The description of the VM template.
ImageId string The ID of the OMI.
KeypairName string The name of the keypair.
Ram integer The amount of RAM.
Tags [ResourceTag] One or more tags associated with the VM template.
VmTemplateId string The ID of the VM template.
VmTemplateName string The name of the VM template.

Schema

{
  "CpuCores": 0,
  "CpuGeneration": "string",
  "CpuPerformance": "medium",
  "CreationDate": "2019-08-24T14:15:22Z",
  "Description": "string",
  "ImageId": "string",
  "KeypairName": "string",
  "Ram": 0,
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "VmTemplateId": "string",
  "VmTemplateName": "string"
}

VmType

Information about the VM type.

Properties

Name Type Description
BsuOptimized boolean This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.
EphemeralsType string The type of ephemeral storage disk.
Eth integer The number of Ethernet interface available.
Gpu integer The number of GPU available.
MaxPrivateIps integer The maximum number of private IPs per network interface card (NIC).
MemorySize number (float) The amount of memory, in gibibytes.
VcoreCount integer The number of vCores.
VmTypeName string The name of the VM type.
VolumeCount integer The maximum number of ephemeral storage disks.
VolumeSize integer The size of one ephemeral storage disk, in gibibytes (GiB).

Schema

{
  "BsuOptimized": true,
  "EphemeralsType": "string",
  "Eth": 0,
  "Gpu": 0,
  "MaxPrivateIps": 0,
  "MemorySize": 0.1,
  "VcoreCount": 0,
  "VmTypeName": "string",
  "VolumeCount": 0,
  "VolumeSize": 0
}

Volume

Information about the volume.

Properties

Name Type Description
CreationDate string (date-time) The date and time (UTC) of creation of the volume.
Iops integer The number of I/O operations per second (IOPS):

- For io1 volumes, the number of provisioned IOPS

- For gp2 volumes, the baseline performance of the volume
LinkedVolumes [LinkedVolume] Information about your volume attachment.
Size integer The size of the volume, in gibibytes (GiB).
SnapshotId string The snapshot from which the volume was created.
State string The state of the volume (creating | available | in-use | updating | deleting | error).
SubregionName string The Subregion in which the volume was created.
Tags [ResourceTag] One or more tags associated with the volume.
VolumeId string The ID of the volume.
VolumeType string The type of the volume (standard | gp2 | io1).

Schema

{
  "CreationDate": "2019-08-24T14:15:22Z",
  "Iops": 0,
  "LinkedVolumes": [
    {
      "DeleteOnVmDeletion": true,
      "DeviceName": "string",
      "State": "string",
      "VmId": "string",
      "VolumeId": "string"
    }
  ],
  "Size": 0,
  "SnapshotId": "string",
  "State": "string",
  "SubregionName": "string",
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "VolumeId": "string",
  "VolumeType": "string"
}

VpnConnection

Information about a VPN connection.

Properties

Name Type Description
ClientGatewayConfiguration string Example configuration for the client gateway.
ClientGatewayId string The ID of the client gateway used on the client end of the connection.
ConnectionType string The type of VPN connection (always ipsec.1).
Routes [RouteLight] Information about one or more static routes associated with the VPN connection, if any.
State string The state of the VPN connection (pending | available | deleting | deleted).
StaticRoutesOnly boolean If false, the VPN connection uses dynamic routing with Border Gateway Protocol (BGP). If true, routing is controlled using static routes. For more information about how to create and delete static routes, see CreateVpnConnectionRoute and DeleteVpnConnectionRoute.
Tags [ResourceTag] One or more tags associated with the VPN connection.
VgwTelemetries [VgwTelemetry] Information about the current state of one or more of the VPN tunnels.
VirtualGatewayId string The ID of the virtual gateway used on the OUTSCALE end of the connection.
VpnConnectionId string The ID of the VPN connection.
VpnOptions VpnOptions Information about the VPN options.

Schema

{
  "ClientGatewayConfiguration": "string",
  "ClientGatewayId": "string",
  "ConnectionType": "string",
  "Routes": [
    {
      "DestinationIpRange": "string",
      "RouteType": "string",
      "State": "string"
    }
  ],
  "State": "string",
  "StaticRoutesOnly": true,
  "Tags": [
    {
      "Key": "string",
      "Value": "string"
    }
  ],
  "VgwTelemetries": [
    {
      "AcceptedRouteCount": 0,
      "LastStateChangeDate": "2019-08-24T14:15:22Z",
      "OutsideIpAddress": "string",
      "State": "string",
      "StateDescription": "string"
    }
  ],
  "VirtualGatewayId": "string",
  "VpnConnectionId": "string",
  "VpnOptions": {
    "Phase1Options": {
      "DpdTimeoutAction": "string",
      "DpdTimeoutSeconds": 0,
      "IkeVersions": [
        "string"
      ],
      "Phase1DhGroupNumbers": [
        0
      ],
      "Phase1EncryptionAlgorithms": [
        "string"
      ],
      "Phase1IntegrityAlgorithms": [
        "string"
      ],
      "Phase1LifetimeSeconds": 0,
      "ReplayWindowSize": 0,
      "StartupAction": "string"
    },
    "Phase2Options": {
      "Phase2DhGroupNumbers": [
        0
      ],
      "Phase2EncryptionAlgorithms": [
        "string"
      ],
      "Phase2IntegrityAlgorithms": [
        "string"
      ],
      "Phase2LifetimeSeconds": 0,
      "PreSharedKey": "string"
    },
    "TunnelInsideIpRange": "string"
  }
}

VpnOptions

Information about the VPN options.

Properties

Name Type Description
Phase1Options Phase1Options Information about Phase 1 of the Internet Key Exchange (IKE) negotiation. When Phase 1 finishes successfully, peers proceed to Phase 2 negotiations.
Phase2Options Phase2Options Information about Phase 2 of the Internet Key Exchange (IKE) negotiation.
TunnelInsideIpRange string The range of inside IPs for the tunnel. This must be a /30 CIDR block from the 169.254.254.0/24 range.

Schema

{
  "Phase1Options": {
    "DpdTimeoutAction": "string",
    "DpdTimeoutSeconds": 0,
    "IkeVersions": [
      "string"
    ],
    "Phase1DhGroupNumbers": [
      0
    ],
    "Phase1EncryptionAlgorithms": [
      "string"
    ],
    "Phase1IntegrityAlgorithms": [
      "string"
    ],
    "Phase1LifetimeSeconds": 0,
    "ReplayWindowSize": 0,
    "StartupAction": "string"
  },
  "Phase2Options": {
    "Phase2DhGroupNumbers": [
      0
    ],
    "Phase2EncryptionAlgorithms": [
      "string"
    ],
    "Phase2IntegrityAlgorithms": [
      "string"
    ],
    "Phase2LifetimeSeconds": 0,
    "PreSharedKey": "string"
  },
  "TunnelInsideIpRange": "string"
}

VpnOptionsToUpdate

Information about the VPN options.

Properties

Name Type Description
Phase2Options Phase2OptionsToUpdate Information about Phase 2 of the Internet Key Exchange (IKE) negotiation.
TunnelInsideIpRange string The range of inside IPs for the tunnel. This must be a /30 CIDR block from the 169.254.254.0/24 range.

Schema

{
  "Phase2Options": {
    "PreSharedKey": "string"
  },
  "TunnelInsideIpRange": "string"
}

With

The information to display in each returned log.

Properties

Name Type Description
AccountId boolean By default or if set to true, the account ID is displayed.
CallDuration boolean By default or if set to true, the duration of the call is displayed.
QueryAccessKey boolean By default or if set to true, the access key is displayed.
QueryApiName boolean By default or if set to true, the name of the API is displayed.
QueryApiVersion boolean By default or if set to true, the version of the API is displayed.
QueryCallName boolean By default or if set to true, the name of the call is displayed.
QueryDate boolean By default or if set to true, the date of the call is displayed.
QueryHeaderRaw boolean By default or if set to true, the raw header of the HTTP request is displayed.
QueryHeaderSize boolean By default or if set to true, the size of the raw header of the HTTP request is displayed.
QueryIpAddress boolean By default or if set to true, the IP is displayed.
QueryPayloadRaw boolean By default or if set to true, the raw payload of the HTTP request is displayed.
QueryPayloadSize boolean By default or if set to true, the size of the raw payload of the HTTP request is displayed.
QueryUserAgent boolean By default or if set to true, the user agent of the HTTP request is displayed.
RequestId boolean By default or if set to true, the request ID is displayed.
ResponseSize boolean By default or if set to true, the size of the response is displayed.
ResponseStatusCode boolean By default or if set to true, the HTTP status code of the response is displayed.

Schema

{
  "AccountId": true,
  "CallDuration": true,
  "QueryAccessKey": true,
  "QueryApiName": true,
  "QueryApiVersion": true,
  "QueryCallName": true,
  "QueryDate": true,
  "QueryHeaderRaw": true,
  "QueryHeaderSize": true,
  "QueryIpAddress": true,
  "QueryPayloadRaw": true,
  "QueryPayloadSize": true,
  "QueryUserAgent": true,
  "RequestId": true,
  "ResponseSize": true,
  "ResponseStatusCode": true
}