3DS OUTSCALE API v1.33.2

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.

Endpoints

Name Base URL
ap-northeast-1 https://api.ap-northeast-1.outscale.com/api/v1
cloudgouv-eu-west-1 https://api.cloudgouv-eu-west-1.outscale.com/api/v1
eu-west-2 (default) https://api.eu-west-2.outscale.com/api/v1
us-east-2 https://api.us-east-2.outscale.com/api/v1
us-west-1 https://api.us-west-1.outscale.com/api/v1

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.

Pagination Tutorial

You can learn more about the pagination methods for read calls in the dedicated pagination tutorial.

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.

Request Parameters

Examples

# 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"

# Example with access key/secret key authentication

oapi-cli --profile "default" CreateAccessKey \
  --ExpirationDate "2063-04-05"

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" CreateAccessKey \
  --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();

See the outscale_access_key resource in the Terraform OUTSCALE provider.

Body (CreateAccessKeyRequest):

Body Parameter 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).

Response Elements

Examples

{
  "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"
  }
}

Response 200 (CreateAccessKeyResponse):

Response Element Type Description
AccessKey AccessKeySecretKey Information about the access key.
AccessKeyId string The ID of the access key.
CreationDate string (date-time) The date and time (UTC) at which the access key was created.
ExpirationDate string (date-time) The date and time (UTC) at which the access key expires.
LastModificationDate string (date-time) The date and time (UTC) at which the access key was last modified.
SecretKey string The secret key that enables you to send requests.
State string The state of the access key (ACTIVE if the key is valid for API calls, or INACTIVE if not).
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

# 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"

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

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

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

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" DeleteAccessKey \
  --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();

See the outscale_access_key resource in the Terraform OUTSCALE provider.

Body (DeleteAccessKeyRequest):

Body Parameter 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).

Response Elements

Examples

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

Response 200 (DeleteAccessKeyResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadAccessKeys

POST /ReadAccessKeys

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

Request Parameters

Examples

# 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"]
    }'

# Example with access key/secret key authentication

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

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" ReadAccessKeys \
  --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();

See the outscale_access_key or outscale_access_keys data sources in the Terraform OUTSCALE provider.

Body (ReadAccessKeysRequest):

Body Parameter 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).

Response Elements

Examples

{
  "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"
    }
  ]
}

Response 200 (ReadAccessKeysResponse):

Response Element Type Description
AccessKeys [AccessKey] A list of access keys.
AccessKeyId string The ID of the access key.
CreationDate string (date-time) The date and time (UTC) at which the access key was created.
ExpirationDate string (date-time) The date and time (UTC) at which the access key expires.
LastModificationDate string (date-time) The date and time (UTC) at which the access key was last modified.
State string The state of the access key (ACTIVE if the key is valid for API calls, or INACTIVE if not).
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

UpdateAccessKey

POST /UpdateAccessKey

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

Request Parameters

Examples

# 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"

# Updating the expiration date of the access key

oapi-cli --profile "default" UpdateAccessKey \
  --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)

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

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

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" UpdateAccessKey \
  --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();

See the outscale_access_key resource in the Terraform OUTSCALE provider.

Body (UpdateAccessKeyRequest):

Body Parameter 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).

Response Elements

Examples

{
  "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"
  }
}

Response 200 (UpdateAccessKeyResponse):

Response Element Type Description
AccessKey AccessKey Information about the access key.
AccessKeyId string The ID of the access key.
CreationDate string (date-time) The date and time (UTC) at which the access key was created.
ExpirationDate string (date-time) The date and time (UTC) at which the access key expires.
LastModificationDate string (date-time) The date and time (UTC) at which the access key was last modified.
State string The state of the access key (ACTIVE if the key is valid for API calls, or INACTIVE if not).
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Account

CheckAuthentication

POST /CheckAuthentication

Validates the authenticity of the account.

Request Parameters

Examples

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

oapi-cli --profile "default" CheckAuthentication \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (CheckAuthenticationRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (CheckAuthenticationResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

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"'

oapi-cli --profile "default" CreateAccount \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (CreateAccountRequest):

Body Parameter 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.
Pattern: ^.+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$.
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.

Response Elements

Examples

{
  "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"
  }
}

Response 200 (CreateAccountResponse):

Response Element Type Description
Account Account Information about the account.
AccountId string The ID of the account.
AdditionalEmails [string] One or more additional email addresses for the account. These addresses are used for notifications only.
Pattern: ^.+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$.
City string The city of the account owner.
CompanyName string The name of the company for the account.
Country string The country of the account owner.
CustomerId string The ID of the customer.
Email string The main email address for the account. This address is used for your credentials and for notifications.
FirstName string The first name of the account owner.
JobTitle string The job title of the account owner.
LastName string The last name of the account owner.
MobileNumber string The mobile phone number of the account owner.
PhoneNumber string The landline phone number of the account owner.
StateProvince string The state/province of the account.
VatNumber string The value added tax (VAT) number for the account.
ZipCode string The ZIP code of the city.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadAccounts

POST /ReadAccounts

Gets information about the account that sent the request.

Request Parameters

Examples

osc-cli api ReadAccounts --profile "default"

oapi-cli --profile "default" ReadAccounts

# 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();

See the outscale_account or outscale_accounts data sources in the Terraform OUTSCALE provider.

Body (ReadAccountsRequest):

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

Response Elements

Examples

{
  "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"
    }
  ]
}

Response 200 (ReadAccountsResponse):

Response Element Type Description
Accounts [Account] The list of the accounts.
AccountId string The ID of the account.
AdditionalEmails [string] One or more additional email addresses for the account. These addresses are used for notifications only.
Pattern: ^.+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$.
City string The city of the account owner.
CompanyName string The name of the company for the account.
Country string The country of the account owner.
CustomerId string The ID of the customer.
Email string The main email address for the account. This address is used for your credentials and for notifications.
FirstName string The first name of the account owner.
JobTitle string The job title of the account owner.
LastName string The last name of the account owner.
MobileNumber string The mobile phone number of the account owner.
PhoneNumber string The landline phone number of the account owner.
StateProvince string The state/province of the account.
VatNumber string The value added tax (VAT) number for the account.
ZipCode string The ZIP code of the city.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadConsumptionAccount

POST /ReadConsumptionAccount

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

Request Parameters

Examples

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

oapi-cli --profile "default" ReadConsumptionAccount \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (ReadConsumptionAccountRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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"
}

Response 200 (ReadConsumptionAccountResponse):

Response Element Type Description
ConsumptionEntries [ConsumptionEntry] Information about the resources consumed during the specified time period.
AccountId string The ID of your TINA account.
Category string The category of the resource (for example, network).
FromDate string (date-time) The beginning of the time period (UTC).
Operation string The API call that triggered the resource consumption (for example, RunInstances or CreateVolume).
PayingAccountId string The ID of the TINA account which is billed for your consumption. It can be different from your account in the AccountId parameter.
Price number (double) The total price of the consumed resource during the specified time period, in the currency of the Region's catalog.
Service string The service of the API call (TinaOS-FCU, TinaOS-LBU, TinaOS-DirectLink, TinaOS-OOS, or TinaOS-OSU).
SubregionName string The name of the Subregion.
Title string A description of the consumed resource.
ToDate string (date-time) The end of the time period (UTC).
Type string The type of resource, depending on the API call.
UnitPrice number (double) The unit price of the consumed resource in the currency of your account, in the ISO-4217 format (for example, EUR).
Value number (double) The consumed amount for the resource. The unit depends on the resource type. For more information, see the Title element.
Currency string or null The currency of your account for the UnitPrice and Price parameters, in the ISO-4217 format (for example, EUR).
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

UpdateAccount

POST /UpdateAccount

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

Request Parameters

Examples

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

oapi-cli --profile "default" UpdateAccount \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (UpdateAccountRequest):

Body Parameter 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.
Pattern: ^.+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$.
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.

Response Elements

Examples

{
  "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"
  }
}

Response 200 (UpdateAccountResponse):

Response Element Type Description
Account Account Information about the account.
AccountId string The ID of the account.
AdditionalEmails [string] One or more additional email addresses for the account. These addresses are used for notifications only.
Pattern: ^.+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$.
City string The city of the account owner.
CompanyName string The name of the company for the account.
Country string The country of the account owner.
CustomerId string The ID of the customer.
Email string The main email address for the account. This address is used for your credentials and for notifications.
FirstName string The first name of the account owner.
JobTitle string The job title of the account owner.
LastName string The last name of the account owner.
MobileNumber string The mobile phone number of the account owner.
PhoneNumber string The landline phone number of the account owner.
StateProvince string The state/province of the account.
VatNumber string The value added tax (VAT) number for the account.
ZipCode string The ZIP code of the city.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ApiAccessPolicy

ReadApiAccessPolicy

POST /ReadApiAccessPolicy

Gets information about the API access policy of your account.

For more information, see About Your API Access Policy.

Request Parameters

Examples

# 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"

# Example with access key/secret key authentication

oapi-cli --profile "default" ReadApiAccessPolicy

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" ReadApiAccessPolicy

# 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();

See the outscale_api_access_policy data source in the Terraform OUTSCALE provider.

