3DS OUTSCALE API v1.29.3

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.

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.

Error Codes Reference

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

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 your account.
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": [
    {
      "UnitPrice": 0.044,
      "Type": "BoxUsage:tinav4.c1r1p2",
      "Operation": "RunInstances-OD",
      "SubregionName": "eu-west-2a",
      "Value": 1392,
      "Title": "Instance - On demand - tinav4.c1r1 high performance - par heure",
      "Category": "compute",
      "ToDate": "2023-06-30T00:00:00.000+0000",
      "Service": "TinaOS-FCU",
      "AccountId": "123456789012",
      "PayingAccountId": "123456789012",
      "FromDate": "2023-06-01T00:00:00.000+0000",
      "Price": 61.248
    }
  ],
  "Currency": "EUR"
}

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 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"]}.
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). 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.
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). 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.
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.
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.
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). 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 allocated. It is then available again for attachment to a VM.

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.
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). 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" \
  --Description "Private image" \
  --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",
    "Description": "Private image",
    "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",
    Description="Private image",
    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",
            description: "Private image",
            permissionsToLaunch: {
                removals: {
                    globalPermission: true,
                },
            },
        },
    });
    console.log(result4);

}

main();

Available Parameters

Name Type Description
Description string A new description for the image.
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 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": "Private image",
    "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"]}.
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). 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).
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). 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.
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). 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
ClientToken string A unique identifier which enables you to manage the idempotency.
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.
» ClientTokens [string] The idempotency tokens provided when creating the NAT services.
» 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"]}.
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). 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.
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). 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.
» LinkPublicIpPublicDnsNames [string] The public DNS names associated with the public IPs.
» 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": "0475ca1