Body (ReadApiAccessPolicyRequest):

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

Response Elements

Examples

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

Response 200 (ReadApiAccessPolicyResponse):

Response Element Type Description
ApiAccessPolicy ApiAccessPolicy Information about the API access policy.
MaxAccessKeyExpirationSeconds integer (int64) The maximum possible lifetime for your access keys, in seconds. If 0, your access keys can have unlimited lifetimes.
RequireTrustedEnv boolean If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) enforcement. For more information, see About Your API Access Policy.

If this is enabled, it is required that you and all your users log in to Cockpit v2 using the WebAuthn method for multi-factor authentication. For more information, see About Authentication > Multi-Factor Authentication.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

UpdateApiAccessPolicy

POST /UpdateApiAccessPolicy

Updates the API access policy of your account.

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

Request Parameters

Examples

# 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

# Require expiration dates of maximum 1 year

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

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

oapi-cli --profile "default" UpdateApiAccessPolicy \
  --MaxAccessKeyExpirationSeconds 0 \
  --RequireTrustedEnv False

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" UpdateApiAccessPolicy \
  --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();

See the outscale_api_access_policy resource in the Terraform OUTSCALE provider.

Body (UpdateApiAccessPolicyRequest):

Body Parameter 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.

Response Elements

Examples

# 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
  }
}

Response 200 (UpdateApiAccessPolicyResponse):

Response Element Type Description
ApiAccessPolicy ApiAccessPolicy Information about the API access policy.
MaxAccessKeyExpirationSeconds integer (int64) The maximum possible lifetime for your access keys, in seconds. If 0, your access keys can have unlimited lifetimes.
RequireTrustedEnv boolean If true, a trusted session is activated, allowing you to bypass Certificate Authorities (CAs) enforcement. For more information, see About Your API Access Policy.

If this is enabled, it is required that you and all your users log in to Cockpit v2 using the WebAuthn method for multi-factor authentication. For more information, see About Authentication > Multi-Factor Authentication.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

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.

Request Parameters

Examples

# 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"

# Creating an API access rule based on IPs

oapi-cli --profile "default" CreateApiAccessRule \
  --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)

oapi-cli --profile "default" CreateApiAccessRule \
  --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

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" CreateApiAccessRule \
  --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();

See the outscale_api_access_rule resource in the Terraform OUTSCALE provider.

Body (CreateApiAccessRuleRequest):

Body Parameter 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).

Response Elements

Examples

# 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"
  }
}

Response 200 (CreateApiAccessRuleResponse):

Response Element Type Description
ApiAccessRule ApiAccessRule Information about the API access rule.
ApiAccessRuleId string The ID of the API access rule.
CaIds [string] One or more IDs of Client Certificate Authorities (CAs) used for the API access rule.
Cns [string] One or more Client Certificate Common Names (CNs).
Description string The description of the API access rule.
IpRanges [string] One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

# 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"

# Example with access key/secret key authentication

oapi-cli --profile "default" DeleteApiAccessRule \
  --ApiAccessRuleId "aar-1234567890abcdef1234567890abcdef"

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" DeleteApiAccessRule \
  --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();

See the outscale_api_access_rule resource in the Terraform OUTSCALE provider.

Body (DeleteApiAccessRuleRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteApiAccessRuleResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadApiAccessRules

POST /ReadApiAccessRules

Lists one or more API access rules.

Request Parameters

Examples

# 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"]
    }'

# Example with access key/secret key authentication

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

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" ReadApiAccessRules \
  --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();

See the outscale_api_access_rule or outscale_api_access_rules data sources in the Terraform OUTSCALE provider.

Body (ReadApiAccessRulesRequest):

Body Parameter 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).

Response Elements

Examples

{
  "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"
    }
  ]
}

Response 200 (ReadApiAccessRulesResponse):

Response Element Type Description
ApiAccessRules [ApiAccessRule] A list of API access rules.
ApiAccessRuleId string The ID of the API access rule.
CaIds [string] One or more IDs of Client Certificate Authorities (CAs) used for the API access rule.
Cns [string] One or more Client Certificate Common Names (CNs).
Description string The description of the API access rule.
IpRanges [string] One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

# 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"

# Example with access key/secret key authentication

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

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" UpdateApiAccessRule \
  --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();

See the outscale_api_access_rule resource in the Terraform OUTSCALE provider.

Body (UpdateApiAccessRuleRequest):

Body Parameter 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).

Response Elements

Examples

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

Response 200 (UpdateApiAccessRuleResponse):

Response Element Type Description
ApiAccessRule ApiAccessRule Information about the API access rule.
ApiAccessRuleId string The ID of the API access rule.
CaIds [string] One or more IDs of Client Certificate Authorities (CAs) used for the API access rule.
Cns [string] One or more Client Certificate Common Names (CNs).
Description string The description of the API access rule.
IpRanges [string] One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

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

oapi-cli --profile "default" ReadApiLogs \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (ReadApiLogsRequest):

Body Parameter 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 1 and 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.

Response Elements

Examples

{
  "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"
    }
  ]
}

Response 200 (ReadApiLogsResponse):

Response Element Type Description
Logs [Log] Information about one or more logs.
AccountId string The account ID of the logged call.
CallDuration integer The duration of the logged call, in microseconds.
QueryAccessKey string The access key used for the logged call.
QueryApiName string The name of the API used by the logged call (always oapi for the OUTSCALE API).
QueryApiVersion string The version of the API used by the logged call.
QueryCallName string The name of the logged call.
QueryDate string (date-time) The date and time (UTC) of the logged call.
QueryHeaderRaw string The raw header of the HTTP request of the logged call.
QueryHeaderSize integer The size of the raw header of the HTTP request of the logged call, in bytes.
QueryIpAddress string The IP used for the logged call.
QueryPayloadRaw string The raw payload of the HTTP request of the logged call.
QueryPayloadSize integer The size of the raw payload of the HTTP request of the logged call, in bytes.
QueryUserAgent string The user agent of the HTTP request of the logged call.
RequestId string The request ID provided in the response of the logged call.
ResponseSize integer The size of the response of the logged call, in bytes.
ResponseStatusCode integer The HTTP status code of the response of the logged call.
NextPageToken string The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Ca

CreateCa

POST /CreateCa

Creates a Client Certificate Authority (CA).

For more information, see About API Access Rules.

Request Parameters

Examples

# 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"

# Example with access key/secret key authentication

oapi-cli --profile "default" CreateCa \
  --CaPem --file "ca-certificate.pem" \
  --Description "CA example"

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" CreateCa \
  --CaPem --file "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();

See the outscale_ca resource in the Terraform OUTSCALE provider.

Body (CreateCaRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (CreateCaResponse):

Response Element Type Description
Ca Ca Information about the Client Certificate Authority (CA).
CaFingerprint string The fingerprint of the CA.
CaId string The ID of the CA.
Description string The description of the CA.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

DeleteCa

POST /DeleteCa

Deletes a specified Client Certificate Authority (CA).

Request Parameters

Examples

# 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"

# Example with access key/secret key authentication

oapi-cli --profile "default" DeleteCa \
  --CaId "ca-fedcba0987654321fedcba0987654321"

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" DeleteCa \
  --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();

See the outscale_ca resource in the Terraform OUTSCALE provider.

Body (DeleteCaRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteCaResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadCas

POST /ReadCas

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

Request Parameters

Examples

# 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"]
    }'

# Example with access key/secret key authentication

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

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" ReadCas \
  --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();

See the outscale_ca or outscale_cas data sources in the Terraform OUTSCALE provider.

Body (ReadCasRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (ReadCasResponse):

Response Element Type Description
Cas [Ca] Information about one or more CAs.
CaFingerprint string The fingerprint of the CA.
CaId string The ID of the CA.
Description string The description of the CA.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

UpdateCa

POST /UpdateCa

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

Request Parameters

Examples

# 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"

# Example with access key/secret key authentication

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

# Example with login/password authentication

oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" UpdateCa \
  --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();

See the outscale_ca resource in the Terraform OUTSCALE provider.

Body (UpdateCaRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (UpdateCaResponse):

Response Element Type Description
Ca Ca Information about the Client Certificate Authority (CA).
CaFingerprint string The fingerprint of the CA.
CaId string The ID of the CA.
Description string The description of the CA.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Catalog

ReadCatalog

POST /ReadCatalog

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

Request Parameters

Examples

osc-cli api ReadCatalog --profile "default"

oapi-cli --profile "default" ReadCatalog

# 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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (ReadCatalogRequest):

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

Response Elements

Examples

{
  "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"
      }
    ]
  }
}

Response 200 (ReadCatalogResponse):

Response Element Type Description
Catalog Catalog Information about our catalog of prices.
Entries [CatalogEntry] One or more catalog entries.
Category string The category of the catalog entry (for example, network).
Flags string When returned and equal to PER_MONTH, the price of the catalog entry is calculated on a monthly basis.
Operation string The API call associated with the catalog entry (for example, CreateVms or RunInstances).
Service string The service associated with the catalog entry (TinaOS-FCU, TinaOS-LBU, TinaOS-DirectLink, or TinaOS-OOS).
SubregionName string The Subregion associated with the catalog entry.
Title string The description of the catalog entry.
Type string The type of resource associated with the catalog entry.
UnitPrice number (float) The unit price of the catalog entry in the currency of your account, in the ISO-4217 format (for example, EUR).
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadCatalogs

POST /ReadCatalogs

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

Request Parameters

Examples

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

oapi-cli --profile "default" ReadCatalogs \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (ReadCatalogsRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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"
        }
      ]
    }
  ]
}

Response 200 (ReadCatalogsResponse):

Response Element Type Description
Catalogs [Catalogs] Information about one or more catalogs.
Entries [CatalogEntry] One or more catalog entries.
Category string The category of the catalog entry (for example, network).
Flags string When returned and equal to PER_MONTH, the price of the catalog entry is calculated on a monthly basis.
Operation string The API call associated with the catalog entry (for example, CreateVms or RunInstances).
Service string The service associated with the catalog entry (TinaOS-FCU, TinaOS-LBU, TinaOS-DirectLink, or TinaOS-OOS).
SubregionName string The Subregion associated with the catalog entry.
Title string The description of the catalog entry.
Type string The type of resource associated with the catalog entry.
UnitPrice number (float) The unit price of the catalog entry in the currency of your account, in the ISO-4217 format (for example, EUR).
FromDate string (date-time) The beginning of the time period (UTC).
State string The state of the catalog (CURRENT | OBSOLETE).
ToDate string (date-time) The end of the time period (UTC).
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadUnitPrice

POST /ReadUnitPrice

Gets unit price information for the specified parameters.

Request Parameters

Examples

osc-cli api ReadUnitPrice --profile "default" \
  --Operation "CreateVolume" \
  --Service "TinaOS-FCU" \
  --Type "BSU:VolumeIOPS:io1"

oapi-cli --profile "default" ReadUnitPrice \
  --Operation "CreateVolume" \
  --Service "TinaOS-FCU" \
  --Type "BSU:VolumeIOPS:io1"

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

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadUnitPrice \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Operation": "CreateVolume",
    "Service": "TinaOS-FCU",
    "Type": "BSU:VolumeIOPS:io1"
  }'

from osc_sdk_python import Gateway

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

result = gw.ReadUnitPrice(
    Operation="CreateVolume",
    Service="TinaOS-FCU",
    Type="BSU:VolumeIOPS:io1",
)
print(result)

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

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

    const result = await api.readUnitPrice({
        readUnitPriceRequest: {
            operation: "CreateVolume",
            service: "TinaOS-FCU",
            type: "BSU:VolumeIOPS:io1",
        },
    });
    console.log(result);

}

main();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (ReadUnitPriceRequest):

Body Parameter Type Description
Operation (required) string The operation associated with the catalog entry (for example, RunInstances-OD or CreateVolume).
Service (required) string The service associated with the catalog entry (for example, TinaOS-FCU or TinaOS-OOS).
Type (required) string The type associated with the catalog entry (for example, BSU:VolumeIOPS:io1 or BoxUsage:tinav6.c6r16p3).

Response Elements

Examples

{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "UnitPriceEntry": {
    "UnitPrice": 0.01,
    "Unit": "PER_IOPS_PER_MONTH",
    "Currency": "EUR",
    "Operation": "CreateVolume",
    "Type": "BSU:VolumeIOPS:io1",
    "Service": "TinaOS-FCU"
  }
}

Response 200 (ReadUnitPriceResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.
UnitPriceEntry UnitPriceEntry Information about the unit price entry.
Currency string The currency of your account for the UnitPrice parameter, in the ISO-4217 format (for example, EUR).
Operation string The operation associated with the catalog entry (for example, RunInstances-OD or CreateVolume).
Service string The service associated with the catalog entry (for example, TinaOS-FCU or TinaOS-OOS).
Type string The type associated with the catalog entry (for example, BSU:VolumeIOPS:io1 or BoxUsage:tinav6.c6r16p3).
Unit string The unit associated with the catalog entry (for example, PER_MONTH or PER_COUNT).
UnitPrice number (double) The unit price of the catalog entry in the currency of your account, in the ISO-4217 format (for example, EUR).

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.

Request Parameters

Examples

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

oapi-cli --profile "default" CreateClientGateway \
  --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();

See the outscale_client_gateway resource in the Terraform OUTSCALE provider.

Body (CreateClientGatewayRequest):

Body Parameter 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, except 50624, 53306, and 132418.
If you do not have an ASN, you can choose one between 64512 and 65534 (both included), or between 4200000000 and 4294967295 (both included).
ConnectionType (required) string The communication protocol used to establish tunnel with your client gateway (always ipsec.1).
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.

Response Elements

Examples

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

Response 200 (CreateClientGatewayResponse):

Response Element Type Description
ClientGateway ClientGateway Information about the client gateway.
BgpAsn integer The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the path to your client gateway through the Internet.
ClientGatewayId string The ID of the client gateway.
ConnectionType string The type of communication tunnel used by the client gateway (always ipsec.1).
PublicIp string The public IPv4 address of the client gateway (must be a fixed address into a NATed network).
State string The state of the client gateway (pending | available | deleting | deleted).
Tags [ResourceTag] One or more tags associated with the client gateway.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

DeleteClientGateway

POST /DeleteClientGateway

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

Request Parameters

Examples

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

oapi-cli --profile "default" DeleteClientGateway \
  --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();

See the outscale_client_gateway resource in the Terraform OUTSCALE provider.

Body (DeleteClientGatewayRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteClientGatewayResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadClientGateways

POST /ReadClientGateways

Lists one or more of your client gateways.

Request Parameters

Examples

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"]
    }'

oapi-cli --profile "default" ReadClientGateways \
  --Filters '{
      "ClientGatewayIds": ["cgw-12345678"]
    }'
oapi-cli --profile "default" ReadClientGateways \
  --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();

See the outscale_client_gateway or outscale_client_gateways data sources in the Terraform OUTSCALE provider.

Body (ReadClientGatewaysRequest):

Body Parameter 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 (always ipsec.1).
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 1 and 1000, both included). By default, 100.

Response Elements

Examples

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

Response 200 (ReadClientGatewaysResponse):

Response Element Type Description
ClientGateways [ClientGateway] Information about one or more client gateways.
BgpAsn integer The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the path to your client gateway through the Internet.
ClientGatewayId string The ID of the client gateway.
ConnectionType string The type of communication tunnel used by the client gateway (always ipsec.1).
PublicIp string The public IPv4 address of the client gateway (must be a fixed address into a NATed network).
State string The state of the client gateway (pending | available | deleting | deleted).
Tags [ResourceTag] One or more tags associated with the client gateway.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

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

oapi-cli --profile "default" CreateDedicatedGroup \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (CreateDedicatedGroupRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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"
  }
}

Response 200 (CreateDedicatedGroupResponse):

Response Element Type Description
DedicatedGroup DedicatedGroup Information about the dedicated group.
AccountId string The account ID of the owners of the dedicated group.
CpuGeneration integer The processor generation.
DedicatedGroupId string The ID of the dedicated group.
Name string The name of the dedicated group.
NetIds [string] The IDs of the Nets in the dedicated group.
SubregionName string The name of the Subregion in which the dedicated group is located.
VmIds [string] The IDs of the VMs in the dedicated group.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

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.

Request Parameters

Examples

# 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

# Deleting a dedicated group without any resource in it.

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

oapi-cli --profile "default" DeleteDedicatedGroup \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (DeleteDedicatedGroupRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteDedicatedGroupResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

ReadDedicatedGroups

POST /ReadDedicatedGroups

[WARNING]
This feature is currently in beta.

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

Request Parameters

Examples

# 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]
    }'

# Filtering on a specific dedicated group

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

oapi-cli --profile "default" ReadDedicatedGroups \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (ReadDedicatedGroupsRequest):

Body Parameter 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 1 and 1000, both included). By default, 100.

Response Elements

Examples

{
  "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"
    }
  ]
}

Response 200 (ReadDedicatedGroupsResponse):

Response Element Type Description
DedicatedGroups [DedicatedGroup] Information about one or more dedicated groups.
AccountId string The account ID of the owners of the dedicated group.
CpuGeneration integer The processor generation.
DedicatedGroupId string The ID of the dedicated group.
Name string The name of the dedicated group.
NetIds [string] The IDs of the Nets in the dedicated group.
SubregionName string The name of the Subregion in which the dedicated group is located.
VmIds [string] The IDs of the VMs in the dedicated group.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

UpdateDedicatedGroup

POST /UpdateDedicatedGroup

[WARNING]
This feature is currently in beta.

Modifies the name of a specified dedicated group.

Request Parameters

Examples

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

oapi-cli --profile "default" UpdateDedicatedGroup \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (UpdateDedicatedGroupRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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"
  }
}

Response 200 (UpdateDedicatedGroupResponse):

Response Element Type Description
DedicatedGroup DedicatedGroup Information about the dedicated group.
AccountId string The account ID of the owners of the dedicated group.
CpuGeneration integer The processor generation.
DedicatedGroupId string The ID of the dedicated group.
Name string The name of the dedicated group.
NetIds [string] The IDs of the Nets in the dedicated group.
SubregionName string The name of the Subregion in which the dedicated group is located.
VmIds [string] The IDs of the VMs in the dedicated group.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

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.

Request Parameters

Examples

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"]'

oapi-cli --profile "default" CreateDhcpOptions \
  --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();

See the outscale_dhcp_option resource in the Terraform OUTSCALE provider.

Body (CreateDhcpOptionsRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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"
    ]
  }
}

Response 200 (CreateDhcpOptionsResponse):

Response Element Type Description
DhcpOptionsSet DhcpOptionsSet Information about the DHCP options set.
Default boolean If true, the DHCP options set is a default one. If false, it is not.
DhcpOptionsSetId string The ID of the DHCP options set.
DomainName string The domain name.
DomainNameServers [string] One or more IPs for the domain name servers.
LogServers [string] One or more IPs for the log servers.
NtpServers [string] One or more IPs for the NTP servers.
Tags [ResourceTag] One or more tags associated with the DHCP options set.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

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

oapi-cli --profile "default" DeleteDhcpOptions \
  --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();

See the outscale_dhcp_option resource in the Terraform OUTSCALE provider.

Body (DeleteDhcpOptionsRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteDhcpOptionsResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadDhcpOptions

POST /ReadDhcpOptions

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

Request Parameters

Examples

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"]
    }'

oapi-cli --profile "default" ReadDhcpOptions \
  --Filters '{
      "DhcpOptionsSetIds": ["dopt-12345678"]
    }'
oapi-cli --profile "default" ReadDhcpOptions \
  --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();

See the outscale_dhcp_option or outscale_dhcp_options data sources in the Terraform OUTSCALE provider.

Body (ReadDhcpOptionsRequest):

Body Parameter 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 1 and 1000, both included). By default, 100.

Response Elements

Examples

{
  "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"
      ]
    }
  ]
}

Response 200 (ReadDhcpOptionsResponse):

Response Element Type Description
DhcpOptionsSets [DhcpOptionsSet] Information about one or more DHCP options sets.
Default boolean If true, the DHCP options set is a default one. If false, it is not.
DhcpOptionsSetId string The ID of the DHCP options set.
DomainName string The domain name.
DomainNameServers [string] One or more IPs for the domain name servers.
LogServers [string] One or more IPs for the log servers.
NtpServers [string] One or more IPs for the NTP servers.
Tags [ResourceTag] One or more tags associated with the DHCP options set.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

DirectLink

POST /CreateDirectLink

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

For more information, see About DirectLink.

Examples

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

oapi-cli --profile "default" CreateDirectLink \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (CreateDirectLinkRequest):

Body Parameter 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.

Examples

{
  "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"
  }
}

Response 200 (CreateDirectLinkResponse):

Response Element Type Description
DirectLink DirectLink Information about the DirectLink.
AccountId string The account ID of the owner of the DirectLink.
Bandwidth string The physical link bandwidth (either 1 Gbps or 10 Gbps).
DirectLinkId string The ID of the DirectLink (for example, dxcon-xxxxxxxx).
DirectLinkName string The name of the DirectLink.
Location string The datacenter where the DirectLink is located.
RegionName string The Region in which the DirectLink has been created.
State string The state of the DirectLink.

* requested: The DirectLink is requested but the request has not been validated yet.

* pending: The DirectLink request has been validated. It remains in the pending state until you establish the physical link.

* available: The physical link is established and the connection is ready to use.

* deleting: The deletion process is in progress.

* deleted: The DirectLink is deleted.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

POST /DeleteDirectLink

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

Examples

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

oapi-cli --profile "default" DeleteDirectLink \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (DeleteDirectLinkRequest):

Body Parameter 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.

Examples

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

Response 200 (DeleteDirectLinkResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

POST /ReadDirectLinks

Lists all DirectLinks in the Region.

Examples

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

oapi-cli --profile "default" ReadDirectLinks \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (ReadDirectLinksRequest):

Body Parameter 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 1 and 1000, both included). By default, 100.

Examples

{
  "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"
    }
  ]
}

Response 200 (ReadDirectLinksResponse):

Response Element Type Description
DirectLinks [DirectLink] Information about one or more DirectLinks.
AccountId string The account ID of the owner of the DirectLink.
Bandwidth string The physical link bandwidth (either 1 Gbps or 10 Gbps).
DirectLinkId string The ID of the DirectLink (for example, dxcon-xxxxxxxx).
DirectLinkName string The name of the DirectLink.
Location string The datacenter where the DirectLink is located.
RegionName string The Region in which the DirectLink has been created.
State string The state of the DirectLink.

* requested: The DirectLink is requested but the request has not been validated yet.

* pending: The DirectLink request has been validated. It remains in the pending state until you establish the physical link.

* available: The physical link is established and the connection is ready to use.

* deleting: The deletion process is in progress.

* deleted: The DirectLink is deleted.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

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"
    }'

oapi-cli --profile "default" 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"
    }'

# 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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (CreateDirectLinkInterfaceRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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"
  }
}

Response 200 (CreateDirectLinkInterfaceResponse):

Response Element Type Description
DirectLinkInterface DirectLinkInterfaces Information about the DirectLink interfaces.
AccountId string The account ID of the owner of the DirectLink interface.
BgpAsn integer The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side of the DirectLink interface.
BgpKey string The BGP authentication key.
ClientPrivateIp string The IP on the customer's side of the DirectLink interface.
DirectLinkId string The ID of the DirectLink.
DirectLinkInterfaceId string The ID of the DirectLink interface.
DirectLinkInterfaceName string The name of the DirectLink interface.
InterfaceType string The type of the DirectLink interface (always private).
Location string The datacenter where the DirectLink interface is located.
Mtu integer The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always 1500).
OutscalePrivateIp string The IP on the OUTSCALE side of the DirectLink interface.
State string The state of the DirectLink interface (pending | available | deleting | deleted | confirming | rejected | expired).
VirtualGatewayId string The ID of the target virtual gateway.
Vlan integer The VLAN number associated with the DirectLink interface.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

DeleteDirectLinkInterface

POST /DeleteDirectLinkInterface

Deletes a specified DirectLink interface.

Request Parameters

Examples

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

oapi-cli --profile "default" DeleteDirectLinkInterface \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (DeleteDirectLinkInterfaceRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteDirectLinkInterfaceResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadDirectLinkInterfaces

POST /ReadDirectLinkInterfaces

Lists one or more of your DirectLink interfaces.

Request Parameters

Examples

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

oapi-cli --profile "default" ReadDirectLinkInterfaces \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (ReadDirectLinkInterfacesRequest):

Body Parameter 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 1 and 1000, both included). By default, 100.

Response Elements

Examples

{
  "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"
    }
  ]
}

Response 200 (ReadDirectLinkInterfacesResponse):

Response Element Type Description
DirectLinkInterfaces [DirectLinkInterfaces] Information about one or more DirectLink interfaces.
AccountId string The account ID of the owner of the DirectLink interface.
BgpAsn integer The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side of the DirectLink interface.
BgpKey string The BGP authentication key.
ClientPrivateIp string The IP on the customer's side of the DirectLink interface.
DirectLinkId string The ID of the DirectLink.
DirectLinkInterfaceId string The ID of the DirectLink interface.
DirectLinkInterfaceName string The name of the DirectLink interface.
InterfaceType string The type of the DirectLink interface (always private).
Location string The datacenter where the DirectLink interface is located.
Mtu integer The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always 1500).
OutscalePrivateIp string The IP on the OUTSCALE side of the DirectLink interface.
State string The state of the DirectLink interface (pending | available | deleting | deleted | confirming | rejected | expired).
VirtualGatewayId string The ID of the target virtual gateway.
Vlan integer The VLAN number associated with the DirectLink interface.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

UpdateDirectLinkInterface

POST /UpdateDirectLinkInterface

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

Request Parameters

Examples

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

oapi-cli --profile "default" UpdateDirectLinkInterface \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (UpdateDirectLinkInterfaceRequest):

Body Parameter 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).

Response Elements

Examples

{
  "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"
  }
}

Response 200 (UpdateDirectLinkInterfaceResponse):

Response Element Type Description
DirectLinkInterface DirectLinkInterfaces Information about the DirectLink interfaces.
AccountId string The account ID of the owner of the DirectLink interface.
BgpAsn integer The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side of the DirectLink interface.
BgpKey string The BGP authentication key.
ClientPrivateIp string The IP on the customer's side of the DirectLink interface.
DirectLinkId string The ID of the DirectLink.
DirectLinkInterfaceId string The ID of the DirectLink interface.
DirectLinkInterfaceName string The name of the DirectLink interface.
InterfaceType string The type of the DirectLink interface (always private).
Location string The datacenter where the DirectLink interface is located.
Mtu integer The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always 1500).
OutscalePrivateIp string The IP on the OUTSCALE side of the DirectLink interface.
State string The state of the DirectLink interface (pending | available | deleting | deleted | confirming | rejected | expired).
VirtualGatewayId string The ID of the target virtual gateway.
Vlan integer The VLAN number associated with the DirectLink interface.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

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

oapi-cli --profile "default" CreateFlexibleGpu \
  --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();

See the outscale_flexible_gpu resource in the Terraform OUTSCALE provider.

Body (CreateFlexibleGpuRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (CreateFlexibleGpuResponse):

Response Element Type Description
FlexibleGpu FlexibleGpu Information about the flexible GPU (fGPU).
DeleteOnVmDeletion boolean If true, the fGPU is deleted when the VM is terminated.
FlexibleGpuId string The ID of the fGPU.
Generation string The compatible processor generation.
ModelName string The model of fGPU. For more information, see About Flexible GPUs.
State string The state of the fGPU (allocated | attaching | attached | detaching).
SubregionName string The Subregion where the fGPU is located.
VmId string The ID of the VM the fGPU is attached to, if any.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

DeleteFlexibleGpu

POST /DeleteFlexibleGpu

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

Request Parameters

Examples

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

oapi-cli --profile "default" DeleteFlexibleGpu \
  --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();

See the outscale_flexible_gpu resource in the Terraform OUTSCALE provider.

Body (DeleteFlexibleGpuRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteFlexibleGpuResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

LinkFlexibleGpu

POST /LinkFlexibleGpu

Attaches one of your allocated flexible GPUs (fGPUs) to one of your virtual machines (VMs).
To complete the linking of the fGPU, you need to do a stop/start of the VM. A simple restart is not sufficient, as the linking of the fGPU is done when the VM goes through the stopped state. For the difference between stop/start and restart, see About VM Lifecycle.

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

Request Parameters

Examples

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

oapi-cli --profile "default" LinkFlexibleGpu \
  --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();

See the outscale_flexible_gpu_link resource in the Terraform OUTSCALE provider.

Body (LinkFlexibleGpuRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (LinkFlexibleGpuResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadFlexibleGpuCatalog

POST /ReadFlexibleGpuCatalog

Lists all flexible GPUs available in the public catalog.

Request Parameters

Examples

osc-cli api ReadFlexibleGpuCatalog --profile "default"

oapi-cli --profile "default" ReadFlexibleGpuCatalog

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();

See the outscale_flexible_gpu_catalog data source in the Terraform OUTSCALE provider.

Body (ReadFlexibleGpuCatalogRequest):

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

Response Elements

Examples

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

Response 200 (ReadFlexibleGpuCatalogResponse):

Response Element Type Description
FlexibleGpuCatalog [FlexibleGpuCatalog] Information about one or more fGPUs available in the public catalog.
Generations [string] The processor generations that the fGPUs are compatible with.
MaxCpu integer The maximum number of VM vCores that the fGPU is compatible with.
MaxRam integer The maximum amount of VM memory that the fGPU is compatible with.
ModelName string The model of fGPU.
VRam integer The amount of video RAM (VRAM) of the fGPU.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadFlexibleGpus

POST /ReadFlexibleGpus

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

Request Parameters

Examples

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

oapi-cli --profile "default" ReadFlexibleGpus \
  --Filters '{
      "FlexibleGpuIds": ["fgpu-12345678"]
    }'
oapi-cli --profile "default" ReadFlexibleGpus \
  --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();

See the outscale_flexible_gpu or outscale_flexible_gpus data sources in the Terraform OUTSCALE provider.

Body (ReadFlexibleGpusRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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"
    }
  ]
}

Response 200 (ReadFlexibleGpusResponse):

Response Element Type Description
FlexibleGpus [FlexibleGpu] Information about one or more fGPUs.
DeleteOnVmDeletion boolean If true, the fGPU is deleted when the VM is terminated.
FlexibleGpuId string The ID of the fGPU.
Generation string The compatible processor generation.
ModelName string The model of fGPU. For more information, see About Flexible GPUs.
State string The state of the fGPU (allocated | attaching | attached | detaching).
SubregionName string The Subregion where the fGPU is located.
VmId string The ID of the VM the fGPU is attached to, if any.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

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

oapi-cli --profile "default" UnlinkFlexibleGpu \
  --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();

See the outscale_flexible_gpu_link resource in the Terraform OUTSCALE provider.

Body (UnlinkFlexibleGpuRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (UnlinkFlexibleGpuResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

UpdateFlexibleGpu

POST /UpdateFlexibleGpu

Modifies a flexible GPU (fGPU) behavior.

Request Parameters

Examples

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

oapi-cli --profile "default" UpdateFlexibleGpu \
  --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();

See the outscale_flexible_gpu resource in the Terraform OUTSCALE provider.

Body (UpdateFlexibleGpuRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (UpdateFlexibleGpuResponse):

Response Element Type Description
FlexibleGpu FlexibleGpu Information about the flexible GPU (fGPU).
DeleteOnVmDeletion boolean If true, the fGPU is deleted when the VM is terminated.
FlexibleGpuId string The ID of the fGPU.
Generation string The compatible processor generation.
ModelName string The model of fGPU. For more information, see About Flexible GPUs.
State string The state of the fGPU (allocated | attaching | attached | detaching).
SubregionName string The Subregion where the fGPU is located.
VmId string The ID of the VM the fGPU is attached to, if any.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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. For more information, see Creating a Pre-Signed URL.

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

For more information, see About OMIs.

Request Parameters

Examples

# 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"

# Creating from a VM

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

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

oapi-cli --profile "default" 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"
# Registering from a bucket by using a manifest file

oapi-cli --profile "default" CreateImage \
  --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();

See the outscale_image resource in the Terraform OUTSCALE provider.

Body (CreateImageRequest):

Body Parameter Type Description
Architecture string (when registering from a snapshot) The architecture of the OMI (i386 or x86_64).
BlockDeviceMappings [BlockDeviceMappingImage] (when registering from a snapshot) 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 Creating a Pre-signed URL.
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) 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.

Response Elements

Examples

# 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"
  }
}

Response 200 (CreateImageResponse):

Response Element Type Description
Image Image Information about the OMI.
AccountAlias string The account alias of the owner of the OMI.
AccountId string The account ID of the owner of the OMI.
Architecture string The architecture of the OMI.
BlockDeviceMappings [BlockDeviceMappingImage] One or more block device mappings.
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).
CreationDate string (date-time) The date and time (UTC) at which the OMI was created.
Description string The description of the OMI.
FileLocation string The location from which the OMI files were created.
ImageId string The ID of the OMI.
ImageName string The name of the OMI.
ImageType string The type of the OMI.
PermissionsToLaunch PermissionsOnResource Permissions for the resource.
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.
ProductCodes [string] The product codes associated with the OMI.
RootDeviceName string The name of the root device.
RootDeviceType string The type of root device used by the OMI (always bsu).
State string The state of the OMI (pending | available | failed).
StateComment StateComment Information about the change of state.
StateCode string The code of the change of state.
StateMessage string A message explaining the change of state.
Tags [ResourceTag] One or more tags associated with the OMI.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

CreateImageExportTask

POST /CreateImageExportTask

Exports an OUTSCALE machine image (OMI) to an OUTSCALE Object Storage (OOS) bucket.
This enables you to copy an OMI between accounts in different Regions.

This action creates the necessary snapshots and manifest file in the bucket. The OMI can then be imported to another account using a pre-signed URL of its manifest file. For more information, see Creating a Pre-Signed URL.

To copy an OMI in the same Region, you can also use the CreateImage method.

[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.

Request Parameters

Examples

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

oapi-cli --profile "default" CreateImageExportTask \
  --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();

See the outscale_image_export_task resource in the Terraform OUTSCALE provider.

Body (CreateImageExportTaskRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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
  }
}

Response 200 (CreateImageExportTaskResponse):

Response Element Type Description
ImageExportTask ImageExportTask Information about the OMI export task.
Comment string If the OMI export task fails, an error message appears.
ImageId string The ID of the OMI to be exported.
OsuExport OsuExportImageExportTask Information about the OMI export task.
DiskImageFormat string The format of the export disk (qcow2 | raw).
OsuBucket string The name of the OOS bucket the OMI is exported to.
OsuManifestUrl string The URL of the manifest file.
OsuPrefix string The prefix for the key of the OOS object corresponding to the image.
Progress integer The progress of the OMI export task, as a percentage.
State string The state of the OMI export task (pending/queued | pending | completed | failed | cancelled).
Tags [ResourceTag] One or more tags associated with the image export task.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
TaskId string The ID of the OMI export task.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

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

oapi-cli --profile "default" DeleteImage \
  --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();

See the outscale_image resource in the Terraform OUTSCALE provider.

Body (DeleteImageRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteImageResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

ReadImageExportTasks

POST /ReadImageExportTasks

Lists one or more image export tasks.

Request Parameters

Examples

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

oapi-cli --profile "default" ReadImageExportTasks \
  --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();

See the outscale_image_export_task or outscale_image_export_tasks data sources in the Terraform OUTSCALE provider.

Body (ReadImageExportTasksRequest):

Body Parameter 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 1 and 1000, both included). By default, 100.

Response Elements

Examples

{
  "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
    }
  ]
}

Response 200 (ReadImageExportTasksResponse):

Response Element Type Description
ImageExportTasks [ImageExportTask] Information about one or more image export tasks.
Comment string If the OMI export task fails, an error message appears.
ImageId string The ID of the OMI to be exported.
OsuExport OsuExportImageExportTask Information about the OMI export task.
DiskImageFormat string The format of the export disk (qcow2 | raw).
OsuBucket string The name of the OOS bucket the OMI is exported to.
OsuManifestUrl string The URL of the manifest file.
OsuPrefix string The prefix for the key of the OOS object corresponding to the image.
Progress integer The progress of the OMI export task, as a percentage.
State string The state of the OMI export task (pending/queued | pending | completed | failed | cancelled).
Tags [ResourceTag] One or more tags associated with the image export task.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
TaskId string The ID of the OMI export task.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadImages

POST /ReadImages

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

Request Parameters

Examples

# 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*"]
    }'

# Reading a specific image

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

oapi-cli --profile "default" ReadImages \
  --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();

See the outscale_image or outscale_images data sources in the Terraform OUTSCALE provider.

Body (ReadImagesRequest):

Body Parameter 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 1 and 1000, both included). By default, 100.

Response Elements

Examples

# 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"
    }
  ]
}

Response 200 (ReadImagesResponse):

Response Element Type Description
Images [Image] Information about one or more OMIs.
AccountAlias string The account alias of the owner of the OMI.
AccountId string The account ID of the owner of the OMI.
Architecture string The architecture of the OMI.
BlockDeviceMappings [BlockDeviceMappingImage] One or more block device mappings.
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).
CreationDate string (date-time) The date and time (UTC) at which the OMI was created.
Description string The description of the OMI.
FileLocation string The location from which the OMI files were created.
ImageId string The ID of the OMI.
ImageName string The name of the OMI.
ImageType string The type of the OMI.
PermissionsToLaunch PermissionsOnResource Permissions for the resource.
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.
ProductCodes [string] The product codes associated with the OMI.
RootDeviceName string The name of the root device.
RootDeviceType string The type of root device used by the OMI (always bsu).
State string The state of the OMI (pending | available | failed).
StateComment StateComment Information about the change of state.
StateCode string The code of the change of state.
StateMessage string A message explaining the change of state.
Tags [ResourceTag] One or more tags associated with the OMI.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

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.

Request Parameters

Examples

# 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
      }
    }'

# Adding permission

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

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

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

oapi-cli --profile "default" UpdateImage \
  --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();

See the outscale_image_launch_permission resource in the Terraform OUTSCALE provider.

Body (UpdateImageRequest):

Body Parameter 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.
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.

Response Elements

Examples

# 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"
  }
}

Response 200 (UpdateImageResponse):

Response Element Type Description
Image Image Information about the OMI.
AccountAlias string The account alias of the owner of the OMI.
AccountId string The account ID of the owner of the OMI.
Architecture string The architecture of the OMI.
BlockDeviceMappings [BlockDeviceMappingImage] One or more block device mappings.
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).
CreationDate string (date-time) The date and time (UTC) at which the OMI was created.
Description string The description of the OMI.
FileLocation string The location from which the OMI files were created.
ImageId string The ID of the OMI.
ImageName string The name of the OMI.
ImageType string The type of the OMI.
PermissionsToLaunch PermissionsOnResource Permissions for the resource.
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.
ProductCodes [string] The product codes associated with the OMI.
RootDeviceName string The name of the root device.
RootDeviceType string The type of root device used by the OMI (always bsu).
State string The state of the OMI (pending | available | failed).
StateComment StateComment Information about the change of state.
StateCode string The code of the change of state.
StateMessage string A message explaining the change of state.
Tags [ResourceTag] One or more tags associated with the OMI.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

InternetService

CreateInternetService

POST /CreateInternetService

Creates an internet service you can use with a Net.
An internet service enables virtual machines (VMs) launched in a Net to connect to the Internet. It allows routing of incoming and outgoing Internet traffic and management of public IP addresses.

For more information, see About Internet Services.

Request Parameters

Examples

osc-cli api CreateInternetService --profile "default"

oapi-cli --profile "default" CreateInternetService

# 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();

See the outscale_internet_service resource in the Terraform OUTSCALE provider.

Body (CreateInternetServiceRequest):

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

Response Elements

Examples

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

Response 200 (CreateInternetServiceResponse):

Response Element Type Description
InternetService InternetService Information about the internet service.
InternetServiceId string The ID of the internet service.
NetId string The ID of the Net attached to the internet service.
State string The state of the attachment of the internet service to the Net (always available).
Tags [ResourceTag] One or more tags associated with the internet service.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

DeleteInternetService

POST /DeleteInternetService

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

Request Parameters

Examples

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

oapi-cli --profile "default" DeleteInternetService \
  --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();

See the outscale_internet_service resource in the Terraform OUTSCALE provider.

Body (DeleteInternetServiceRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteInternetServiceResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

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.

Request Parameters

Examples

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

oapi-cli --profile "default" LinkInternetService \
  --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();

See the outscale_internet_service_link resource in the Terraform OUTSCALE provider.

Body (LinkInternetServiceRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (LinkInternetServiceResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

ReadInternetServices

POST /ReadInternetServices

Lists one or more of your internet services.
An internet service enables virtual machines (VMs) launched in a Net to connect to the Internet. It allows routing of incoming and outgoing Internet traffic and management of public IP addresses.

Request Parameters

Examples

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

oapi-cli --profile "default" ReadInternetServices \
  --Filters '{
      "InternetServiceIds": ["igw-12345678"]
    }'
oapi-cli --profile "default" ReadInternetServices \
  --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();

See the outscale_internet_service or outscale_internet_services data sources in the Terraform OUTSCALE provider.

Body (ReadInternetServicesRequest):

Body Parameter 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 1 and 1000, both included). By default, 100.

Response Elements

Examples

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

Response 200 (ReadInternetServicesResponse):

Response Element Type Description
InternetServices [InternetService] Information about one or more internet services.
InternetServiceId string The ID of the internet service.
NetId string The ID of the Net attached to the internet service.
State string The state of the attachment of the internet service to the Net (always available).
Tags [ResourceTag] One or more tags associated with the internet service.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

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.

Request Parameters

Examples

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

oapi-cli --profile "default" UnlinkInternetService \
  --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();

See the outscale_internet_service_link resource in the Terraform OUTSCALE provider.

Body (UnlinkInternetServiceRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (UnlinkInternetServiceResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

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.

Request Parameters

Examples

# 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 "$(cat key_name.pub)"

# Creating a keypair

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

oapi-cli --profile "default" CreateKeypair \
  --KeypairName "import-keypair-example" \
  --PublicKey --file "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();

See the outscale_keypair resource in the Terraform OUTSCALE provider.

Body (CreateKeypairRequest):

Body Parameter 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.

Response Elements

Examples

# 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"
  }
}

Response 200 (CreateKeypairResponse):

Response Element Type Description
Keypair KeypairCreated Information about the created keypair.
KeypairFingerprint string The MD5 public key fingerprint, as specified in section 4 of RFC 4716.
KeypairName string The name of the keypair.
KeypairType string The type of the keypair (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).
PrivateKey string The private key, returned only if you are creating a keypair (not if you are importing). When you save this private key in a .rsa file, make sure you replace the \n escape sequences with real line breaks.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 409 (ErrorResponse): The HTTP 409 response (Conflict).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

DeleteKeypair

POST /DeleteKeypair

Deletes the specified keypair.
This action deletes the public key stored by 3DS OUTSCALE, thus deleting the keypair.

Request Parameters

Examples

osc-cli api DeleteKeypair --profile "default" \
  --KeypairName "keypair-example"

oapi-cli --profile "default" DeleteKeypair \
  --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();

See the outscale_keypair resource in the Terraform OUTSCALE provider.

Body (DeleteKeypairRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteKeypairResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

ReadKeypairs

POST /ReadKeypairs

Lists one or more of your keypairs.

Request Parameters

Examples

osc-cli api ReadKeypairs --profile "default" \
  --Filters '{
      "KeypairNames": ["keypair-example"]
    }'

oapi-cli --profile "default" ReadKeypairs \
  --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();

See the outscale_keypair or outscale_keypairs data sources in the Terraform OUTSCALE provider.

Body (ReadKeypairsRequest):

Body Parameter 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 1 and 1000, both included). By default, 100.

Response Elements

Examples

{
  "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"
    }
  ]
}

Response 200 (ReadKeypairsResponse):

Response Element Type Description
Keypairs [Keypair] Information about one or more keypairs.
KeypairFingerprint string The MD5 public key fingerprint as specified in section 4 of RFC 4716.
KeypairName string The name of the keypair.
KeypairType string The type of the keypair (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).
NextPageToken string (byte) The token to request the next page of results. Each token refers to a specific page.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

Other responses:

  • Response 400 (ErrorResponse): The HTTP 400 response (Bad Request).
  • Response 401 (ErrorResponse): The HTTP 401 response (Unauthorized).
  • Response 500 (ErrorResponse): The HTTP 500 response (Internal Server Error).

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.

Request Parameters

Examples

# 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"]'

# Creating a listener rule based on a host pattern

oapi-cli --profile "default" CreateListenerRule \
  --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

oapi-cli --profile "default" CreateListenerRule \
  --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();

See the outscale_load_balancer_listener_rule resource in the Terraform OUTSCALE provider.

Body (CreateListenerRuleRequest):

Body Parameter 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.

Response Elements

Examples

# 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
  }
}

Response 200 (CreateListenerRuleResponse):

Response Element Type Description
ListenerRule ListenerRule 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 -.?.
ListenerId integer The ID of the listener.
ListenerRuleId integer The ID of the listener rule.
ListenerRuleName string A human-readable name for the listener rule.
PathPattern string A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except _-.$/~"'@:+?.
Priority integer The priority level of the listener rule, between 1 and 19999 both included. Each rule must have a unique priority level. Otherwise, an error is returned.
VmIds [string] The IDs of the backend VMs.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

CreateLoadBalancerListeners

POST /CreateLoadBalancerListeners

Creates one or more listeners for a specified load balancer.

For more information, see About Load Balancers.

Request Parameters

Examples

osc-cli api CreateLoadBalancerListeners --profile "default" \
  --LoadBalancerName "example-lbu" \
  --Listeners '[
      {
        "BackendPort": 58,
        "BackendProtocol": "TCP",
        "LoadBalancerPort": 62,
        "LoadBalancerProtocol": "TCP"
      }
    ]'

oapi-cli --profile "default" CreateLoadBalancerListeners \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (CreateLoadBalancerListenersRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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"
  }
}

Response 200 (CreateLoadBalancerListenersResponse):

Response Element Type Description
LoadBalancer LoadBalancer Information about the load balancer.
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).
ApplicationStickyCookiePolicies [ApplicationStickyCookiePolicy] The stickiness policies defined for the load balancer.
CookieName string The name of the application cookie used for stickiness.
PolicyName string The mnemonic name for the policy being created. The name must be unique within a set of policies for this load balancer.
BackendIps [string] One or more public IPs of backend VMs.
BackendVmIds [string] One or more IDs of backend VMs for the load balancer.
DnsName string The DNS name of the load balancer.
HealthCheck HealthCheck Information about the health check configuration.
CheckInterval integer The number of seconds between two requests (between 5 and 600 both included).
HealthyThreshold integer The number of consecutive successful requests before considering the VM as healthy (between 2 and 10 both included).
Path string If you use the HTTP or HTTPS protocols, the request URL path.
Port integer The port number (between 1 and 65535, both included).
Protocol string The protocol for the URL of the VM (HTTP | HTTPS | TCP | SSL).
Timeout integer The maximum waiting time for a response before considering the VM as unhealthy, in seconds (between 2 and 60 both included).
UnhealthyThreshold integer The number of consecutive failed requests before considering the VM as unhealthy (between 2 and 10 both included).
Listeners [Listener] The listeners for the load balancer.
BackendPort integer The port on which the backend VM is listening (between 1 and 65535, both included).
BackendProtocol string The protocol for routing traffic to backend VMs (HTTP | HTTPS | TCP | SSL).
LoadBalancerPort integer The port on which the load balancer is listening (between 1 and 65535, both included).
LoadBalancerProtocol string The routing protocol (HTTP | HTTPS | TCP | SSL).
PolicyNames [string] The names of the policies. If there are no policies enabled, the list is empty.
ServerCertificateId string The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
LoadBalancerName string The name of the load balancer.
LoadBalancerStickyCookiePolicies [LoadBalancerStickyCookiePolicy] The policies defined for the load balancer.
CookieExpirationPeriod integer The time period, in seconds, after which the cookie should be considered stale.

If 1, the stickiness session lasts for the duration of the browser session.
PolicyName string The name of the stickiness policy.
LoadBalancerType string The type of load balancer. Valid only for load balancers in a Net.

If LoadBalancerType is internet-facing, the load balancer has a public DNS name that resolves to a public IP.

If LoadBalancerType is internal, the load balancer has a public DNS name that resolves to a private IP.
NetId string The ID of the Net for the load balancer.
PublicIp string (internet-facing only) The public IP associated with the load balancer.
SecuredCookies boolean Whether secure cookies are enabled for the load balancer.
SecurityGroups [string] One or more IDs of security groups for the load balancers. Valid only for load balancers in a Net.
SourceSecurityGroup SourceSecurityGroup Information about the source security group of the load balancer, which you can use as part of your inbound rules for your registered VMs.

To only allow traffic from load balancers, add a security group rule that specifies this source security group as the inbound source.
SecurityGroupAccountId string The account ID of the owner of the security group.
SecurityGroupName string The name of the security group.
Subnets [string] The ID of the Subnet in which the load balancer was created.
SubregionNames [string] The ID of the Subregion in which the load balancer was created.
Tags [ResourceTag] One or more tags associated with the load balancer.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

DeleteListenerRule

POST /DeleteListenerRule

Deletes a listener rule.
The previously active rule is disabled after deletion.

Request Parameters

Examples

osc-cli api DeleteListenerRule --profile "default" \
  --ListenerRuleName "example-listener-rule"

oapi-cli --profile "default" DeleteListenerRule \
  --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();

See the outscale_load_balancer_listener_rule resource in the Terraform OUTSCALE provider.

Body (DeleteListenerRuleRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteListenerRuleResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

DeleteLoadBalancerListeners

POST /DeleteLoadBalancerListeners

Deletes listeners of a specified load balancer.

Request Parameters

Examples

osc-cli api DeleteLoadBalancerListeners --profile "default" \
  --LoadBalancerName "example-lbu" \
  --LoadBalancerPorts '[80]'

oapi-cli --profile "default" DeleteLoadBalancerListeners \
  --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();

There is no equivalent for this method in the Terraform OUTSCALE provider.

Body (DeleteLoadBalancerListenersRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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"
  }
}

Response 200 (DeleteLoadBalancerListenersResponse):

Response Element Type Description
LoadBalancer LoadBalancer Information about the load balancer.
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).
ApplicationStickyCookiePolicies [ApplicationStickyCookiePolicy] The stickiness policies defined for the load balancer.
CookieName string The name of the application cookie used for stickiness.
PolicyName string The mnemonic name for the policy being created. The name must be unique within a set of policies for this load balancer.
BackendIps [string] One or more public IPs of backend VMs.
BackendVmIds [string] One or more IDs of backend VMs for the load balancer.
DnsName string The DNS name of the load balancer.
HealthCheck HealthCheck Information about the health check configuration.
CheckInterval integer The number of seconds between two requests (between 5 and 600 both included).
HealthyThreshold integer The number of consecutive successful requests before considering the VM as healthy (between 2 and 10 both included).
Path string If you use the HTTP or HTTPS protocols, the request URL path.
Port integer The port number (between 1 and 65535, both included).
Protocol string The protocol for the URL of the VM (HTTP | HTTPS | TCP | SSL).
Timeout integer The maximum waiting time for a response before considering the VM as unhealthy, in seconds (between 2 and 60 both included).
UnhealthyThreshold integer The number of consecutive failed requests before considering the VM as unhealthy (between 2 and 10 both included).
Listeners [Listener] The listeners for the load balancer.
BackendPort integer The port on which the backend VM is listening (between 1 and 65535, both included).
BackendProtocol string The protocol for routing traffic to backend VMs (HTTP | HTTPS | TCP | SSL).
LoadBalancerPort integer The port on which the load balancer is listening (between 1 and 65535, both included).
LoadBalancerProtocol string The routing protocol (HTTP | HTTPS | TCP | SSL).
PolicyNames [string] The names of the policies. If there are no policies enabled, the list is empty.
ServerCertificateId string The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
LoadBalancerName string The name of the load balancer.
LoadBalancerStickyCookiePolicies [LoadBalancerStickyCookiePolicy] The policies defined for the load balancer.
CookieExpirationPeriod integer The time period, in seconds, after which the cookie should be considered stale.

If 1, the stickiness session lasts for the duration of the browser session.
PolicyName string The name of the stickiness policy.
LoadBalancerType string The type of load balancer. Valid only for load balancers in a Net.

If LoadBalancerType is internet-facing, the load balancer has a public DNS name that resolves to a public IP.

If LoadBalancerType is internal, the load balancer has a public DNS name that resolves to a private IP.
NetId string The ID of the Net for the load balancer.
PublicIp string (internet-facing only) The public IP associated with the load balancer.
SecuredCookies boolean Whether secure cookies are enabled for the load balancer.
SecurityGroups [string] One or more IDs of security groups for the load balancers. Valid only for load balancers in a Net.
SourceSecurityGroup SourceSecurityGroup Information about the source security group of the load balancer, which you can use as part of your inbound rules for your registered VMs.

To only allow traffic from load balancers, add a security group rule that specifies this source security group as the inbound source.
SecurityGroupAccountId string The account ID of the owner of the security group.
SecurityGroupName string The name of the security group.
Subnets [string] The ID of the Subnet in which the load balancer was created.
SubregionNames [string] The ID of the Subregion in which the load balancer was created.
Tags [ResourceTag] One or more tags associated with the load balancer.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

ReadListenerRules

POST /ReadListenerRules

Lists one or more listener rules. By default, this action returns the full list of listener rules for the account.

Request Parameters

Examples

osc-cli api ReadListenerRules --profile "default" \
  --Filters '{
      "ListenerRuleNames": ["example-listener-rule"]
    }'

oapi-cli --profile "default" ReadListenerRules \
  --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();

See the outscale_load_balancer_listener_rule or outscale_load_balancer_listener_rules data sources in the Terraform OUTSCALE provider.

Body (ReadListenerRulesRequest):

Body Parameter 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.

Response Elements

Examples

{
  "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
    }
  ]
}

Response 200 (ReadListenerRulesResponse):

Response Element Type Description
ListenerRules [ListenerRule] The list of the rules to describe.
Action string The type of action for the rule (always forward).
HostNamePattern string A host-name pattern for the rule, with a maximum length of 128 characters. This host-name pattern supports maximum three wildcards, and must not contain any special characters except -.?.
ListenerId integer The ID of the listener.
ListenerRuleId integer The ID of the listener rule.
ListenerRuleName string A human-readable name for the listener rule.
PathPattern string A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except _-.$/~"'@:+?.
Priority integer The priority level of the listener rule, between 1 and 19999 both included. Each rule must have a unique priority level. Otherwise, an error is returned.
VmIds [string] The IDs of the backend VMs.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

UpdateListenerRule

POST /UpdateListenerRule

Updates the pattern of the listener rule.
This call updates the pattern matching algorithm for incoming traffic.

Request Parameters

Examples

osc-cli api UpdateListenerRule --profile "default" \
  --ListenerRuleName "example-listener-rule" \
  --HostPattern "*.newhost.com"

oapi-cli --profile "default" UpdateListenerRule \
  --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();

See the outscale_load_balancer_listener_rule resource in the Terraform OUTSCALE provider.

Body (UpdateListenerRuleRequest):

Body Parameter Type Description
DryRun boolean If true, checks whether you have the required permissions to perform the action.
HostPattern string or null 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 or null 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 _-.$/~"'@:+?.

Response Elements

Examples

{
  "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
  }
}

Response 200 (UpdateListenerRuleResponse):

Response Element Type Description
ListenerRule ListenerRule 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 -.?.
ListenerId integer The ID of the listener.
ListenerRuleId integer The ID of the listener rule.
ListenerRuleName string A human-readable name for the listener rule.
PathPattern string A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except _-.$/~"'@:+?.
Priority integer The priority level of the listener rule, between 1 and 19999 both included. Each rule must have a unique priority level. Otherwise, an error is returned.
VmIds [string] The IDs of the backend VMs.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

# 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"
      }
    ]'

# Creating an internal load balancer in a Net

oapi-cli --profile "default" CreateLoadBalancer \
  --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

oapi-cli --profile "default" 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"
# Creating an internet-facing load balancer in the public Cloud

oapi-cli --profile "default" CreateLoadBalancer \
  --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();

See the outscale_load_balancer resource in the Terraform OUTSCALE provider.

Body (CreateLoadBalancerRequest):

Body Parameter 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, with a maximum length of 32 alphanumeric characters and dashes (-). This name must not start or end with a dash.
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.

Response Elements

Examples

# 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"
  }
}

Response 200 (CreateLoadBalancerResponse):

Response Element Type Description
LoadBalancer LoadBalancer Information about the load balancer.
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).
ApplicationStickyCookiePolicies [ApplicationStickyCookiePolicy] The stickiness policies defined for the load balancer.
CookieName string The name of the application cookie used for stickiness.
PolicyName string The mnemonic name for the policy being created. The name must be unique within a set of policies for this load balancer.
BackendIps [string] One or more public IPs of backend VMs.
BackendVmIds [string] One or more IDs of backend VMs for the load balancer.
DnsName string The DNS name of the load balancer.
HealthCheck HealthCheck Information about the health check configuration.
CheckInterval integer The number of seconds between two requests (between 5 and 600 both included).
HealthyThreshold integer The number of consecutive successful requests before considering the VM as healthy (between 2 and 10 both included).
Path string If you use the HTTP or HTTPS protocols, the request URL path.
Port integer The port number (between 1 and 65535, both included).
Protocol string The protocol for the URL of the VM (HTTP | HTTPS | TCP | SSL).
Timeout integer The maximum waiting time for a response before considering the VM as unhealthy, in seconds (between 2 and 60 both included).
UnhealthyThreshold integer The number of consecutive failed requests before considering the VM as unhealthy (between 2 and 10 both included).
Listeners [Listener] The listeners for the load balancer.
BackendPort integer The port on which the backend VM is listening (between 1 and 65535, both included).
BackendProtocol string The protocol for routing traffic to backend VMs (HTTP | HTTPS | TCP | SSL).
LoadBalancerPort integer The port on which the load balancer is listening (between 1 and 65535, both included).
LoadBalancerProtocol string The routing protocol (HTTP | HTTPS | TCP | SSL).
PolicyNames [string] The names of the policies. If there are no policies enabled, the list is empty.
ServerCertificateId string The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
LoadBalancerName string The name of the load balancer.
LoadBalancerStickyCookiePolicies [LoadBalancerStickyCookiePolicy] The policies defined for the load balancer.
CookieExpirationPeriod integer The time period, in seconds, after which the cookie should be considered stale.

If 1, the stickiness session lasts for the duration of the browser session.
PolicyName string The name of the stickiness policy.
LoadBalancerType string The type of load balancer. Valid only for load balancers in a Net.

If LoadBalancerType is internet-facing, the load balancer has a public DNS name that resolves to a public IP.

If LoadBalancerType is internal, the load balancer has a public DNS name that resolves to a private IP.
NetId string The ID of the Net for the load balancer.
PublicIp string (internet-facing only) The public IP associated with the load balancer.
SecuredCookies boolean Whether secure cookies are enabled for the load balancer.
SecurityGroups [string] One or more IDs of security groups for the load balancers. Valid only for load balancers in a Net.
SourceSecurityGroup SourceSecurityGroup Information about the source security group of the load balancer, which you can use as part of your inbound rules for your registered VMs.

To only allow traffic from load balancers, add a security group rule that specifies this source security group as the inbound source.
SecurityGroupAccountId string The account ID of the owner of the security group.
SecurityGroupName string The name of the security group.
Subnets [string] The ID of the Subnet in which the load balancer was created.
SubregionNames [string] The ID of the Subregion in which the load balancer was created.
Tags [ResourceTag] One or more tags associated with the load balancer.
Key string The key of the tag, with a minimum of 1 character.
Value string The value of the tag, between 0 and 255 characters.
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

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.

Request Parameters

Examples

osc-cli api CreateLoadBalancerTags --profile "default" \
  --LoadBalancerNames '["private-lb-example"]' \
  --Tags '[
      {
        "Key": "key1",
        "Value": "value1"
      }
    ]'

oapi-cli --profile "default" CreateLoadBalancerTags \
  --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();

See the outscale_load_balancer resource in the Terraform OUTSCALE provider.

Body (CreateLoadBalancerTagsRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (CreateLoadBalancerTagsResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

DeleteLoadBalancer

POST /DeleteLoadBalancer

Deletes a specified load balancer.

Request Parameters

Examples

osc-cli api DeleteLoadBalancer --profile "default" \
  --LoadBalancerName "example-lbu"

oapi-cli --profile "default" DeleteLoadBalancer \
  --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();

See the outscale_load_balancer resource in the Terraform OUTSCALE provider.

Body (DeleteLoadBalancerRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeleteLoadBalancerResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

DeleteLoadBalancerTags

POST /DeleteLoadBalancerTags

Deletes one or more tags from the specified load balancers.

Request Parameters

Examples

osc-cli api DeleteLoadBalancerTags --profile "default" \
  --LoadBalancerNames '["example-lbu"]' \
  --Tags '[
      {
        "Key": "key1"
      }
    ]'

oapi-cli --profile "default" DeleteLoadBalancerTags \
  --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();

See the outscale_load_balancer resource in the Terraform OUTSCALE provider.

Body (DeleteLoadBalancerTagsRequest):

Body Parameter 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 (required) string The key of the tag, with a minimum of 1 character.

Response Elements

Examples

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

Response 200 (DeleteLoadBalancerTagsResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

DeregisterVmsInLoadBalancer

POST /DeregisterVmsInLoadBalancer

Deregisters a specified virtual machine (VM) from a load balancer.

Request Parameters

Examples

osc-cli api DeregisterVmsInLoadBalancer --profile "default" \
  --LoadBalancerName "example-lbu" \
  --BackendVmIds '["i-12345678", "i-87654321"]'

oapi-cli --profile "default" DeregisterVmsInLoadBalancer \
  --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();

See the outscale_load_balancer_vms resource in the Terraform OUTSCALE provider.

Body (DeregisterVmsInLoadBalancerRequest):

Body Parameter 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.

Response Elements

Examples

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

Response 200 (DeregisterVmsInLoadBalancerResponse):

Response Element Type Description
ResponseContext ResponseContext Information about the context of the response.
RequestId string The ID of the request.

LinkLoadBalancerBackendMachines

POST /LinkLoa