NAV Navigation
OSC CLI Shell Python

3DS OUTSCALE API v1.26

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.

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

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

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

Base URLs:

Terms of service Email: Support License: BSD 3 Clause

Authentication

AccessKey

CreateAccessKey

POST /CreateAccessKey

Creates an access key for your account. The new key is automatically set to ACTIVE.

Code samples

osc-cli api CreateAccessKey --profile "default" \
  --DryRun False \
  --ExpirationDate "2019-08-24T14:15:22Z"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "ExpirationDate": "2019-08-24T14:15:22Z"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateAccessKey(
    ExpirationDate="2019-08-24T14:15:22Z",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
ExpirationDate string (date-time or date) false 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.

Responses

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

Example responses

200 Response

{
  "AccessKey": {
    "AccessKeyId": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "ExpirationDate": "2019-08-24T14:15:22Z",
    "LastModificationDate": "2019-08-24T14:15:22Z",
    "SecretKey": "string",
    "State": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteAccessKey

POST /DeleteAccessKey

Deletes the specified access key of your account.

[NOTE]
To protect against brute force attacks, the number of requests allowed for this method in a given time period is limited.

Code samples

osc-cli api DeleteAccessKey --profile "default" \
  --AccessKeyId "string" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteAccessKey(
    AccessKeyId="string",
)
print(result)

Parameters

Parameter Type Required Description
AccessKeyId string true The ID of the access key you want to delete.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadAccessKeys

POST /ReadAccessKeys

Lists the access key IDs of your account.

Code samples

osc-cli api ReadAccessKeys --profile "default" \
  --DryRun False \
  --Filters '{ \
      "AccessKeyIds": ["string"], \
      "States": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "AccessKeyIds": ["string"],
      "States": ["string"]
    }
  }'

from osc_sdk_python import Gateway

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

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersAccessKeys false One or more filters.
» AccessKeyIds [string] false The IDs of the access keys.
» States [string] false The states of the access keys (ACTIVE | INACTIVE).

Responses

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

Example responses

200 Response

{
  "AccessKeys": [
    {
      "AccessKeyId": "string",
      "CreationDate": "2019-08-24T14:15:22Z",
      "ExpirationDate": "2019-08-24T14:15:22Z",
      "LastModificationDate": "2019-08-24T14:15:22Z",
      "State": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadSecretAccessKey

POST /ReadSecretAccessKey

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

Code samples

osc-cli api ReadSecretAccessKey --profile "default" \
  --AccessKeyId "string" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadSecretAccessKey(
    AccessKeyId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "AccessKey": {
    "AccessKeyId": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "ExpirationDate": "2019-08-24T14:15:22Z",
    "LastModificationDate": "2019-08-24T14:15:22Z",
    "SecretKey": "string",
    "State": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateAccessKey

POST /UpdateAccessKey

Modifies the attributes of the specified access key of your account.

[NOTE]
To protect against brute force attacks, the number of requests allowed for this method in a given time period is limited.

Code samples

osc-cli api UpdateAccessKey --profile "default" \
  --AccessKeyId "string" \
  --DryRun False \
  --ExpirationDate "2019-08-24T14:15:22Z" \
  --State "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DryRun": false,
    "ExpirationDate": "2019-08-24T14:15:22Z",
    "State": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateAccessKey(
    AccessKeyId="string",
    ExpirationDate="2019-08-24T14:15:22Z",
    State="string",
)
print(result)

Parameters

Parameter Type Required Description
AccessKeyId string true The ID of the access key.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
ExpirationDate string (date-time or date) false 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 string true 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.

Responses

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

Example responses

200 Response

{
  "AccessKey": {
    "AccessKeyId": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "ExpirationDate": "2019-08-24T14:15:22Z",
    "LastModificationDate": "2019-08-24T14:15:22Z",
    "State": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

Account

CheckAuthentication

POST /CheckAuthentication

Validates the authenticity of the account.

Code samples

osc-cli api CheckAuthentication --profile "default" \
  --DryRun False \
  --Login "string" \
  --Password "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Login": "string",
    "Password": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CheckAuthentication(
    Login="string",
    Password="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateAccount

POST /CreateAccount

Creates an OUTSCALE account.

[NOTE]

Code samples

osc-cli api CreateAccount --profile "default" \
  --AdditionalEmails '["string"]' \
  --City "string" \
  --CompanyName "string" \
  --Country "string" \
  --CustomerId "string" \
  --DryRun False \
  --Email "string" \
  --FirstName "string" \
  --JobTitle "string" \
  --LastName "string" \
  --MobileNumber "string" \
  --PhoneNumber "string" \
  --StateProvince "string" \
  --VatNumber "string" \
  --ZipCode "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "AdditionalEmails": ["string"],
    "City": "string",
    "CompanyName": "string",
    "Country": "string",
    "CustomerId": "string",
    "DryRun": false,
    "Email": "string",
    "FirstName": "string",
    "JobTitle": "string",
    "LastName": "string",
    "MobileNumber": "string",
    "PhoneNumber": "string",
    "StateProvince": "string",
    "VatNumber": "string",
    "ZipCode": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateAccount(
    AdditionalEmails=["string"],
    City="string",
    CompanyName="string",
    Country="string",
    CustomerId="string",
    Email="string",
    FirstName="string",
    JobTitle="string",
    LastName="string",
    MobileNumber="string",
    PhoneNumber="string",
    StateProvince="string",
    VatNumber="string",
    ZipCode="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "Account": {
    "AccountId": "string",
    "AdditionalEmails": [
      "string"
    ],
    "City": "string",
    "CompanyName": "string",
    "Country": "string",
    "CustomerId": "string",
    "Email": "string",
    "FirstName": "string",
    "JobTitle": "string",
    "LastName": "string",
    "MobileNumber": "string",
    "PhoneNumber": "string",
    "StateProvince": "string",
    "VatNumber": "string",
    "ZipCode": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadAccounts

POST /ReadAccounts

Gets information about the account that sent the request.

Code samples

osc-cli api ReadAccounts --profile "default" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadAccounts()
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "Accounts": [
    {
      "AccountId": "string",
      "AdditionalEmails": [
        "string"
      ],
      "City": "string",
      "CompanyName": "string",
      "Country": "string",
      "CustomerId": "string",
      "Email": "string",
      "FirstName": "string",
      "JobTitle": "string",
      "LastName": "string",
      "MobileNumber": "string",
      "PhoneNumber": "string",
      "StateProvince": "string",
      "VatNumber": "string",
      "ZipCode": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadConsumptionAccount

POST /ReadConsumptionAccount

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

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the Throttling error message is returned.

Code samples

osc-cli api ReadConsumptionAccount --profile "default" \
  --DryRun False \
  --FromDate "2019-08-24" \
  --Overall False \
  --ToDate "2019-08-24"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "FromDate": "2019-08-24",
    "Overall": false,
    "ToDate": "2019-08-24"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadConsumptionAccount(
    FromDate="2019-08-24",
    Overall=False,
    ToDate="2019-08-24",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
FromDate string (date or date-time) true 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).
Overall boolean false 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).
ToDate string (date or date-time) true 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).

Responses

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

Example responses

200 Response

{
  "ConsumptionEntries": [
    {
      "AccountId": "string",
      "Category": "string",
      "FromDate": "2019-08-24T14:15:22Z",
      "Operation": "string",
      "PayingAccountId": "string",
      "Service": "string",
      "SubregionName": "string",
      "Title": "string",
      "ToDate": "2019-08-24T14:15:22Z",
      "Type": "string",
      "Value": 0
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ResetAccountPassword

POST /ResetAccountPassword

Replaces the account password with the new one you provide.
You must also provide the token you received by email when asking for a password reset using the SendResetPasswordEmail method.

Password strength is tested through heuristic algorithms. For more information, see the zxcvbn GitHub.

[NOTE]
To protect against brute force attacks, the number of requests allowed for this method in a given time period is limited.

Code samples

osc-cli api ResetAccountPassword --profile "default" \
  --DryRun False \
  --Password "string" \
  --Token "string"

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ResetAccountPassword \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Password": "string",
    "Token": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ResetAccountPassword(
    Password="string",
    Token="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Password string true The new password for the account.
Token string true The token you received at the email address provided for the account.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ResetAccountPasswordResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

SendResetPasswordEmail

POST /SendResetPasswordEmail

Sends an email to the email address provided for the account with a token to reset your password.
You need to provide this token when updating the account password using the ResetAccountPassword method.

[NOTE]
To protect against brute force attacks, the number of requests allowed for this method in a given time period is limited.

Code samples

osc-cli api SendResetPasswordEmail --profile "default" \
  --DryRun False \
  --Email "string"

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/SendResetPasswordEmail \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Email": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.SendResetPasswordEmail(
    Email="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Email string true The email address provided for the account.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). SendResetPasswordEmailResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateAccount

POST /UpdateAccount

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

Code samples

osc-cli api UpdateAccount --profile "default" \
  --AdditionalEmails '["string"]' \
  --City "string" \
  --CompanyName "string" \
  --Country "string" \
  --DryRun False \
  --Email "string" \
  --FirstName "string" \
  --JobTitle "string" \
  --LastName "string" \
  --MobileNumber "string" \
  --PhoneNumber "string" \
  --StateProvince "string" \
  --VatNumber "string" \
  --ZipCode "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": ["string"],
    "City": "string",
    "CompanyName": "string",
    "Country": "string",
    "DryRun": false,
    "Email": "string",
    "FirstName": "string",
    "JobTitle": "string",
    "LastName": "string",
    "MobileNumber": "string",
    "PhoneNumber": "string",
    "StateProvince": "string",
    "VatNumber": "string",
    "ZipCode": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateAccount(
    AdditionalEmails=["string"],
    City="string",
    CompanyName="string",
    Country="string",
    Email="string",
    FirstName="string",
    JobTitle="string",
    LastName="string",
    MobileNumber="string",
    PhoneNumber="string",
    StateProvince="string",
    VatNumber="string",
    ZipCode="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "Account": {
    "AccountId": "string",
    "AdditionalEmails": [
      "string"
    ],
    "City": "string",
    "CompanyName": "string",
    "Country": "string",
    "CustomerId": "string",
    "Email": "string",
    "FirstName": "string",
    "JobTitle": "string",
    "LastName": "string",
    "MobileNumber": "string",
    "PhoneNumber": "string",
    "StateProvince": "string",
    "VatNumber": "string",
    "ZipCode": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ApiAccessPolicy

ReadApiAccessPolicy

POST /ReadApiAccessPolicy

Gets information about the API access policy of your account.

Code samples

osc-cli api ReadApiAccessPolicy --profile "default" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadApiAccessPolicy()
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ApiAccessPolicy": {
    "MaxAccessKeyExpirationSeconds": 0,
    "RequireTrustedEnv": true
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateApiAccessPolicy

POST /UpdateApiAccessPolicy

Updates the API access policy of your account.

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

Code samples

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

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "MaxAccessKeyExpirationSeconds": 0,
    "RequireTrustedEnv": true
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateApiAccessPolicy(
    MaxAccessKeyExpirationSeconds=0,
    RequireTrustedEnv=True,
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
MaxAccessKeyExpirationSeconds integer (int64) true 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 boolean true If true, a trusted session is activated, provided that you specify the MaxAccessKeyExpirationSeconds parameter with a value greater than 0.

Responses

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

Example responses

200 Response

{
  "ApiAccessPolicy": {
    "MaxAccessKeyExpirationSeconds": 0,
    "RequireTrustedEnv": true
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ApiAccessRule

CreateApiAccessRule

POST /CreateApiAccessRule

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

[NOTE]
By default, your account has a set of rules allowing global access that you can delete. For more information, see About API Access Rules.

Code samples

osc-cli api CreateApiAccessRule --profile "default" \
  --CaIds '["string"]' \
  --Cns '["string"]' \
  --Description "string" \
  --DryRun False \
  --IpRanges '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "CaIds": ["string"],
    "Cns": ["string"],
    "Description": "string",
    "DryRun": false,
    "IpRanges": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateApiAccessRule(
    CaIds=["string"],
    Cns=["string"],
    Description="string",
    IpRanges=["string"],
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ApiAccessRule": {
    "ApiAccessRuleId": "string",
    "CaIds": [
      "string"
    ],
    "Cns": [
      "string"
    ],
    "Description": "string",
    "IpRanges": [
      "string"
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteApiAccessRule

POST /DeleteApiAccessRule

Deletes a specified API access rule.

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

Code samples

osc-cli api DeleteApiAccessRule --profile "default" \
  --ApiAccessRuleId "string" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteApiAccessRule(
    ApiAccessRuleId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadApiAccessRules

POST /ReadApiAccessRules

Lists one or more API access rules.

Code samples

osc-cli api ReadApiAccessRules --profile "default" \
  --DryRun False \
  --Filters '{ \
      "ApiAccessRuleIds": ["string"], \
      "CaIds": ["string"], \
      "Cns": ["string"], \
      "Descriptions": ["string"], \
      "IpRanges": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "ApiAccessRuleIds": ["string"],
      "CaIds": ["string"],
      "Cns": ["string"],
      "Descriptions": ["string"],
      "IpRanges": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadApiAccessRules(
    Filters={ 
        "ApiAccessRuleIds": ["string"], 
        "CaIds": ["string"], 
        "Cns": ["string"], 
        "Descriptions": ["string"], 
        "IpRanges": ["string"] 
    },
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ApiAccessRules": [
    {
      "ApiAccessRuleId": "string",
      "CaIds": [
        "string"
      ],
      "Cns": [
        "string"
      ],
      "Description": "string",
      "IpRanges": [
        "string"
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateApiAccessRule

POST /UpdateApiAccessRule

Modifies a specified API access rule.

[NOTE]

Code samples

osc-cli api UpdateApiAccessRule --profile "default" \
  --ApiAccessRuleId "string" \
  --CaIds '["string"]' \
  --Cns '["string"]' \
  --Description "string" \
  --DryRun False \
  --IpRanges '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "CaIds": ["string"],
    "Cns": ["string"],
    "Description": "string",
    "DryRun": false,
    "IpRanges": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateApiAccessRule(
    ApiAccessRuleId="string",
    CaIds=["string"],
    Cns=["string"],
    Description="string",
    IpRanges=["string"],
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ApiAccessRule": {
    "ApiAccessRuleId": "string",
    "CaIds": [
      "string"
    ],
    "Cns": [
      "string"
    ],
    "Description": "string",
    "IpRanges": [
      "string"
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ApiLog

ReadApiLogs

POST /ReadApiLogs

Lists the logs of the API calls you have performed with this account. For more information, see About OUTSCALE Monitoring Services (OMS).

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

Code samples

osc-cli api ReadApiLogs --profile "default" \
  --DryRun False \
  --Filters '{ \
      "QueryAccessKeys": ["string"], \
      "QueryApiNames": ["string"], \
      "QueryCallNames": ["string"], \
      "QueryDateAfter": "2019-08-24T14:15:22Z", \
      "QueryDateBefore": "2019-08-24T14:15:22Z", \
      "QueryIpAddresses": ["string"], \
      "QueryUserAgents": ["string"], \
      "RequestIds": ["string"], \
      "ResponseStatusCodes": [0] \
    }' \
  --NextPageToken "string" \
  --ResultsPerPage 100 \
  --With '{ \
      "AccountId": True, \
      "CallDuration": True, \
      "QueryAccessKey": True, \
      "QueryApiName": True, \
      "QueryApiVersion": True, \
      "QueryCallName": True, \
      "QueryDate": True, \
      "QueryHeaderRaw": True, \
      "QueryHeaderSize": True, \
      "QueryIpAddress": True, \
      "QueryPayloadRaw": True, \
      "QueryPayloadSize": True, \
      "QueryUserAgent": True, \
      "RequestId": True, \
      "ResponseSize": True, \
      "ResponseStatusCode": True \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "QueryAccessKeys": ["string"],
      "QueryApiNames": ["string"],
      "QueryCallNames": ["string"],
      "QueryDateAfter": "2019-08-24T14:15:22Z",
      "QueryDateBefore": "2019-08-24T14:15:22Z",
      "QueryIpAddresses": ["string"],
      "QueryUserAgents": ["string"],
      "RequestIds": ["string"],
      "ResponseStatusCodes": [0]
    },
    "NextPageToken": "string",
    "ResultsPerPage": 100,
    "With": {
      "AccountId": true,
      "CallDuration": true,
      "QueryAccessKey": true,
      "QueryApiName": true,
      "QueryApiVersion": true,
      "QueryCallName": true,
      "QueryDate": true,
      "QueryHeaderRaw": true,
      "QueryHeaderSize": true,
      "QueryIpAddress": true,
      "QueryPayloadRaw": true,
      "QueryPayloadSize": true,
      "QueryUserAgent": true,
      "RequestId": true,
      "ResponseSize": true,
      "ResponseStatusCode": true
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadApiLogs(
    Filters={ 
        "QueryAccessKeys": ["string"], 
        "QueryApiNames": ["string"], 
        "QueryCallNames": ["string"], 
        "QueryDateAfter": "2019-08-24T14:15:22Z", 
        "QueryDateBefore": "2019-08-24T14:15:22Z", 
        "QueryIpAddresses": ["string"], 
        "QueryUserAgents": ["string"], 
        "RequestIds": ["string"], 
        "ResponseStatusCodes": [0] 
    },
    NextPageToken="string",
    ResultsPerPage=100,
    With={ 
        "AccountId": True, 
        "CallDuration": True, 
        "QueryAccessKey": True, 
        "QueryApiName": True, 
        "QueryApiVersion": True, 
        "QueryCallName": True, 
        "QueryDate": True, 
        "QueryHeaderRaw": True, 
        "QueryHeaderSize": True, 
        "QueryIpAddress": True, 
        "QueryPayloadRaw": True, 
        "QueryPayloadSize": True, 
        "QueryUserAgent": True, 
        "RequestId": True, 
        "ResponseSize": True, 
        "ResponseStatusCode": True 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersApiLog false One or more filters.
» QueryAccessKeys [string] false The access keys used for the logged calls.
» QueryApiNames [string] false The names of the APIs of the logged calls (always oapi for the OUTSCALE API).
» QueryCallNames [string] false The names of the logged calls.
» QueryDateAfter string (date-time or date) false 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) false 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] false The IPs used for the logged calls.
» QueryUserAgents [string] false The user agents of the HTTP requests of the logged calls.
» RequestIds [string] false The request IDs provided in the responses of the logged calls.
» ResponseStatusCodes [integer] false The HTTP status codes of the logged calls.
NextPageToken string false The token to request the next page of results. Each token refers to a specific page.
ResultsPerPage integer false The maximum number of logs returned in a single response (between 1and 1000, both included). By default, 100.
With With false The information to display in each returned log.
» AccountId boolean false By default or if set to true, the account ID is displayed.
» CallDuration boolean false By default or if set to true, the duration of the call is displayed.
» QueryAccessKey boolean false By default or if set to true, the access key is displayed.
» QueryApiName boolean false By default or if set to true, the name of the API is displayed.
» QueryApiVersion boolean false By default or if set to true, the version of the API is displayed.
» QueryCallName boolean false By default or if set to true, the name of the call is displayed.
» QueryDate boolean false By default or if set to true, the date of the call is displayed.
» QueryHeaderRaw boolean false By default or if set to true, the raw header of the HTTP request is displayed.
» QueryHeaderSize boolean false By default or if set to true, the size of the raw header of the HTTP request is displayed.
» QueryIpAddress boolean false By default or if set to true, the IP is displayed.
» QueryPayloadRaw boolean false By default or if set to true, the raw payload of the HTTP request is displayed.
» QueryPayloadSize boolean false By default or if set to true, the size of the raw payload of the HTTP request is displayed.
» QueryUserAgent boolean false By default or if set to true, the user agent of the HTTP request is displayed.
» RequestId boolean false By default or if set to true, the request ID is displayed.
» ResponseSize boolean false By default or if set to true, the size of the response is displayed.
» ResponseStatusCode boolean false By default or if set to true, the HTTP status code of the response is displayed.

Responses

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

Example responses

200 Response

{
  "Logs": [
    {
      "AccountId": "string",
      "CallDuration": 0,
      "QueryAccessKey": "string",
      "QueryApiName": "string",
      "QueryApiVersion": "string",
      "QueryCallName": "string",
      "QueryDate": "2019-08-24T14:15:22Z",
      "QueryHeaderRaw": "string",
      "QueryHeaderSize": 0,
      "QueryIpAddress": "string",
      "QueryPayloadRaw": "string",
      "QueryPayloadSize": 0,
      "QueryUserAgent": "string",
      "RequestId": "string",
      "ResponseSize": 0,
      "ResponseStatusCode": 0
    }
  ],
  "NextPageToken": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

Ca

CreateCa

POST /CreateCa

Creates a Client Certificate Authority (CA).

Code samples

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

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "Description": "string",
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateCa(
    CaPem="string",
    Description="string",
)
print(result)

Parameters

Parameter Type Required Description
CaPem string true 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 false The description of the CA.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.

Responses

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

Example responses

200 Response

{
  "Ca": {
    "CaFingerprint": "string",
    "CaId": "string",
    "Description": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteCa

POST /DeleteCa

Deletes a specified Client Certificate Authority (CA).

Code samples

osc-cli api DeleteCa --profile "default" \
  --CaId "string" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteCa(
    CaId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadCas

POST /ReadCas

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

Code samples

osc-cli api ReadCas --profile "default" \
  --DryRun False \
  --Filters '{ \
      "CaFingerprints": ["string"], \
      "CaIds": ["string"], \
      "Descriptions": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "CaFingerprints": ["string"],
      "CaIds": ["string"],
      "Descriptions": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadCas(
    Filters={ 
        "CaFingerprints": ["string"], 
        "CaIds": ["string"], 
        "Descriptions": ["string"] 
    },
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "Cas": [
    {
      "CaFingerprint": "string",
      "CaId": "string",
      "Description": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateCa

POST /UpdateCa

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

Code samples

osc-cli api UpdateCa --profile "default" \
  --CaId "string" \
  --Description "string" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "Description": "string",
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateCa(
    CaId="string",
    Description="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "Ca": {
    "CaFingerprint": "string",
    "CaId": "string",
    "Description": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

Catalog

ReadCatalog

POST /ReadCatalog

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

Code samples

osc-cli api ReadCatalog --profile "default" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadCatalog()
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "Catalog": {
    "Entries": [
      {
        "Category": "string",
        "Flags": "string",
        "Operation": "string",
        "Service": "string",
        "SubregionName": "string",
        "Title": "string",
        "Type": "string",
        "UnitPrice": 0
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadCatalogs

POST /ReadCatalogs

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

Code samples

osc-cli api ReadCatalogs --profile "default" \
  --DryRun False \
  --Filters '{ \
      "CurrentCatalogOnly": True, \
      "FromDate": "2019-08-24", \
      "ToDate": "2019-08-24" \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "CurrentCatalogOnly": true,
      "FromDate": "2019-08-24",
      "ToDate": "2019-08-24"
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadCatalogs(
    Filters={ 
        "CurrentCatalogOnly": True, 
        "FromDate": "2019-08-24", 
        "ToDate": "2019-08-24" 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersCatalogs false One or more filters.
» CurrentCatalogOnly boolean false By default or if set to true, only returns the current catalog. If false, returns the current catalog and past catalogs.
» FromDate string (date) false 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) false The end of the time period, in ISO 8601 date format (for example, 2020-06-30). You must specify the parameters FromDate and ToDate together.

Responses

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

Example responses

200 Response

{
  "Catalogs": [
    {
      "Entries": [
        {
          "Category": "string",
          "Flags": "string",
          "Operation": "string",
          "Service": "string",
          "SubregionName": "string",
          "Title": "string",
          "Type": "string",
          "UnitPrice": 0
        }
      ],
      "FromDate": "2019-08-24T14:15:22Z",
      "State": "CURRENT",
      "ToDate": "2019-08-24T14:15:22Z"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

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

Code samples

osc-cli api CreateClientGateway --profile "default" \
  --BgpAsn 0 \
  --ConnectionType "string" \
  --DryRun False \
  --PublicIp "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "BgpAsn": 0,
    "ConnectionType": "string",
    "DryRun": false,
    "PublicIp": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateClientGateway(
    BgpAsn=0,
    ConnectionType="string",
    PublicIp="string",
)
print(result)

Parameters

Parameter Type Required Description
BgpAsn integer true 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.
ConnectionType string true The communication protocol used to establish tunnel with your client gateway (only ipsec.1 is supported).
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
PublicIp string true The public fixed IPv4 address of your client gateway.

Responses

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

Example responses

200 Response

{
  "ClientGateway": {
    "BgpAsn": 0,
    "ClientGatewayId": "string",
    "ConnectionType": "string",
    "PublicIp": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteClientGateway

POST /DeleteClientGateway

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

Code samples

osc-cli api DeleteClientGateway --profile "default" \
  --ClientGatewayId "string" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteClientGateway(
    ClientGatewayId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadClientGateways

POST /ReadClientGateways

Lists one or more of your client gateways.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadClientGateways --profile "default" \
  --DryRun False \
  --Filters '{ \
      "BgpAsns": [0], \
      "ClientGatewayIds": ["string"], \
      "ConnectionTypes": ["string"], \
      "PublicIps": ["string"], \
      "States": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "BgpAsns": [0],
      "ClientGatewayIds": ["string"],
      "ConnectionTypes": ["string"],
      "PublicIps": ["string"],
      "States": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadClientGateways(
    Filters={ 
        "BgpAsns": [0], 
        "ClientGatewayIds": ["string"], 
        "ConnectionTypes": ["string"], 
        "PublicIps": ["string"], 
        "States": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ClientGateways": [
    {
      "BgpAsn": 0,
      "ClientGatewayId": "string",
      "ConnectionType": "string",
      "PublicIp": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

DhcpOption

CreateDhcpOptions

POST /CreateDhcpOptions

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

Code samples

osc-cli api CreateDhcpOptions --profile "default" \
  --DomainName "string" \
  --DomainNameServers '["string"]' \
  --DryRun False \
  --LogServers '["string"]' \
  --NtpServers '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DomainNameServers": ["string"],
    "DryRun": false,
    "LogServers": ["string"],
    "NtpServers": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateDhcpOptions(
    DomainName="string",
    DomainNameServers=["string"],
    LogServers=["string"],
    NtpServers=["string"],
)
print(result)

Parameters

Parameter Type Required Description
DomainName string false 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] false 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 false If true, checks whether you have the required permissions to perform the action.
LogServers [string] false The IPs of the log servers. You must specify at least one of the following parameters: DomainName, DomainNameServers, LogServers, or NtpServers.
NtpServers [string] false The IPs of the Network Time Protocol (NTP) servers. You must specify at least one of the following parameters: DomainName, DomainNameServers, LogServers, or NtpServers.

Responses

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

Example responses

200 Response

{
  "DhcpOptionsSet": {
    "Default": true,
    "DhcpOptionsSetId": "string",
    "DomainName": "string",
    "DomainNameServers": [
      "string"
    ],
    "LogServers": [
      "string"
    ],
    "NtpServers": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

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.

[NOTE]
You cannot delete the default set.

Code samples

osc-cli api DeleteDhcpOptions --profile "default" \
  --DhcpOptionsSetId "string" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteDhcpOptions(
    DhcpOptionsSetId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadDhcpOptions

POST /ReadDhcpOptions

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

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadDhcpOptions --profile "default" \
  --DryRun False \
  --Filters '{ \
      "Default": True, \
      "DhcpOptionsSetIds": ["string"], \
      "DomainNameServers": ["string"], \
      "DomainNames": ["string"], \
      "LogServers": ["string"], \
      "NtpServers": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "Default": true,
      "DhcpOptionsSetIds": ["string"],
      "DomainNameServers": ["string"],
      "DomainNames": ["string"],
      "LogServers": ["string"],
      "NtpServers": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadDhcpOptions(
    Filters={ 
        "Default": True, 
        "DhcpOptionsSetIds": ["string"], 
        "DomainNameServers": ["string"], 
        "DomainNames": ["string"], 
        "LogServers": ["string"], 
        "NtpServers": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersDhcpOptions false One or more filters.
» Default boolean false If true, lists all default DHCP options set. If false, lists all non-default DHCP options set.
» DhcpOptionsSetIds [string] false The IDs of the DHCP options sets.
» DomainNameServers [string] false The IPs of the domain name servers used for the DHCP options sets.
» DomainNames [string] false The domain names used for the DHCP options sets.
» LogServers [string] false The IPs of the log servers used for the DHCP options sets.
» NtpServers [string] false The IPs of the Network Time Protocol (NTP) servers used for the DHCP options sets.
» TagKeys [string] false The keys of the tags associated with the DHCP options sets.
» TagValues [string] false The values of the tags associated with the DHCP options sets.
» Tags [string] false The key/value combination of the tags associated with the DHCP options sets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

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

Example responses

200 Response

{
  "DhcpOptionsSets": [
    {
      "Default": true,
      "DhcpOptionsSetId": "string",
      "DomainName": "string",
      "DomainNameServers": [
        "string"
      ],
      "LogServers": [
        "string"
      ],
      "NtpServers": [
        "string"
      ],
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

DirectLink

POST /CreateDirectLink

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

Code samples

osc-cli api CreateDirectLink --profile "default" \
  --Bandwidth "string" \
  --DirectLinkName "string" \
  --DryRun False \
  --Location "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "Bandwidth": "string",
    "DirectLinkName": "string",
    "DryRun": false,
    "Location": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateDirectLink(
    Bandwidth="string",
    DirectLinkName="string",
    Location="string",
)
print(result)

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

Example responses

200 Response

{
  "DirectLink": {
    "AccountId": "string",
    "Bandwidth": "string",
    "DirectLinkId": "string",
    "DirectLinkName": "string",
    "Location": "string",
    "RegionName": "string",
    "State": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

POST /DeleteDirectLink

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

Code samples

osc-cli api DeleteDirectLink --profile "default" \
  --DirectLinkId "string" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteDirectLink(
    DirectLinkId="string",
)
print(result)

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

POST /ReadDirectLinks

Lists all DirectLinks in the Region.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the Throttling error message is returned.

Code samples

osc-cli api ReadDirectLinks --profile "default" \
  --DryRun False \
  --Filters '{ \
      "DirectLinkIds": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "DirectLinkIds": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadDirectLinks(
    Filters={ 
        "DirectLinkIds": ["string"] 
    },
)
print(result)

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

Example responses

200 Response

{
  "DirectLinks": [
    {
      "AccountId": "string",
      "Bandwidth": "string",
      "DirectLinkId": "string",
      "DirectLinkName": "string",
      "Location": "string",
      "RegionName": "string",
      "State": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

DirectLinkInterface

CreateDirectLinkInterface

POST /CreateDirectLinkInterface

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

Code samples

osc-cli api CreateDirectLinkInterface --profile "default" \
  --DirectLinkId "string" \
  --DirectLinkInterface '{ \
      "BgpAsn": 0, \
      "BgpKey": "string", \
      "ClientPrivateIp": "string", \
      "DirectLinkInterfaceName": "string", \
      "OutscalePrivateIp": "string", \
      "VirtualGatewayId": "string", \
      "Vlan": 0 \
    }' \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DirectLinkInterface": {
      "BgpAsn": 0,
      "BgpKey": "string",
      "ClientPrivateIp": "string",
      "DirectLinkInterfaceName": "string",
      "OutscalePrivateIp": "string",
      "VirtualGatewayId": "string",
      "Vlan": 0
    },
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateDirectLinkInterface(
    DirectLinkId="string",
    DirectLinkInterface={ 
        "BgpAsn": 0, 
        "BgpKey": "string", 
        "ClientPrivateIp": "string", 
        "DirectLinkInterfaceName": "string", 
        "OutscalePrivateIp": "string", 
        "VirtualGatewayId": "string", 
        "Vlan": 0 
    },
)
print(result)

Parameters

Parameter Type Required Description
DirectLinkId string true The ID of the existing DirectLink for which you want to create the DirectLink interface.
DirectLinkInterface DirectLinkInterface true Information about the DirectLink interface.
» BgpAsn integer true 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 false The BGP authentication key.
» ClientPrivateIp string false The IP on the customer's side of the DirectLink interface.
» DirectLinkInterfaceName string true The name of the DirectLink interface.
» OutscalePrivateIp string false The IP on the OUTSCALE side of the DirectLink interface.
» VirtualGatewayId string true The ID of the target virtual gateway.
» Vlan integer true The VLAN number associated with the DirectLink interface.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.

Responses

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

Example responses

200 Response

{
  "DirectLinkInterface": {
    "AccountId": "string",
    "BgpAsn": 0,
    "BgpKey": "string",
    "ClientPrivateIp": "string",
    "DirectLinkId": "string",
    "DirectLinkInterfaceId": "string",
    "DirectLinkInterfaceName": "string",
    "InterfaceType": "string",
    "Location": "string",
    "Mtu": 0,
    "OutscalePrivateIp": "string",
    "State": "string",
    "VirtualGatewayId": "string",
    "Vlan": 0
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteDirectLinkInterface

POST /DeleteDirectLinkInterface

Deletes a specified DirectLink interface.

Code samples

osc-cli api DeleteDirectLinkInterface --profile "default" \
  --DirectLinkInterfaceId "string" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteDirectLinkInterface(
    DirectLinkInterfaceId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadDirectLinkInterfaces

POST /ReadDirectLinkInterfaces

Lists one or more of your DirectLink interfaces.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the Throttling error message is returned.

Code samples

osc-cli api ReadDirectLinkInterfaces --profile "default" \
  --DryRun False \
  --Filters '{ \
      "DirectLinkIds": ["string"], \
      "DirectLinkInterfaceIds": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "DirectLinkIds": ["string"],
      "DirectLinkInterfaceIds": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadDirectLinkInterfaces(
    Filters={ 
        "DirectLinkIds": ["string"], 
        "DirectLinkInterfaceIds": ["string"] 
    },
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "DirectLinkInterfaces": [
    {
      "AccountId": "string",
      "BgpAsn": 0,
      "BgpKey": "string",
      "ClientPrivateIp": "string",
      "DirectLinkId": "string",
      "DirectLinkInterfaceId": "string",
      "DirectLinkInterfaceName": "string",
      "InterfaceType": "string",
      "Location": "string",
      "Mtu": 0,
      "OutscalePrivateIp": "string",
      "State": "string",
      "VirtualGatewayId": "string",
      "Vlan": 0
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateDirectLinkInterface

POST /UpdateDirectLinkInterface

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

Code samples

osc-cli api UpdateDirectLinkInterface --profile "default" \
  --DirectLinkInterfaceId "string" \
  --DryRun False \
  --Mtu 1500

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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": "string",
    "DryRun": false,
    "Mtu": 1500
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateDirectLinkInterface(
    DirectLinkInterfaceId="string",
    Mtu=1500,
)
print(result)

Parameters

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

Enumerated Values

Parameter Value
Mtu 1500

Responses

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

Example responses

200 Response

{
  "DirectLinkInterface": {
    "AccountId": "string",
    "BgpAsn": 0,
    "BgpKey": "string",
    "ClientPrivateIp": "string",
    "DirectLinkId": "string",
    "DirectLinkInterfaceId": "string",
    "DirectLinkInterfaceName": "string",
    "InterfaceType": "string",
    "Location": "string",
    "Mtu": 0,
    "OutscalePrivateIp": "string",
    "State": "string",
    "VirtualGatewayId": "string",
    "Vlan": 0
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

FlexibleGpu

CreateFlexibleGpu

POST /CreateFlexibleGpu

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

Code samples

osc-cli api CreateFlexibleGpu --profile "default" \
  --DeleteOnVmDeletion False \
  --DryRun False \
  --Generation "string" \
  --ModelName "string" \
  --SubregionName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DeleteOnVmDeletion": false,
    "DryRun": false,
    "Generation": "string",
    "ModelName": "string",
    "SubregionName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateFlexibleGpu(
    DeleteOnVmDeletion=False,
    Generation="string",
    ModelName="string",
    SubregionName="string",
)
print(result)

Parameters

Parameter Type Required Description
DeleteOnVmDeletion boolean false If true, the fGPU is deleted when the VM is terminated.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Generation string false 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 string true The model of fGPU you want to allocate. For more information, see About Flexible GPUs.
SubregionName string true The Subregion in which you want to create the fGPU.

Responses

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

Example responses

200 Response

{
  "FlexibleGpu": {
    "DeleteOnVmDeletion": true,
    "FlexibleGpuId": "string",
    "Generation": "string",
    "ModelName": "string",
    "State": "string",
    "SubregionName": "string",
    "VmId": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteFlexibleGpu

POST /DeleteFlexibleGpu

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

Code samples

osc-cli api DeleteFlexibleGpu --profile "default" \
  --DryRun False \
  --FlexibleGpuId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "FlexibleGpuId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteFlexibleGpu(
    FlexibleGpuId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkFlexibleGpu

POST /LinkFlexibleGpu

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

Code samples

osc-cli api LinkFlexibleGpu --profile "default" \
  --DryRun False \
  --FlexibleGpuId "string" \
  --VmId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "FlexibleGpuId": "string",
    "VmId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.LinkFlexibleGpu(
    FlexibleGpuId="string",
    VmId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadFlexibleGpuCatalog

POST /ReadFlexibleGpuCatalog

Lists all flexible GPUs available in the public catalog.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadFlexibleGpuCatalog --profile "default" \
  --DryRun False

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadFlexibleGpuCatalog()
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "FlexibleGpuCatalog": [
    {
      "Generations": [
        "string"
      ],
      "MaxCpu": 0,
      "MaxRam": 0,
      "ModelName": "string",
      "VRam": 0
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadFlexibleGpus

POST /ReadFlexibleGpus

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

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadFlexibleGpus --profile "default" \
  --DryRun False \
  --Filters '{ \
      "DeleteOnVmDeletion": True, \
      "FlexibleGpuIds": ["string"], \
      "Generations": ["string"], \
      "ModelNames": ["string"], \
      "States": ["string"], \
      "SubregionNames": ["string"], \
      "VmIds": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "DeleteOnVmDeletion": true,
      "FlexibleGpuIds": ["string"],
      "Generations": ["string"],
      "ModelNames": ["string"],
      "States": ["string"],
      "SubregionNames": ["string"],
      "VmIds": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadFlexibleGpus(
    Filters={ 
        "DeleteOnVmDeletion": True, 
        "FlexibleGpuIds": ["string"], 
        "Generations": ["string"], 
        "ModelNames": ["string"], 
        "States": ["string"], 
        "SubregionNames": ["string"], 
        "VmIds": ["string"] 
    },
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "FlexibleGpus": [
    {
      "DeleteOnVmDeletion": true,
      "FlexibleGpuId": "string",
      "Generation": "string",
      "ModelName": "string",
      "State": "string",
      "SubregionName": "string",
      "VmId": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkFlexibleGpu

POST /UnlinkFlexibleGpu

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

Code samples

osc-cli api UnlinkFlexibleGpu --profile "default" \
  --DryRun False \
  --FlexibleGpuId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "FlexibleGpuId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UnlinkFlexibleGpu(
    FlexibleGpuId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateFlexibleGpu

POST /UpdateFlexibleGpu

Modifies a flexible GPU (fGPU) behavior.

Code samples

osc-cli api UpdateFlexibleGpu --profile "default" \
  --DeleteOnVmDeletion True \
  --DryRun False \
  --FlexibleGpuId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DeleteOnVmDeletion": true,
    "DryRun": false,
    "FlexibleGpuId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateFlexibleGpu(
    DeleteOnVmDeletion=True,
    FlexibleGpuId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "FlexibleGpu": {
    "DeleteOnVmDeletion": true,
    "FlexibleGpuId": "string",
    "Generation": "string",
    "ModelName": "string",
    "State": "string",
    "SubregionName": "string",
    "VmId": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

Image

CreateImage

POST /CreateImage

Creates an OUTSCALE machine image (OMI) from an existing virtual machine (VM) which is either running or stopped.
This action also creates a snapshot of the root volume of the VM, as well as a snapshot of each Block Storage Unit (BSU) volume attached to the VM. For more information, see About OMIs.

You can also use this method to copy an OMI to your account, from an account in the same Region. To do so, the owner of the source OMI must share it with your account. For more information about how to share an OMI with another account in the same Region, see UpdateImage.
To copy an OMI between accounts in different Regions, the owner of the source OMI must first export it to an OUTSCALE Object Storage (OOS) bucket using the CreateImageExportTask method, and then you need to create a copy of the image in your account.
The copy of the source OMI is independent and belongs to you.

You can also use this method to register an OMI to finalize its creation process.
You can register an OMI from a snapshot of a root device to create an OMI based on this snapshot. You can also register an OMI that has been exported to an S3-compatible bucket to create a copy of it in your account. For more information about OMI export to an OOS bucket, see CreateImageExportTask.
You can register an OMI using a pre-signed URL of the manifest file of the OMI. You do not need any permission for this OMI, or the bucket in which it is contained. The manifest file is obsolete seven days after a completed export as it contains pre-signed URLs to the appropriate snapshots (pre-signed URLs are valid for only seven days).
Once the OMI is registered, you can launch a VM from this OMI. The copy of the source OMI is independent and belongs to you.

Code samples

osc-cli api CreateImage --profile "default" \
  --Architecture "string" \
  --BlockDeviceMappings '[ \
      { \
        "Bsu": {"DeleteOnVmDeletion": True, "Iops": 0, "SnapshotId": "string", "VolumeSize": 0, "VolumeType": "string"}, \
        "DeviceName": "string", \
        "VirtualDeviceName": "string" \
      } \
    ]' \
  --Description "string" \
  --DryRun False \
  --FileLocation "string" \
  --ImageName "string" \
  --NoReboot True \
  --ProductCodes '["string"]' \
  --RootDeviceName "string" \
  --SourceImageId "string" \
  --SourceRegionName "string" \
  --VmId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "Architecture": "string",
    "BlockDeviceMappings": [
      {
        "Bsu": {"DeleteOnVmDeletion": true, "Iops": 0, "SnapshotId": "string", "VolumeSize": 0, "VolumeType": "string"},
        "DeviceName": "string",
        "VirtualDeviceName": "string"
      }
    ],
    "Description": "string",
    "DryRun": false,
    "FileLocation": "string",
    "ImageName": "string",
    "NoReboot": true,
    "ProductCodes": ["string"],
    "RootDeviceName": "string",
    "SourceImageId": "string",
    "SourceRegionName": "string",
    "VmId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateImage(
    Architecture="string",
    BlockDeviceMappings=[ 
        { 
            "Bsu": { 
                "DeleteOnVmDeletion": True, 
                "Iops": 0, 
                "SnapshotId": "string", 
                "VolumeSize": 0, 
                "VolumeType": "string" 
            }, 
            "DeviceName": "string", 
            "VirtualDeviceName": "string" 
        } 
    ],
    Description="string",
    FileLocation="string",
    ImageName="string",
    NoReboot=True,
    ProductCodes=["string"],
    RootDeviceName="string",
    SourceImageId="string",
    SourceRegionName="string",
    VmId="string",
)
print(result)

Parameters

Parameter Type Required Description
Architecture string false The architecture of the OMI (by default, i386 if you specified the FileLocation or RootDeviceName parameter).
BlockDeviceMappings [BlockDeviceMappingImage] false One or more block device mappings.
» Bsu BsuToCreate false Information about the BSU volume to create.
»» DeleteOnVmDeletion boolean false 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 false 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 false The ID of the snapshot used to create the volume.
»» VolumeSize integer false 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 false 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 false 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 false The name of the virtual device (ephemeralN).
Description string false A description for the new OMI.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
FileLocation string false The pre-signed URL of the OMI manifest file, or the full path to the OMI stored in a bucket. If you specify this parameter, a copy of the OMI is created in your account. You must specify only one of the following parameters: FileLocation, RootDeviceName, SourceImageId or VmId.
ImageName string false A unique name for the new OMI.
Constraints: 3-128 alphanumeric characters, underscores (_), spaces ( ), parentheses (()), slashes (/), periods (.), or dashes (-).
NoReboot boolean false If false, the VM shuts down before creating the OMI and then reboots. If true, the VM does not.
ProductCodes [string] false The product codes associated with the OMI.
RootDeviceName string false The name of the root device. You must specify only one of the following parameters: FileLocation, RootDeviceName, SourceImageId or VmId.
SourceImageId string false The ID of the OMI you want to copy. You must specify only one of the following parameters: FileLocation, RootDeviceName, SourceImageId or VmId.
SourceRegionName string false The name of the source Region, which must be the same as the Region of your account.
VmId string false The ID of the VM from which you want to create the OMI. You must specify only one of the following parameters: FileLocation, RootDeviceName, SourceImageId or VmId.

Responses

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

Example responses

200 Response

{
  "Image": {
    "AccountAlias": "string",
    "AccountId": "string",
    "Architecture": "string",
    "BlockDeviceMappings": [
      {
        "Bsu": {
          "DeleteOnVmDeletion": true,
          "Iops": 0,
          "SnapshotId": "string",
          "VolumeSize": 0,
          "VolumeType": "string"
        },
        "DeviceName": "string",
        "VirtualDeviceName": "string"
      }
    ],
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "FileLocation": "string",
    "ImageId": "string",
    "ImageName": "string",
    "ImageType": "string",
    "PermissionsToLaunch": {
      "AccountIds": [
        "string"
      ],
      "GlobalPermission": true
    },
    "ProductCodes": [
      "string"
    ],
    "RootDeviceName": "string",
    "RootDeviceType": "string",
    "State": "string",
    "StateComment": {
      "StateCode": "string",
      "StateMessage": "string"
    },
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateImageExportTask

POST /CreateImageExportTask

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

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

Code samples

osc-cli api CreateImageExportTask --profile "default" \
  --DryRun False \
  --ImageId "string" \
  --OsuExport '{ \
      "DiskImageFormat": "string", \
      "OsuApiKey": { \
        "ApiKeyId": "string", \
        "SecretKey": "string" \
      }, \
      "OsuBucket": "string", \
      "OsuManifestUrl": "string", \
      "OsuPrefix": "string" \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "ImageId": "string",
    "OsuExport": {
      "DiskImageFormat": "string",
      "OsuApiKey": {
        "ApiKeyId": "string",
        "SecretKey": "string"
      },
      "OsuBucket": "string",
      "OsuManifestUrl": "string",
      "OsuPrefix": "string"
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateImageExportTask(
    ImageId="string",
    OsuExport={ 
        "DiskImageFormat": "string", 
        "OsuApiKey": { 
            "ApiKeyId": "string", 
            "SecretKey": "string" 
        }, 
        "OsuBucket": "string", 
        "OsuManifestUrl": "string", 
        "OsuPrefix": "string" 
    },
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ImageExportTask": {
    "Comment": "string",
    "ImageId": "string",
    "OsuExport": {
      "DiskImageFormat": "string",
      "OsuBucket": "string",
      "OsuManifestUrl": "string",
      "OsuPrefix": "string"
    },
    "Progress": 0,
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "TaskId": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteImage

POST /DeleteImage

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

Code samples

osc-cli api DeleteImage --profile "default" \
  --DryRun False \
  --ImageId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "ImageId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteImage(
    ImageId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadImageExportTasks

POST /ReadImageExportTasks

Lists one or more image export tasks.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadImageExportTasks --profile "default" \
  --DryRun False \
  --Filters '{ \
      "TaskIds": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "TaskIds": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadImageExportTasks(
    Filters={ 
        "TaskIds": ["string"] 
    },
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ImageExportTasks": [
    {
      "Comment": "string",
      "ImageId": "string",
      "OsuExport": {
        "DiskImageFormat": "string",
        "OsuBucket": "string",
        "OsuManifestUrl": "string",
        "OsuPrefix": "string"
      },
      "Progress": 0,
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "TaskId": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadImages

POST /ReadImages

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

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadImages --profile "default" \
  --DryRun False \
  --Filters '{ \
      "AccountAliases": ["string"], \
      "AccountIds": ["string"], \
      "Architectures": ["string"], \
      "BlockDeviceMappingDeleteOnVmDeletion": True, \
      "BlockDeviceMappingDeviceNames": ["string"], \
      "BlockDeviceMappingSnapshotIds": ["string"], \
      "BlockDeviceMappingVolumeSizes": [0], \
      "BlockDeviceMappingVolumeTypes": ["string"], \
      "Descriptions": ["string"], \
      "FileLocations": ["string"], \
      "Hypervisors": ["string"], \
      "ImageIds": ["string"], \
      "ImageNames": ["string"], \
      "PermissionsToLaunchAccountIds": ["string"], \
      "PermissionsToLaunchGlobalPermission": True, \
      "ProductCodes": ["string"], \
      "RootDeviceNames": ["string"], \
      "RootDeviceTypes": ["string"], \
      "States": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"], \
      "VirtualizationTypes": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "AccountAliases": ["string"],
      "AccountIds": ["string"],
      "Architectures": ["string"],
      "BlockDeviceMappingDeleteOnVmDeletion": true,
      "BlockDeviceMappingDeviceNames": ["string"],
      "BlockDeviceMappingSnapshotIds": ["string"],
      "BlockDeviceMappingVolumeSizes": [0],
      "BlockDeviceMappingVolumeTypes": ["string"],
      "Descriptions": ["string"],
      "FileLocations": ["string"],
      "Hypervisors": ["string"],
      "ImageIds": ["string"],
      "ImageNames": ["string"],
      "PermissionsToLaunchAccountIds": ["string"],
      "PermissionsToLaunchGlobalPermission": true,
      "ProductCodes": ["string"],
      "RootDeviceNames": ["string"],
      "RootDeviceTypes": ["string"],
      "States": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"],
      "VirtualizationTypes": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadImages(
    Filters={ 
        "AccountAliases": ["string"], 
        "AccountIds": ["string"], 
        "Architectures": ["string"], 
        "BlockDeviceMappingDeleteOnVmDeletion": True, 
        "BlockDeviceMappingDeviceNames": ["string"], 
        "BlockDeviceMappingSnapshotIds": ["string"], 
        "BlockDeviceMappingVolumeSizes": [0], 
        "BlockDeviceMappingVolumeTypes": ["string"], 
        "Descriptions": ["string"], 
        "FileLocations": ["string"], 
        "Hypervisors": ["string"], 
        "ImageIds": ["string"], 
        "ImageNames": ["string"], 
        "PermissionsToLaunchAccountIds": ["string"], 
        "PermissionsToLaunchGlobalPermission": True, 
        "ProductCodes": ["string"], 
        "RootDeviceNames": ["string"], 
        "RootDeviceTypes": ["string"], 
        "States": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"], 
        "VirtualizationTypes": ["string"] 
    },
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "Images": [
    {
      "AccountAlias": "string",
      "AccountId": "string",
      "Architecture": "string",
      "BlockDeviceMappings": [
        {
          "Bsu": {
            "DeleteOnVmDeletion": true,
            "Iops": 0,
            "SnapshotId": "string",
            "VolumeSize": 0,
            "VolumeType": "string"
          },
          "DeviceName": "string",
          "VirtualDeviceName": "string"
        }
      ],
      "CreationDate": "2019-08-24T14:15:22Z",
      "Description": "string",
      "FileLocation": "string",
      "ImageId": "string",
      "ImageName": "string",
      "ImageType": "string",
      "PermissionsToLaunch": {
        "AccountIds": [
          "string"
        ],
        "GlobalPermission": true
      },
      "ProductCodes": [
        "string"
      ],
      "RootDeviceName": "string",
      "RootDeviceType": "string",
      "State": "string",
      "StateComment": {
        "StateCode": "string",
        "StateMessage": "string"
      },
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateImage

POST /UpdateImage

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

Code samples

osc-cli api UpdateImage --profile "default" \
  --DryRun False \
  --ImageId "string" \
  --PermissionsToLaunch '{ \
      "Additions": { \
        "AccountIds": ["string"], \
        "GlobalPermission": True \
      }, \
      "Removals": { \
        "AccountIds": ["string"], \
        "GlobalPermission": True \
      } \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "ImageId": "string",
    "PermissionsToLaunch": {
      "Additions": {
        "AccountIds": ["string"],
        "GlobalPermission": true
      },
      "Removals": {
        "AccountIds": ["string"],
        "GlobalPermission": true
      }
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateImage(
    ImageId="string",
    PermissionsToLaunch={ 
        "Additions": { 
            "AccountIds": ["string"], 
            "GlobalPermission": True 
        }, 
        "Removals": { 
            "AccountIds": ["string"], 
            "GlobalPermission": True 
        } 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
ImageId string true The ID of the OMI you want to modify.
PermissionsToLaunch PermissionsOnResourceCreation true Information about the permissions for the resource.
Specify either the Additions or the Removals parameter.
» Additions PermissionsOnResource false Permissions for the resource.
»» AccountIds [string] false One or more account IDs that the permission is associated with.
»» GlobalPermission boolean false 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 false Permissions for the resource.

Responses

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

Example responses

200 Response

{
  "Image": {
    "AccountAlias": "string",
    "AccountId": "string",
    "Architecture": "string",
    "BlockDeviceMappings": [
      {
        "Bsu": {
          "DeleteOnVmDeletion": true,
          "Iops": 0,
          "SnapshotId": "string",
          "VolumeSize": 0,
          "VolumeType": "string"
        },
        "DeviceName": "string",
        "VirtualDeviceName": "string"
      }
    ],
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "FileLocation": "string",
    "ImageId": "string",
    "ImageName": "string",
    "ImageType": "string",
    "PermissionsToLaunch": {
      "AccountIds": [
        "string"
      ],
      "GlobalPermission": true
    },
    "ProductCodes": [
      "string"
    ],
    "RootDeviceName": "string",
    "RootDeviceType": "string",
    "State": "string",
    "StateComment": {
      "StateCode": "string",
      "StateMessage": "string"
    },
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

InternetService

CreateInternetService

POST /CreateInternetService

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

Code samples

osc-cli api CreateInternetService --profile "default" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateInternetService()
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "InternetService": {
    "InternetServiceId": "string",
    "NetId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteInternetService

POST /DeleteInternetService

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

Code samples

osc-cli api DeleteInternetService --profile "default" \
  --DryRun False \
  --InternetServiceId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "InternetServiceId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteInternetService(
    InternetServiceId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkInternetService

POST /LinkInternetService

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

Code samples

osc-cli api LinkInternetService --profile "default" \
  --DryRun False \
  --InternetServiceId "string" \
  --NetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "InternetServiceId": "string",
    "NetId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.LinkInternetService(
    InternetServiceId="string",
    NetId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadInternetServices

POST /ReadInternetServices

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

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadInternetServices --profile "default" \
  --DryRun False \
  --Filters '{ \
      "InternetServiceIds": ["string"], \
      "LinkNetIds": ["string"], \
      "LinkStates": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "InternetServiceIds": ["string"],
      "LinkNetIds": ["string"],
      "LinkStates": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadInternetServices(
    Filters={ 
        "InternetServiceIds": ["string"], 
        "LinkNetIds": ["string"], 
        "LinkStates": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "InternetServices": [
    {
      "InternetServiceId": "string",
      "NetId": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkInternetService

POST /UnlinkInternetService

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

Code samples

osc-cli api UnlinkInternetService --profile "default" \
  --DryRun False \
  --InternetServiceId "string" \
  --NetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "InternetServiceId": "string",
    "NetId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UnlinkInternetService(
    InternetServiceId="string",
    NetId="string",
)
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

Keypair

CreateKeypair

POST /CreateKeypair

Creates a 2048-bit RSA keypair with a specified name.
This action returns the private key that you need to save. The public key is stored by 3DS OUTSCALE.

You can also import a public key. The following types of key can be imported: RSA (minimum 2048 bits, recommended 4096 bits), ECDSA (minimum and recommended 256 bits), and Ed25519. The following formats can be used: PEM, PKCS8, RFC4716, and OpenSSH.
This action imports the public key of a keypair created by a third-party tool and uses it to create a keypair. The private key is never provided to 3DS OUTSCALE.

Code samples

osc-cli api CreateKeypair --profile "default" \
  --DryRun False \
  --KeypairName "string" \
  --PublicKey "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "KeypairName": "string",
    "PublicKey": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateKeypair(
    KeypairName="string",
    PublicKey="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
KeypairName string true A unique name for the keypair, with a maximum length of 255 ASCII printable characters.
PublicKey string false The public key. It must be Base64-encoded.

Responses

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

Example responses

200 Response

{
  "Keypair": {
    "KeypairFingerprint": "string",
    "KeypairName": "string",
    "PrivateKey": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteKeypair

POST /DeleteKeypair

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

Code samples

osc-cli api DeleteKeypair --profile "default" \
  --DryRun False \
  --KeypairName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "KeypairName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteKeypair(
    KeypairName="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
KeypairName string true The name of the keypair you want to delete.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadKeypairs

POST /ReadKeypairs

Lists one or more of your keypairs.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadKeypairs --profile "default" \
  --DryRun False \
  --Filters '{ \
      "KeypairFingerprints": ["string"], \
      "KeypairNames": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "KeypairFingerprints": ["string"],
      "KeypairNames": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadKeypairs(
    Filters={ 
        "KeypairFingerprints": ["string"], 
        "KeypairNames": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersKeypair false One or more filters.
» KeypairFingerprints [string] false The fingerprints of the keypairs.
» KeypairNames [string] false The names of the keypairs.

Responses

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

Example responses

200 Response

{
  "Keypairs": [
    {
      "KeypairFingerprint": "string",
      "KeypairName": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

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.

Code samples

osc-cli api CreateListenerRule --profile "default" \
  --DryRun False \
  --Listener '{ \
      "LoadBalancerName": "string", \
      "LoadBalancerPort": 0 \
    }' \
  --ListenerRule '{ \
      "Action": "string", \
      "HostNamePattern": "string", \
      "ListenerRuleName": "string", \
      "PathPattern": "string", \
      "Priority": 0 \
    }' \
  --VmIds '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Listener": {
      "LoadBalancerName": "string",
      "LoadBalancerPort": 0
    },
    "ListenerRule": {
      "Action": "string",
      "HostNamePattern": "string",
      "ListenerRuleName": "string",
      "PathPattern": "string",
      "Priority": 0
    },
    "VmIds": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateListenerRule(
    Listener={ 
        "LoadBalancerName": "string", 
        "LoadBalancerPort": 0 
    },
    ListenerRule={ 
        "Action": "string", 
        "HostNamePattern": "string", 
        "ListenerRuleName": "string", 
        "PathPattern": "string", 
        "Priority": 0 
    },
    VmIds=["string"],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Listener LoadBalancerLight true Information about the load balancer.
» LoadBalancerName string true The name of the load balancer to which the listener is attached.
» LoadBalancerPort integer true The port of load balancer on which the load balancer is listening (between 1 and 65535 both included).
ListenerRule ListenerRuleForCreation true Information about the listener rule.
» Action string false The type of action for the rule (always forward).
» HostNamePattern string false A host-name pattern for the rule, with a maximum length of 128 characters. This host-name pattern supports maximum three wildcards, and must not contain any special characters except [-.?].
» ListenerRuleName string true A human-readable name for the listener rule.
» PathPattern string false 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 true 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] true The IDs of the backend VMs.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). CreateListenerRuleResponse

Example responses

200 Response

{
  "ListenerRule": {
    "Action": "string",
    "HostNamePattern": "string",
    "ListenerId": 0,
    "ListenerRuleId": 0,
    "ListenerRuleName": "string",
    "PathPattern": "string",
    "Priority": 0,
    "VmIds": [
      "string"
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateLoadBalancerListeners

POST /CreateLoadBalancerListeners

Creates one or more listeners for a specified load balancer.

Code samples

osc-cli api CreateLoadBalancerListeners --profile "default" \
  --DryRun False \
  --Listeners '[ \
      { \
        "BackendPort": 0, \
        "BackendProtocol": "string", \
        "LoadBalancerPort": 0, \
        "LoadBalancerProtocol": "string", \
        "ServerCertificateId": "string" \
      } \
    ]' \
  --LoadBalancerName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateLoadBalancerListeners(
    Listeners=[ 
        { 
            "BackendPort": 0, 
            "BackendProtocol": "string", 
            "LoadBalancerPort": 0, 
            "LoadBalancerProtocol": "string", 
            "ServerCertificateId": "string" 
        } 
    ],
    LoadBalancerName="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Listeners [ListenerForCreation] true One or more listeners for the load balancer.
» BackendPort integer true The port on which the back-end VM is listening (between 1 and 65535, both included).
» BackendProtocol string false The protocol for routing traffic to back-end VMs (HTTP | HTTPS | TCP | SSL).
» LoadBalancerPort integer true The port on which the load balancer is listening (between 1 and 65535, both included).
» LoadBalancerProtocol string true The routing protocol (HTTP | HTTPS | TCP | SSL).
» ServerCertificateId string false The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
LoadBalancerName string true The name of the load balancer for which you want to create listeners.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). CreateLoadBalancerListenersResponse

Example responses

200 Response

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteListenerRule

POST /DeleteListenerRule

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

Code samples

osc-cli api DeleteListenerRule --profile "default" \
  --DryRun False \
  --ListenerRuleName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "ListenerRuleName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteListenerRule(
    ListenerRuleName="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
ListenerRuleName string true The name of the rule you want to delete.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). DeleteListenerRuleResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteLoadBalancerListeners

POST /DeleteLoadBalancerListeners

Deletes listeners of a specified load balancer.

Code samples

osc-cli api DeleteLoadBalancerListeners --profile "default" \
  --DryRun False \
  --LoadBalancerName "string" \
  --LoadBalancerPorts '[0]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "LoadBalancerName": "string",
    "LoadBalancerPorts": [0]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteLoadBalancerListeners(
    LoadBalancerName="string",
    LoadBalancerPorts=[0],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerName string true The name of the load balancer for which you want to delete listeners.
LoadBalancerPorts [integer] true One or more port numbers of the listeners you want to delete.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). DeleteLoadBalancerListenersResponse

Example responses

200 Response

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadListenerRules

POST /ReadListenerRules

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

Code samples

osc-cli api ReadListenerRules --profile "default" \
  --DryRun False \
  --Filters '{ \
      "ListenerRuleNames": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Filters": {
      "ListenerRuleNames": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadListenerRules(
    Filters={ 
        "ListenerRuleNames": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersListenerRule false One or more filters.
» ListenerRuleNames [string] false The names of the listener rules.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadListenerRulesResponse

Example responses

200 Response

{
  "ListenerRules": [
    {
      "Action": "string",
      "HostNamePattern": "string",
      "ListenerId": 0,
      "ListenerRuleId": 0,
      "ListenerRuleName": "string",
      "PathPattern": "string",
      "Priority": 0,
      "VmIds": [
        "string"
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateListenerRule

POST /UpdateListenerRule

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

Code samples

osc-cli api UpdateListenerRule --profile "default" \
  --DryRun False \
  --HostPattern "string" \
  --ListenerRuleName "string" \
  --PathPattern "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "HostPattern": "string",
    "ListenerRuleName": "string",
    "PathPattern": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateListenerRule(
    HostPattern="string",
    ListenerRuleName="string",
    PathPattern="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
HostPattern string|null false A host-name pattern for the rule, with a maximum length of 128 characters. This host-name pattern supports maximum three wildcards, and must not contain any special characters except [-.?].
ListenerRuleName string true The name of the listener rule.
PathPattern string|null false A path pattern for the rule, with a maximum length of 128 characters. This path pattern supports maximum three wildcards, and must not contain any special characters except [_-.$/~"'@:+?].

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). UpdateListenerRuleResponse

Example responses

200 Response

{
  "ListenerRule": {
    "Action": "string",
    "HostNamePattern": "string",
    "ListenerId": 0,
    "ListenerRuleId": 0,
    "ListenerRuleName": "string",
    "PathPattern": "string",
    "Priority": 0,
    "VmIds": [
      "string"
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

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.

Code samples

osc-cli api CreateLoadBalancer --profile "default" \
  --DryRun False \
  --Listeners '[ \
      { \
        "BackendPort": 0, \
        "BackendProtocol": "string", \
        "LoadBalancerPort": 0, \
        "LoadBalancerProtocol": "string", \
        "ServerCertificateId": "string" \
      } \
    ]' \
  --LoadBalancerName "string" \
  --LoadBalancerType "string" \
  --PublicIp "string" \
  --SecurityGroups '["string"]' \
  --Subnets '["string"]' \
  --SubregionNames '["string"]' \
  --Tags '[ \
      { \
        "Key": "string", \
        "Value": "string" \
      } \
    ]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerType": "string",
    "PublicIp": "string",
    "SecurityGroups": ["string"],
    "Subnets": ["string"],
    "SubregionNames": ["string"],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateLoadBalancer(
    Listeners=[ 
        { 
            "BackendPort": 0, 
            "BackendProtocol": "string", 
            "LoadBalancerPort": 0, 
            "LoadBalancerProtocol": "string", 
            "ServerCertificateId": "string" 
        } 
    ],
    LoadBalancerName="string",
    LoadBalancerType="string",
    PublicIp="string",
    SecurityGroups=["string"],
    Subnets=["string"],
    SubregionNames=["string"],
    Tags=[ 
        { 
            "Key": "string", 
            "Value": "string" 
        } 
    ],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Listeners [ListenerForCreation] true One or more listeners to create.
» BackendPort integer true The port on which the back-end VM is listening (between 1 and 65535, both included).
» BackendProtocol string false The protocol for routing traffic to back-end VMs (HTTP | HTTPS | TCP | SSL).
» LoadBalancerPort integer true The port on which the load balancer is listening (between 1 and 65535, both included).
» LoadBalancerProtocol string true The routing protocol (HTTP | HTTPS | TCP | SSL).
» ServerCertificateId string false The OUTSCALE Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > OUTSCALE Resource Names (ORNs).
LoadBalancerName string true The unique name of the load balancer (32 alphanumeric or hyphen characters maximum, but cannot start or end with a hyphen).
LoadBalancerType string false The type of load balancer: internet-facing or internal. Use this parameter only for load balancers in a Net.
PublicIp string false (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] false (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] false (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] false (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] false One or more tags assigned to the load balancer.
» Key string true The key of the tag, with a minimum of 1 character.
» Value string true The value of the tag, between 0 and 255 characters.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). CreateLoadBalancerResponse

Example responses

200 Response

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

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.

Code samples

osc-cli api CreateLoadBalancerTags --profile "default" \
  --DryRun False \
  --LoadBalancerNames '["string"]' \
  --Tags '[ \
      { \
        "Key": "string", \
        "Value": "string" \
      } \
    ]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "LoadBalancerNames": ["string"],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateLoadBalancerTags(
    LoadBalancerNames=["string"],
    Tags=[ 
        { 
            "Key": "string", 
            "Value": "string" 
        } 
    ],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerNames [string] true One or more load balancer names.
Tags [ResourceTag] true One or more tags to add to the specified load balancers.
» Key string true The key of the tag, with a minimum of 1 character.
» Value string true The value of the tag, between 0 and 255 characters.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). CreateLoadBalancerTagsResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteLoadBalancer

POST /DeleteLoadBalancer

Deletes a specified load balancer.

Code samples

osc-cli api DeleteLoadBalancer --profile "default" \
  --DryRun False \
  --LoadBalancerName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "LoadBalancerName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteLoadBalancer(
    LoadBalancerName="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerName string true The name of the load balancer you want to delete.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). DeleteLoadBalancerResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteLoadBalancerTags

POST /DeleteLoadBalancerTags

Deletes one or more tags from the specified load balancers.

Code samples

osc-cli api DeleteLoadBalancerTags --profile "default" \
  --DryRun False \
  --LoadBalancerNames '["string"]' \
  --Tags '[ \
      { \
        "Key": "string" \
      } \
    ]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "DryRun": false,
    "LoadBalancerNames": ["string"],
    "Tags": [
      {
        "Key": "string"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteLoadBalancerTags(
    LoadBalancerNames=["string"],
    Tags=[ 
        { 
            "Key": "string" 
        } 
    ],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerNames [string] true One or more load balancer names.
Tags [ResourceLoadBalancerTag] true One or more tags to delete from the load balancers.
» Key string false The key of the tag, with a minimum of 1 character.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). DeleteLoadBalancerTagsResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeregisterVmsInLoadBalancer

POST /DeregisterVmsInLoadBalancer

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

Code samples

osc-cli api DeregisterVmsInLoadBalancer --profile "default" \
  --BackendVmIds '["string"]' \
  --DryRun False \
  --LoadBalancerName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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 '{
    "BackendVmIds": ["string"],
    "DryRun": false,
    "LoadBalancerName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeregisterVmsInLoadBalancer(
    BackendVmIds=["string"],
    LoadBalancerName="string",
)
print(result)

Parameters

Parameter Type Required Description
BackendVmIds [string] true One or more IDs of back-end VMs.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerName string true The name of the load balancer.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). DeregisterVmsInLoadBalancerResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkLoadBalancerBackendMachines

POST /LinkLoadBalancerBackendMachines

Attaches one or more virtual machines (VMs) to a specified load balancer. You need to specify at least the BackendIps or the BackendVmIds parameter.
The VMs can be in different Subnets and different Subregions than the load balancer, as long as the VMs and load balancers are all in the public Cloud or all in the same Net. It may take a little time for a VM to be registered with the load balancer. Once the VM is registered with a load balancer, it receives traffic and requests from this load balancer and is called a back-end VM.

Code samples

osc-cli api LinkLoadBalancerBackendMachines --profile "default" \
  --BackendIps '["string"]' \
  --BackendVmIds '["string"]' \
  --DryRun False \
  --LoadBalancerName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkLoadBalancerBackendMachines \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "BackendIps": ["string"],
    "BackendVmIds": ["string"],
    "DryRun": false,
    "LoadBalancerName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.LinkLoadBalancerBackendMachines(
    BackendIps=["string"],
    BackendVmIds=["string"],
    LoadBalancerName="string",
)
print(result)

Parameters

Parameter Type Required Description
BackendIps [string] false One or more public IPs of back-end VMs.
BackendVmIds [string] false One or more IDs of back-end VMs.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerName string true The name of the load balancer.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). LinkLoadBalancerBackendMachinesResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadLoadBalancerTags

POST /ReadLoadBalancerTags

Lists the tags associated with one or more specified load balancers.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the Throttling error message is returned.

Code samples

osc-cli api ReadLoadBalancerTags --profile "default" \
  --DryRun False \
  --LoadBalancerNames '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadLoadBalancerTags \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "LoadBalancerNames": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadLoadBalancerTags(
    LoadBalancerNames=["string"],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerNames [string] true One or more load balancer names.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadLoadBalancerTagsResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Tags": [
    {
      "Key": "string",
      "LoadBalancerName": "string",
      "Value": "string"
    }
  ]
}

ReadLoadBalancers

POST /ReadLoadBalancers

Lists one or more load balancers and their attributes.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadLoadBalancers --profile "default" \
  --DryRun False \
  --Filters '{ \
      "LoadBalancerNames": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadLoadBalancers \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "LoadBalancerNames": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadLoadBalancers(
    Filters={ 
        "LoadBalancerNames": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersLoadBalancer false One or more filters.
» LoadBalancerNames [string] false The names of the load balancers.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadLoadBalancersResponse

Example responses

200 Response

{
  "LoadBalancers": [
    {
      "AccessLog": {
        "IsEnabled": true,
        "OsuBucketName": "string",
        "OsuBucketPrefix": "string",
        "PublicationInterval": 0
      },
      "ApplicationStickyCookiePolicies": [
        {
          "CookieName": "string",
          "PolicyName": "string"
        }
      ],
      "BackendIps": [
        "string"
      ],
      "BackendVmIds": [
        "string"
      ],
      "DnsName": "string",
      "HealthCheck": {
        "CheckInterval": 0,
        "HealthyThreshold": 0,
        "Path": "string",
        "Port": 0,
        "Protocol": "string",
        "Timeout": 0,
        "UnhealthyThreshold": 0
      },
      "Listeners": [
        {
          "BackendPort": 0,
          "BackendProtocol": "string",
          "LoadBalancerPort": 0,
          "LoadBalancerProtocol": "string",
          "PolicyNames": [
            "string"
          ],
          "ServerCertificateId": "string"
        }
      ],
      "LoadBalancerName": "string",
      "LoadBalancerStickyCookiePolicies": [
        {
          "CookieExpirationPeriod": 0,
          "PolicyName": "string"
        }
      ],
      "LoadBalancerType": "string",
      "NetId": "string",
      "PublicIp": "string",
      "SecuredCookies": true,
      "SecurityGroups": [
        "string"
      ],
      "SourceSecurityGroup": {
        "SecurityGroupAccountId": "string",
        "SecurityGroupName": "string"
      },
      "Subnets": [
        "string"
      ],
      "SubregionNames": [
        "string"
      ],
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadVmsHealth

POST /ReadVmsHealth

Lists the state of one or more back-end virtual machines (VMs) registered with a specified load balancer.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the Throttling error message is returned.

Code samples

osc-cli api ReadVmsHealth --profile "default" \
  --BackendVmIds '["string"]' \
  --DryRun False \
  --LoadBalancerName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVmsHealth \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "BackendVmIds": ["string"],
    "DryRun": false,
    "LoadBalancerName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadVmsHealth(
    BackendVmIds=["string"],
    LoadBalancerName="string",
)
print(result)

Parameters

Parameter Type Required Description
BackendVmIds [string] false One or more IDs of back-end VMs.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerName string true The name of the load balancer.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadVmsHealthResponse

Example responses

200 Response

{
  "BackendVmHealth": [
    {
      "Description": "string",
      "State": "string",
      "StateReason": "string",
      "VmId": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

RegisterVmsInLoadBalancer

POST /RegisterVmsInLoadBalancer

Registers one or more virtual machines (VMs) with a specified load balancer.
The VMs can be in different Subnets and different Subregions than the load balancer, as long as the VMs and load balancers are all in the public Cloud or all in the same Net. It may take a little time for a VM to be registered with the load balancer. Once the VM is registered with a load balancer, it receives traffic and requests from this load balancer and is called a back-end VM.

Code samples

osc-cli api RegisterVmsInLoadBalancer --profile "default" \
  --BackendVmIds '["string"]' \
  --DryRun False \
  --LoadBalancerName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/RegisterVmsInLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "BackendVmIds": ["string"],
    "DryRun": false,
    "LoadBalancerName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.RegisterVmsInLoadBalancer(
    BackendVmIds=["string"],
    LoadBalancerName="string",
)
print(result)

Parameters

Parameter Type Required Description
BackendVmIds [string] true One or more IDs of back-end VMs.
Specifying the same ID several times has no effect as each back-end VM has equal weight.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerName string true The name of the load balancer.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). RegisterVmsInLoadBalancerResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkLoadBalancerBackendMachines

POST /UnlinkLoadBalancerBackendMachines

Detaches one or more back-end virtual machines (VMs) from a load balancer. You need to specify at least the BackendIps or the BackendVmIds parameter.

Code samples

osc-cli api UnlinkLoadBalancerBackendMachines --profile "default" \
  --BackendIps '["string"]' \
  --BackendVmIds '["string"]' \
  --DryRun False \
  --LoadBalancerName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkLoadBalancerBackendMachines \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "BackendIps": ["string"],
    "BackendVmIds": ["string"],
    "DryRun": false,
    "LoadBalancerName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UnlinkLoadBalancerBackendMachines(
    BackendIps=["string"],
    BackendVmIds=["string"],
    LoadBalancerName="string",
)
print(result)

Parameters

Parameter Type Required Description
BackendIps [string] false One or more public IPs of back-end VMs.
BackendVmIds [string] false One or more IDs of back-end VMs.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerName string true The name of the load balancer.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). UnlinkLoadBalancerBackendMachinesResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateLoadBalancer

POST /UpdateLoadBalancer

Modifies the specified attribute of a load balancer. You can specify only one attribute at a time.

You can set a new SSL certificate to an SSL or HTTPS listener of a load balancer.
This certificate replaces any certificate used on the same load balancer and port.

You can also replace the currently enabled policy for the load balancer with another one.
If the PolicyNames parameter is empty, the currently enabled policy is disabled.

Code samples

osc-cli api UpdateLoadBalancer --profile "default" \
  --AccessLog '{ \
      "IsEnabled": True, \
      "OsuBucketName": "string", \
      "OsuBucketPrefix": "string", \
      "PublicationInterval": 0 \
    }' \
  --DryRun False \
  --HealthCheck '{ \
      "CheckInterval": 0, \
      "HealthyThreshold": 0, \
      "Path": "string", \
      "Port": 0, \
      "Protocol": "string", \
      "Timeout": 0, \
      "UnhealthyThreshold": 0 \
    }' \
  --LoadBalancerName "string" \
  --LoadBalancerPort 0 \
  --PolicyNames '["string"]' \
  --PublicIp "string" \
  --SecuredCookies True \
  --SecurityGroups '["string"]' \
  --ServerCertificateId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateLoadBalancer \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "DryRun": false,
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "LoadBalancerName": "string",
    "LoadBalancerPort": 0,
    "PolicyNames": ["string"],
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": ["string"],
    "ServerCertificateId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateLoadBalancer(
    AccessLog={ 
        "IsEnabled": True, 
        "OsuBucketName": "string", 
        "OsuBucketPrefix": "string", 
        "PublicationInterval": 0 
    },
    HealthCheck={ 
        "CheckInterval": 0, 
        "HealthyThreshold": 0, 
        "Path": "string", 
        "Port": 0, 
        "Protocol": "string", 
        "Timeout": 0, 
        "UnhealthyThreshold": 0 
    },
    LoadBalancerName="string",
    LoadBalancerPort=0,
    PolicyNames=["string"],
    PublicIp="string",
    SecuredCookies=True,
    SecurityGroups=["string"],
    ServerCertificateId="string",
)
print(result)

Parameters

Parameter Type Required Description
AccessLog AccessLog false Information about access logs.
» IsEnabled boolean false 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 false The name of the OOS bucket for the access logs.
» OsuBucketPrefix string false The path to the folder of the access logs in your OOS bucket (by default, the root level of your bucket).
» PublicationInterval integer false The time interval for the publication of access logs in the OOS bucket, in minutes. This value can be either 5 or 60 (by default, 60).
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
HealthCheck HealthCheck false Information about the health check configuration.
» CheckInterval integer true The number of seconds between two pings (between 5 and 600 both included).
» HealthyThreshold integer true The number of consecutive successful pings before considering the VM as healthy (between 2 and 10 both included).
» Path string false If you use the HTTP or HTTPS protocols, the ping path.
» Port integer true The port number (between 1 and 65535, both included).
» Protocol string true The protocol for the URL of the VM (HTTP | HTTPS | TCP | SSL).
» Timeout integer true The maximum waiting time for a response before considering the VM as unhealthy, in seconds (between 2 and 60 both included).
» UnhealthyThreshold integer true The number of consecutive failed pings before considering the VM as unhealthy (between 2 and 10 both included).
LoadBalancerName string true The name of the load balancer.
LoadBalancerPort integer false The port on which the load balancer is listening (between 1 and 65535, both included). This parameter is required if you want to update the server certificate.
PolicyNames [string] false The name of the policy you want to enable for the listener.
PublicIp string false (internet-facing only) The public IP you want to associate with the load balancer. The former public IP of the load balancer is then disassociated. If you specify an empty string and the former public IP belonged to you, it is disassociated and replaced by a public IP owned by 3DS OUTSCALE.
SecuredCookies boolean false If true, secure cookies are enabled for the load balancer.
SecurityGroups [string] false (Net only) One or more IDs of security groups you want to assign to the load balancer. You need to specify the already assigned security groups that you want to keep along with the new ones you are assigning. If the list is empty, the default security group of the Net is assigned to the load balancer.
ServerCertificateId string false The Outscale Resource Name (ORN) of the server certificate. For more information, see Resource Identifiers > Outscale Resource Names (ORNs). If this parameter is specified, you must also specify the LoadBalancerPort parameter.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). UpdateLoadBalancerResponse

Example responses

200 Response

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

LoadBalancerPolicy

CreateLoadBalancerPolicy

POST /CreateLoadBalancerPolicy

Creates a stickiness policy with sticky session lifetimes defined by the browser lifetime.
The created policy can be used with HTTP or HTTPS listeners only.
If this policy is implemented by a load balancer, this load balancer uses this cookie in all incoming requests to direct them to the specified back-end server virtual machine (VM). If this cookie is not present, the load balancer sends the request to any other server according to its load-balancing algorithm.

You can also create a stickiness policy with sticky session lifetimes following the lifetime of an application-generated cookie.
Unlike the other type of stickiness policy, the lifetime of the special Load Balancer Unit (LBU) cookie follows the lifetime of the application-generated cookie specified in the policy configuration. The load balancer inserts a new stickiness cookie only when the application response includes a new application cookie.
The session stops being sticky if the application cookie is removed or expires, until a new application cookie is issued.

Code samples

osc-cli api CreateLoadBalancerPolicy --profile "default" \
  --CookieExpirationPeriod 0 \
  --CookieName "string" \
  --DryRun False \
  --LoadBalancerName "string" \
  --PolicyName "string" \
  --PolicyType "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateLoadBalancerPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "CookieExpirationPeriod": 0,
    "CookieName": "string",
    "DryRun": false,
    "LoadBalancerName": "string",
    "PolicyName": "string",
    "PolicyType": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateLoadBalancerPolicy(
    CookieExpirationPeriod=0,
    CookieName="string",
    LoadBalancerName="string",
    PolicyName="string",
    PolicyType="string",
)
print(result)

Parameters

Parameter Type Required Description
CookieExpirationPeriod integer false The lifetime of the cookie, in seconds. If not specified, the default value of this parameter is 1, which means that the sticky session lasts for the duration of the browser session.
CookieName string false The name of the application cookie used for stickiness. This parameter is required if you create a stickiness policy based on an application-generated cookie.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerName string true The name of the load balancer for which you want to create a policy.
PolicyName string true The name of the policy. This name must be unique and consist of alphanumeric characters and dashes (-).
PolicyType string true The type of stickiness policy you want to create: app or load_balancer.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). CreateLoadBalancerPolicyResponse

Example responses

200 Response

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteLoadBalancerPolicy

POST /DeleteLoadBalancerPolicy

Deletes a specified policy from a load balancer.
In order to be deleted, the policy must not be enabled for any listener.

Code samples

osc-cli api DeleteLoadBalancerPolicy --profile "default" \
  --DryRun False \
  --LoadBalancerName "string" \
  --PolicyName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteLoadBalancerPolicy \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "LoadBalancerName": "string",
    "PolicyName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteLoadBalancerPolicy(
    LoadBalancerName="string",
    PolicyName="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LoadBalancerName string true The name of the load balancer for which you want to delete a policy.
PolicyName string true The name of the policy you want to delete.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). DeleteLoadBalancerPolicyResponse

Example responses

200 Response

{
  "LoadBalancer": {
    "AccessLog": {
      "IsEnabled": true,
      "OsuBucketName": "string",
      "OsuBucketPrefix": "string",
      "PublicationInterval": 0
    },
    "ApplicationStickyCookiePolicies": [
      {
        "CookieName": "string",
        "PolicyName": "string"
      }
    ],
    "BackendIps": [
      "string"
    ],
    "BackendVmIds": [
      "string"
    ],
    "DnsName": "string",
    "HealthCheck": {
      "CheckInterval": 0,
      "HealthyThreshold": 0,
      "Path": "string",
      "Port": 0,
      "Protocol": "string",
      "Timeout": 0,
      "UnhealthyThreshold": 0
    },
    "Listeners": [
      {
        "BackendPort": 0,
        "BackendProtocol": "string",
        "LoadBalancerPort": 0,
        "LoadBalancerProtocol": "string",
        "PolicyNames": [
          "string"
        ],
        "ServerCertificateId": "string"
      }
    ],
    "LoadBalancerName": "string",
    "LoadBalancerStickyCookiePolicies": [
      {
        "CookieExpirationPeriod": 0,
        "PolicyName": "string"
      }
    ],
    "LoadBalancerType": "string",
    "NetId": "string",
    "PublicIp": "string",
    "SecuredCookies": true,
    "SecurityGroups": [
      "string"
    ],
    "SourceSecurityGroup": {
      "SecurityGroupAccountId": "string",
      "SecurityGroupName": "string"
    },
    "Subnets": [
      "string"
    ],
    "SubregionNames": [
      "string"
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

Location

ReadLocations

POST /ReadLocations

Lists the locations, corresponding to datacenters, where you can set up a DirectLink.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the Throttling error message is returned.

Code samples

osc-cli api ReadLocations --profile "default" \
  --DryRun False

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadLocations()
print(result)

Parameters

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

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadLocationsResponse

Example responses

200 Response

{
  "Locations": [
    {
      "Code": "string",
      "Name": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

NatService

CreateNatService

POST /CreateNatService

Creates a network address translation (NAT) service in the specified public Subnet of a Net.
A NAT service enables virtual machines (VMs) placed in the private Subnet of this Net to connect to the Internet, without being accessible from the Internet.
When creating a NAT service, you specify the allocation ID of the public IP you want to use as public IP for the NAT service. Once the NAT service is created, you need to create a route in the route table of the private Subnet, with 0.0.0.0/0 as destination and the ID of the NAT service as target. For more information, see LinkPublicIP and CreateRoute.
This action also enables you to create multiple NAT services in the same Net (one per public Subnet).

[NOTE]
You cannot modify the public IP associated with a NAT service after its creation. To do so, you need to delete the NAT service and create a new one with another public IP.

Code samples

osc-cli api CreateNatService --profile "default" \
  --DryRun False \
  --PublicIpId "string" \
  --SubnetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNatService \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "PublicIpId": "string",
    "SubnetId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateNatService(
    PublicIpId="string",
    SubnetId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
PublicIpId string true The allocation ID of the public IP to associate with the NAT service.
If the public IP is already associated with another resource, you must first disassociate it.
SubnetId string true The ID of the Subnet in which you want to create the NAT service.

Responses

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

Example responses

200 Response

{
  "NatService": {
    "NatServiceId": "string",
    "NetId": "string",
    "PublicIps": [
      {
        "PublicIp": "string",
        "PublicIpId": "string"
      }
    ],
    "State": "string",
    "SubnetId": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteNatService

POST /DeleteNatService

Deletes a specified network address translation (NAT) service.
This action disassociates the public IP from the NAT service, but does not release this public IP from your account. However, it does not delete any NAT service routes in your route tables.

Code samples

osc-cli api DeleteNatService --profile "default" \
  --DryRun False \
  --NatServiceId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteNatService(
    NatServiceId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NatServiceId string true The ID of the NAT service you want to delete.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadNatServices

POST /ReadNatServices

Lists one or more network address translation (NAT) services.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadNatServices --profile "default" \
  --DryRun False \
  --Filters '{ \
      "NatServiceIds": ["string"], \
      "NetIds": ["string"], \
      "States": ["string"], \
      "SubnetIds": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNatServices \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "NatServiceIds": ["string"],
      "NetIds": ["string"],
      "States": ["string"],
      "SubnetIds": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadNatServices(
    Filters={ 
        "NatServiceIds": ["string"], 
        "NetIds": ["string"], 
        "States": ["string"], 
        "SubnetIds": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersNatService false One or more filters.
» NatServiceIds [string] false The IDs of the NAT services.
» NetIds [string] false The IDs of the Nets in which the NAT services are.
» States [string] false The states of the NAT services (pending | available | deleting | deleted).
» SubnetIds [string] false The IDs of the Subnets in which the NAT services are.
» TagKeys [string] false The keys of the tags associated with the NAT services.
» TagValues [string] false The values of the tags associated with the NAT services.
» Tags [string] false The key/value combination of the tags associated with the NAT services, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

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

Example responses

200 Response

{
  "NatServices": [
    {
      "NatServiceId": "string",
      "NetId": "string",
      "PublicIps": [
        {
          "PublicIp": "string",
          "PublicIpId": "string"
        }
      ],
      "State": "string",
      "SubnetId": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

Net

CreateNet

POST /CreateNet

Creates a Net with a specified IP range.
The IP range (network range) of your Net must be between a /28 netmask (16 IPs) and a /16 netmask (65536 IPs).

Code samples

osc-cli api CreateNet --profile "default" \
  --DryRun False \
  --IpRange "string" \
  --Tenancy "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNet \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "IpRange": "string",
    "Tenancy": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateNet(
    IpRange="string",
    Tenancy="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
IpRange string true The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).
Tenancy string false The tenancy options for the VMs (default if a VM created in a Net can be launched with any tenancy, dedicated if it can be launched with dedicated tenancy VMs running on single-tenant hardware).

Responses

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

Example responses

200 Response

{
  "Net": {
    "DhcpOptionsSetId": "string",
    "IpRange": "string",
    "NetId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "Tenancy": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteNet

POST /DeleteNet

Deletes a specified Net.
Before deleting the Net, you need to delete or detach all the resources associated with the Net:

Code samples

osc-cli api DeleteNet --profile "default" \
  --DryRun False \
  --NetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteNet(
    NetId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetId string true The ID of the Net you want to delete.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadNets

POST /ReadNets

Lists one or more Nets.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadNets --profile "default" \
  --DryRun False \
  --Filters '{ \
      "DhcpOptionsSetIds": ["string"], \
      "IpRanges": ["string"], \
      "IsDefault": True, \
      "NetIds": ["string"], \
      "States": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNets \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "DhcpOptionsSetIds": ["string"],
      "IpRanges": ["string"],
      "IsDefault": true,
      "NetIds": ["string"],
      "States": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadNets(
    Filters={ 
        "DhcpOptionsSetIds": ["string"], 
        "IpRanges": ["string"], 
        "IsDefault": True, 
        "NetIds": ["string"], 
        "States": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersNet false One or more filters.
» DhcpOptionsSetIds [string] false The IDs of the DHCP options sets.
» IpRanges [string] false The IP ranges for the Nets, in CIDR notation (for example, 10.0.0.0/16).
» IsDefault boolean false If true, the Net used is the default one.
» NetIds [string] false The IDs of the Nets.
» States [string] false The states of the Nets (pending | available | deleted).
» TagKeys [string] false The keys of the tags associated with the Nets.
» TagValues [string] false The values of the tags associated with the Nets.
» Tags [string] false The key/value combination of the tags associated with the Nets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

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

Example responses

200 Response

{
  "Nets": [
    {
      "DhcpOptionsSetId": "string",
      "IpRange": "string",
      "NetId": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "Tenancy": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateNet

POST /UpdateNet

Associates a DHCP options set with a specified Net.

Code samples

osc-cli api UpdateNet --profile "default" \
  --DhcpOptionsSetId "string" \
  --DryRun False \
  --NetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateNet \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DhcpOptionsSetId": "string",
    "DryRun": false,
    "NetId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateNet(
    DhcpOptionsSetId="string",
    NetId="string",
)
print(result)

Parameters

Parameter Type Required Description
DhcpOptionsSetId string true The ID of the DHCP options set (or default if you want to associate the default one).
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetId string true The ID of the Net.

Responses

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

Example responses

200 Response

{
  "Net": {
    "DhcpOptionsSetId": "string",
    "IpRange": "string",
    "NetId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "Tenancy": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

NetAccessPoint

CreateNetAccessPoint

POST /CreateNetAccessPoint

Creates a Net access point to access an OUTSCALE service from this Net without using the Internet and public IPs.
You specify the service using its name. For more information about the available services, see ReadNetAccessPointServices.
To control the routing of traffic between the Net and the specified service, you can specify one or more route tables. Virtual machines placed in Subnets associated with the specified route table thus use the Net access point to access the service. When you specify a route table, a route is automatically added to it with the destination set to the prefix list ID of the service, and the target set to the ID of the access point.

Code samples

osc-cli api CreateNetAccessPoint --profile "default" \
  --DryRun False \
  --NetId "string" \
  --RouteTableIds '["string"]' \
  --ServiceName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNetAccessPoint \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "NetId": "string",
    "RouteTableIds": ["string"],
    "ServiceName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateNetAccessPoint(
    NetId="string",
    RouteTableIds=["string"],
    ServiceName="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetId string true The ID of the Net.
RouteTableIds [string] false One or more IDs of route tables to use for the connection.
ServiceName string true The name of the service (in the format com.outscale.region.service).

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). CreateNetAccessPointResponse

Example responses

200 Response

{
  "NetAccessPoint": {
    "NetAccessPointId": "string",
    "NetId": "string",
    "RouteTableIds": [
      "string"
    ],
    "ServiceName": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteNetAccessPoint

POST /DeleteNetAccessPoint

Deletes a specified Net access point.
This action also deletes the corresponding routes added to the route tables you specified for the Net access point.

Code samples

osc-cli api DeleteNetAccessPoint --profile "default" \
  --DryRun False \
  --NetAccessPointId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteNetAccessPoint(
    NetAccessPointId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetAccessPointId string true The ID of the Net access point.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). DeleteNetAccessPointResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadNetAccessPointServices

POST /ReadNetAccessPointServices

Lists OUTSCALE services available to create Net access points.
For more information, see CreateNetAccessPoint.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadNetAccessPointServices --profile "default" \
  --DryRun False \
  --Filters '{ \
      "ServiceIds": ["string"], \
      "ServiceNames": ["string"] \
    }'

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNetAccessPointServices \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "ServiceIds": ["string"],
      "ServiceNames": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadNetAccessPointServices(
    Filters={ 
        "ServiceIds": ["string"], 
        "ServiceNames": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersService false One or more filters.
» ServiceIds [string] false The IDs of the services.
» ServiceNames [string] false The names of the services.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadNetAccessPointServicesResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Services": [
    {
      "IpRanges": [
        "string"
      ],
      "ServiceId": "string",
      "ServiceName": "string"
    }
  ]
}

ReadNetAccessPoints

POST /ReadNetAccessPoints

Lists one or more Net access points.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadNetAccessPoints --profile "default" \
  --DryRun False \
  --Filters '{ \
      "NetAccessPointIds": ["string"], \
      "NetIds": ["string"], \
      "ServiceNames": ["string"], \
      "States": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNetAccessPoints \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "NetAccessPointIds": ["string"],
      "NetIds": ["string"],
      "ServiceNames": ["string"],
      "States": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadNetAccessPoints(
    Filters={ 
        "NetAccessPointIds": ["string"], 
        "NetIds": ["string"], 
        "ServiceNames": ["string"], 
        "States": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersNetAccessPoint false One or more filters.
» NetAccessPointIds [string] false The IDs of the Net access points.
» NetIds [string] false The IDs of the Nets.
» ServiceNames [string] false The names of the services. For more information, see ReadNetAccessPointServices.
» States [string] false The states of the Net access points (pending | available | deleting | deleted).
» TagKeys [string] false The keys of the tags associated with the Net access points.
» TagValues [string] false The values of the tags associated with the Net access points.
» Tags [string] false The key/value combination of the tags associated with the Net access points, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadNetAccessPointsResponse

Example responses

200 Response

{
  "NetAccessPoints": [
    {
      "NetAccessPointId": "string",
      "NetId": "string",
      "RouteTableIds": [
        "string"
      ],
      "ServiceName": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateNetAccessPoint

POST /UpdateNetAccessPoint

Modifies the attributes of a Net access point.
This action enables you to add or remove route tables associated with the specified Net access point.

Code samples

osc-cli api UpdateNetAccessPoint --profile "default" \
  --AddRouteTableIds '["string"]' \
  --DryRun False \
  --NetAccessPointId "string" \
  --RemoveRouteTableIds '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateNetAccessPoint \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AddRouteTableIds": ["string"],
    "DryRun": false,
    "NetAccessPointId": "string",
    "RemoveRouteTableIds": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateNetAccessPoint(
    AddRouteTableIds=["string"],
    NetAccessPointId="string",
    RemoveRouteTableIds=["string"],
)
print(result)

Parameters

Parameter Type Required Description
AddRouteTableIds [string] false One or more IDs of route tables to associate with the specified Net access point.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetAccessPointId string true The ID of the Net access point.
RemoveRouteTableIds [string] false One or more IDs of route tables to disassociate from the specified Net access point.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). UpdateNetAccessPointResponse

Example responses

200 Response

{
  "NetAccessPoint": {
    "NetAccessPointId": "string",
    "NetId": "string",
    "RouteTableIds": [
      "string"
    ],
    "ServiceName": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

NetPeering

AcceptNetPeering

POST /AcceptNetPeering

Accepts a Net peering request.
To accept this request, you must be the owner of the peer Net. If you do not accept the request within 7 days, the state of the Net peering becomes expired.

[NOTE]
A peering connection between two Nets works both ways. Therefore, when an A-to-B peering connection is accepted, any pending B-to-A peering connection is automatically rejected as redundant.

Code samples

osc-cli api AcceptNetPeering --profile "default" \
  --DryRun False \
  --NetPeeringId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.AcceptNetPeering(
    NetPeeringId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetPeeringId string true The ID of the Net peering you want to accept.

Responses

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

Example responses

200 Response

{
  "NetPeering": {
    "AccepterNet": {
      "AccountId": "string",
      "IpRange": "string",
      "NetId": "string"
    },
    "NetPeeringId": "string",
    "SourceNet": {
      "AccountId": "string",
      "IpRange": "string",
      "NetId": "string"
    },
    "State": {
      "Message": "string",
      "Name": "string"
    },
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

CreateNetPeering

POST /CreateNetPeering

Requests a Net peering between a Net you own and a peer Net that belongs to you or another account.
This action creates a Net peering that remains in the pending-acceptance state until it is accepted by the owner of the peer Net. If the owner of the peer Net does not accept the request within 7 days, the state of the Net peering becomes expired. For more information, see AcceptNetPeering.

[NOTE]

Code samples

osc-cli api CreateNetPeering --profile "default" \
  --AccepterNetId "string" \
  --DryRun False \
  --SourceNetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNetPeering \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AccepterNetId": "string",
    "DryRun": false,
    "SourceNetId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateNetPeering(
    AccepterNetId="string",
    SourceNetId="string",
)
print(result)

Parameters

Parameter Type Required Description
AccepterNetId string true The ID of the Net you want to connect with.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
SourceNetId string true The ID of the Net you send the peering request from.

Responses

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

Example responses

200 Response

{
  "NetPeering": {
    "AccepterNet": {
      "AccountId": "string",
      "IpRange": "string",
      "NetId": "string"
    },
    "NetPeeringId": "string",
    "SourceNet": {
      "AccountId": "string",
      "IpRange": "string",
      "NetId": "string"
    },
    "State": {
      "Message": "string",
      "Name": "string"
    },
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteNetPeering

POST /DeleteNetPeering

Deletes a Net peering.
If the Net peering is in the active state, it can be deleted either by the owner of the requester Net or the owner of the peer Net.
If it is in the pending-acceptance state, it can be deleted only by the owner of the requester Net.
If it is in the rejected, failed, or expired states, it cannot be deleted.

Code samples

osc-cli api DeleteNetPeering --profile "default" \
  --DryRun False \
  --NetPeeringId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteNetPeering(
    NetPeeringId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetPeeringId string true The ID of the Net peering you want to delete.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadNetPeerings

POST /ReadNetPeerings

Lists one or more peering connections between two Nets.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadNetPeerings --profile "default" \
  --DryRun False \
  --Filters '{ \
      "AccepterNetAccountIds": ["string"], \
      "AccepterNetIpRanges": ["string"], \
      "AccepterNetNetIds": ["string"], \
      "NetPeeringIds": ["string"], \
      "SourceNetAccountIds": ["string"], \
      "SourceNetIpRanges": ["string"], \
      "SourceNetNetIds": ["string"], \
      "StateMessages": ["string"], \
      "StateNames": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNetPeerings \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "AccepterNetAccountIds": ["string"],
      "AccepterNetIpRanges": ["string"],
      "AccepterNetNetIds": ["string"],
      "NetPeeringIds": ["string"],
      "SourceNetAccountIds": ["string"],
      "SourceNetIpRanges": ["string"],
      "SourceNetNetIds": ["string"],
      "StateMessages": ["string"],
      "StateNames": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadNetPeerings(
    Filters={ 
        "AccepterNetAccountIds": ["string"], 
        "AccepterNetIpRanges": ["string"], 
        "AccepterNetNetIds": ["string"], 
        "NetPeeringIds": ["string"], 
        "SourceNetAccountIds": ["string"], 
        "SourceNetIpRanges": ["string"], 
        "SourceNetNetIds": ["string"], 
        "StateMessages": ["string"], 
        "StateNames": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersNetPeering false One or more filters.
» AccepterNetAccountIds [string] false The account IDs of the owners of the peer Nets.
» AccepterNetIpRanges [string] false The IP ranges of the peer Nets, in CIDR notation (for example, 10.0.0.0/24).
» AccepterNetNetIds [string] false The IDs of the peer Nets.
» NetPeeringIds [string] false The IDs of the Net peerings.
» SourceNetAccountIds [string] false The account IDs of the owners of the peer Nets.
» SourceNetIpRanges [string] false The IP ranges of the peer Nets.
» SourceNetNetIds [string] false The IDs of the peer Nets.
» StateMessages [string] false Additional information about the states of the Net peerings.
» StateNames [string] false The states of the Net peerings (pending-acceptance | active | rejected | failed | expired | deleted).
» TagKeys [string] false The keys of the tags associated with the Net peerings.
» TagValues [string] false The values of the tags associated with the Net peerings.
» Tags [string] false The key/value combination of the tags associated with the Net peerings, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

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

Example responses

200 Response

{
  "NetPeerings": [
    {
      "AccepterNet": {
        "AccountId": "string",
        "IpRange": "string",
        "NetId": "string"
      },
      "NetPeeringId": "string",
      "SourceNet": {
        "AccountId": "string",
        "IpRange": "string",
        "NetId": "string"
      },
      "State": {
        "Message": "string",
        "Name": "string"
      },
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

RejectNetPeering

POST /RejectNetPeering

Rejects a Net peering request.
The Net peering must be in the pending-acceptance state to be rejected. The rejected Net peering is then in the rejected state.

Code samples

osc-cli api RejectNetPeering --profile "default" \
  --DryRun False \
  --NetPeeringId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.RejectNetPeering(
    NetPeeringId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetPeeringId string true The ID of the Net peering you want to reject.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

Nic

CreateNic

POST /CreateNic

Creates a network interface card (NIC) in the specified Subnet.

Code samples

osc-cli api CreateNic --profile "default" \
  --Description "string" \
  --DryRun False \
  --PrivateIps '[ \
      { \
        "IsPrimary": True, \
        "PrivateIp": "string" \
      } \
    ]' \
  --SecurityGroupIds '["string"]' \
  --SubnetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Description": "string",
    "DryRun": false,
    "PrivateIps": [
      {
        "IsPrimary": true,
        "PrivateIp": "string"
      }
    ],
    "SecurityGroupIds": ["string"],
    "SubnetId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateNic(
    Description="string",
    PrivateIps=[ 
        { 
            "IsPrimary": True, 
            "PrivateIp": "string" 
        } 
    ],
    SecurityGroupIds=["string"],
    SubnetId="string",
)
print(result)

Parameters

Parameter Type Required Description
Description string false A description for the NIC.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
PrivateIps [PrivateIpLight] false The primary private IP for the NIC.
This IP must be within the IP range of the Subnet that you specify with the SubnetId attribute.
If you do not specify this attribute, a random private IP is selected within the IP range of the Subnet.
» IsPrimary boolean false If true, the IP is the primary private IP of the NIC.
» PrivateIp string false The private IP of the NIC.
SecurityGroupIds [string] false One or more IDs of security groups for the NIC.
SubnetId string true The ID of the Subnet in which you want to create the NIC.

Responses

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

Example responses

200 Response

{
  "Nic": {
    "AccountId": "string",
    "Description": "string",
    "IsSourceDestChecked": true,
    "LinkNic": {
      "DeleteOnVmDeletion": true,
      "DeviceNumber": 0,
      "LinkNicId": "string",
      "State": "string",
      "VmAccountId": "string",
      "VmId": "string"
    },
    "LinkPublicIp": {
      "LinkPublicIpId": "string",
      "PublicDnsName": "string",
      "PublicIp": "string",
      "PublicIpAccountId": "string",
      "PublicIpId": "string"
    },
    "MacAddress": "string",
    "NetId": "string",
    "NicId": "string",
    "PrivateDnsName": "string",
    "PrivateIps": [
      {
        "IsPrimary": true,
        "LinkPublicIp": {
          "LinkPublicIpId": "string",
          "PublicDnsName": "string",
          "PublicIp": "string",
          "PublicIpAccountId": "string",
          "PublicIpId": "string"
        },
        "PrivateDnsName": "string",
        "PrivateIp": "string"
      }
    ],
    "SecurityGroups": [
      {
        "SecurityGroupId": "string",
        "SecurityGroupName": "string"
      }
    ],
    "State": "string",
    "SubnetId": "string",
    "SubregionName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteNic

POST /DeleteNic

Deletes the specified network interface card (NIC).
The network interface must not be attached to any virtual machine (VM).

Code samples

osc-cli api DeleteNic --profile "default" \
  --DryRun False \
  --NicId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteNic(
    NicId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NicId string true The ID of the NIC you want to delete.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkNic

POST /LinkNic

Attaches a network interface card (NIC) to a virtual machine (VM).
The interface and the VM must be in the same Subregion. The VM can be either running or stopped. The NIC must be in the available state. For more information, see Attaching an FNI to an Instance.

Code samples

osc-cli api LinkNic --profile "default" \
  --DeviceNumber 0 \
  --DryRun False \
  --NicId "string" \
  --VmId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DeviceNumber": 0,
    "DryRun": false,
    "NicId": "string",
    "VmId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.LinkNic(
    DeviceNumber=0,
    NicId="string",
    VmId="string",
)
print(result)

Parameters

Parameter Type Required Description
DeviceNumber integer true The index of the VM device for the NIC attachment (between 1 and 7, both included).
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NicId string true The ID of the NIC you want to attach.
VmId string true The ID of the VM to which you want to attach the NIC.

Responses

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

Example responses

200 Response

{
  "LinkNicId": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkPrivateIps

POST /LinkPrivateIps

Assigns one or more secondary private IPs to a specified network interface card (NIC). This action is only available in a Net. The private IPs to be assigned can be added individually using the PrivateIps parameter, or you can specify the number of private IPs to be automatically chosen within the Subnet range using the SecondaryPrivateIpCount parameter. You can specify only one of these two parameters. If none of these parameters are specified, a private IP is chosen within the Subnet range.

Code samples

osc-cli api LinkPrivateIps --profile "default" \
  --AllowRelink True \
  --DryRun False \
  --NicId "string" \
  --PrivateIps '["string"]' \
  --SecondaryPrivateIpCount 0

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkPrivateIps \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AllowRelink": true,
    "DryRun": false,
    "NicId": "string",
    "PrivateIps": ["string"],
    "SecondaryPrivateIpCount": 0
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.LinkPrivateIps(
    AllowRelink=True,
    NicId="string",
    PrivateIps=["string"],
    SecondaryPrivateIpCount=0,
)
print(result)

Parameters

Parameter Type Required Description
AllowRelink boolean false If true, allows an IP that is already assigned to another NIC in the same Subnet to be assigned to the NIC you specified.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NicId string true The ID of the NIC.
PrivateIps [string] false The secondary private IP or IPs you want to assign to the NIC within the IP range of the Subnet.
SecondaryPrivateIpCount integer false The number of secondary private IPs to assign to the NIC.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadNics

POST /ReadNics

Lists one or more network interface cards (NICs).
A NIC is a virtual network interface that you can attach to a virtual machine (VM) in a Net.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadNics --profile "default" \
  --DryRun False \
  --Filters '{ \
      "Descriptions": ["string"], \
      "IsSourceDestCheck": True, \
      "LinkNicDeleteOnVmDeletion": True, \
      "LinkNicDeviceNumbers": [0], \
      "LinkNicLinkNicIds": ["string"], \
      "LinkNicStates": ["string"], \
      "LinkNicVmAccountIds": ["string"], \
      "LinkNicVmIds": ["string"], \
      "LinkPublicIpAccountIds": ["string"], \
      "LinkPublicIpLinkPublicIpIds": ["string"], \
      "LinkPublicIpPublicIpIds": ["string"], \
      "LinkPublicIpPublicIps": ["string"], \
      "MacAddresses": ["string"], \
      "NetIds": ["string"], \
      "NicIds": ["string"], \
      "PrivateDnsNames": ["string"], \
      "PrivateIpsLinkPublicIpAccountIds": ["string"], \
      "PrivateIpsLinkPublicIpPublicIps": ["string"], \
      "PrivateIpsPrimaryIp": True, \
      "PrivateIpsPrivateIps": ["string"], \
      "SecurityGroupIds": ["string"], \
      "SecurityGroupNames": ["string"], \
      "States": ["string"], \
      "SubnetIds": ["string"], \
      "SubregionNames": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadNics \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "Descriptions": ["string"],
      "IsSourceDestCheck": true,
      "LinkNicDeleteOnVmDeletion": true,
      "LinkNicDeviceNumbers": [0],
      "LinkNicLinkNicIds": ["string"],
      "LinkNicStates": ["string"],
      "LinkNicVmAccountIds": ["string"],
      "LinkNicVmIds": ["string"],
      "LinkPublicIpAccountIds": ["string"],
      "LinkPublicIpLinkPublicIpIds": ["string"],
      "LinkPublicIpPublicIpIds": ["string"],
      "LinkPublicIpPublicIps": ["string"],
      "MacAddresses": ["string"],
      "NetIds": ["string"],
      "NicIds": ["string"],
      "PrivateDnsNames": ["string"],
      "PrivateIpsLinkPublicIpAccountIds": ["string"],
      "PrivateIpsLinkPublicIpPublicIps": ["string"],
      "PrivateIpsPrimaryIp": true,
      "PrivateIpsPrivateIps": ["string"],
      "SecurityGroupIds": ["string"],
      "SecurityGroupNames": ["string"],
      "States": ["string"],
      "SubnetIds": ["string"],
      "SubregionNames": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadNics(
    Filters={ 
        "Descriptions": ["string"], 
        "IsSourceDestCheck": True, 
        "LinkNicDeleteOnVmDeletion": True, 
        "LinkNicDeviceNumbers": [0], 
        "LinkNicLinkNicIds": ["string"], 
        "LinkNicStates": ["string"], 
        "LinkNicVmAccountIds": ["string"], 
        "LinkNicVmIds": ["string"], 
        "LinkPublicIpAccountIds": ["string"], 
        "LinkPublicIpLinkPublicIpIds": ["string"], 
        "LinkPublicIpPublicIpIds": ["string"], 
        "LinkPublicIpPublicIps": ["string"], 
        "MacAddresses": ["string"], 
        "NetIds": ["string"], 
        "NicIds": ["string"], 
        "PrivateDnsNames": ["string"], 
        "PrivateIpsLinkPublicIpAccountIds": ["string"], 
        "PrivateIpsLinkPublicIpPublicIps": ["string"], 
        "PrivateIpsPrimaryIp": True, 
        "PrivateIpsPrivateIps": ["string"], 
        "SecurityGroupIds": ["string"], 
        "SecurityGroupNames": ["string"], 
        "States": ["string"], 
        "SubnetIds": ["string"], 
        "SubregionNames": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersNic false One or more filters.
» Descriptions [string] false The descriptions of the NICs.
» IsSourceDestCheck boolean false Whether the source/destination checking is enabled (true) or disabled (false).
» LinkNicDeleteOnVmDeletion boolean false Whether the NICs are deleted when the VMs they are attached to are terminated.
» LinkNicDeviceNumbers [integer] false The device numbers the NICs are attached to.
» LinkNicLinkNicIds [string] false The attachment IDs of the NICs.
» LinkNicStates [string] false The states of the attachments.
» LinkNicVmAccountIds [string] false The account IDs of the owners of the VMs the NICs are attached to.
» LinkNicVmIds [string] false The IDs of the VMs the NICs are attached to.
» LinkPublicIpAccountIds [string] false The account IDs of the owners of the public IPs associated with the NICs.
» LinkPublicIpLinkPublicIpIds [string] false The association IDs returned when the public IPs were associated with the NICs.
» LinkPublicIpPublicIpIds [string] false The allocation IDs returned when the public IPs were allocated to their accounts.
» LinkPublicIpPublicIps [string] false The public IPs associated with the NICs.
» MacAddresses [string] false The Media Access Control (MAC) addresses of the NICs.
» NetIds [string] false The IDs of the Nets where the NICs are located.
» NicIds [string] false The IDs of the NICs.
» PrivateDnsNames [string] false The private DNS names associated with the primary private IPs.
» PrivateIpsLinkPublicIpAccountIds [string] false The account IDs of the owner of the public IPs associated with the private IPs.
» PrivateIpsLinkPublicIpPublicIps [string] false The public IPs associated with the private IPs.
» PrivateIpsPrimaryIp boolean false Whether the private IP is the primary IP associated with the NIC.
» PrivateIpsPrivateIps [string] false The private IPs of the NICs.
» SecurityGroupIds [string] false The IDs of the security groups associated with the NICs.
» SecurityGroupNames [string] false The names of the security groups associated with the NICs.
» States [string] false The states of the NICs.
» SubnetIds [string] false The IDs of the Subnets for the NICs.
» SubregionNames [string] false The Subregions where the NICs are located.
» TagKeys [string] false The keys of the tags associated with the NICs.
» TagValues [string] false The values of the tags associated with the NICs.
» Tags [string] false The key/value combination of the tags associated with the NICs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

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

Example responses

200 Response

{
  "Nics": [
    {
      "AccountId": "string",
      "Description": "string",
      "IsSourceDestChecked": true,
      "LinkNic": {
        "DeleteOnVmDeletion": true,
        "DeviceNumber": 0,
        "LinkNicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      },
      "LinkPublicIp": {
        "LinkPublicIpId": "string",
        "PublicDnsName": "string",
        "PublicIp": "string",
        "PublicIpAccountId": "string",
        "PublicIpId": "string"
      },
      "MacAddress": "string",
      "NetId": "string",
      "NicId": "string",
      "PrivateDnsName": "string",
      "PrivateIps": [
        {
          "IsPrimary": true,
          "LinkPublicIp": {
            "LinkPublicIpId": "string",
            "PublicDnsName": "string",
            "PublicIp": "string",
            "PublicIpAccountId": "string",
            "PublicIpId": "string"
          },
          "PrivateDnsName": "string",
          "PrivateIp": "string"
        }
      ],
      "SecurityGroups": [
        {
          "SecurityGroupId": "string",
          "SecurityGroupName": "string"
        }
      ],
      "State": "string",
      "SubnetId": "string",
      "SubregionName": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkNic

POST /UnlinkNic

Detaches a network interface card (NIC) from a virtual machine (VM).
The primary NIC cannot be detached.

Code samples

osc-cli api UnlinkNic --profile "default" \
  --DryRun False \
  --LinkNicId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UnlinkNic(
    LinkNicId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LinkNicId string true The ID of the attachment operation.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkPrivateIps

POST /UnlinkPrivateIps

Unassigns one or more secondary private IPs from a network interface card (NIC).

Code samples

osc-cli api UnlinkPrivateIps --profile "default" \
  --DryRun False \
  --NicId "string" \
  --PrivateIps '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkPrivateIps \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "NicId": "string",
    "PrivateIps": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UnlinkPrivateIps(
    NicId="string",
    PrivateIps=["string"],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NicId string true The ID of the NIC.
PrivateIps [string] true One or more secondary private IPs you want to unassign from the NIC.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateNic

POST /UpdateNic

Modifies the specified network interface card (NIC). You can specify only one attribute at a time.

Code samples

osc-cli api UpdateNic --profile "default" \
  --Description "string" \
  --DryRun False \
  --LinkNic '{ \
      "DeleteOnVmDeletion": True, \
      "LinkNicId": "string" \
    }' \
  --NicId "string" \
  --SecurityGroupIds '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateNic \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Description": "string",
    "DryRun": false,
    "LinkNic": {
      "DeleteOnVmDeletion": true,
      "LinkNicId": "string"
    },
    "NicId": "string",
    "SecurityGroupIds": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateNic(
    Description="string",
    LinkNic={ 
        "DeleteOnVmDeletion": True, 
        "LinkNicId": "string" 
    },
    NicId="string",
    SecurityGroupIds=["string"],
)
print(result)

Parameters

Parameter Type Required Description
Description string false A new description for the NIC.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LinkNic LinkNicToUpdate false Information about the NIC attachment. If you are modifying the DeleteOnVmDeletion attribute, you must specify the ID of the NIC attachment.
» DeleteOnVmDeletion boolean false If true, the NIC is deleted when the VM is terminated. If false, the NIC is detached from the VM.
» LinkNicId string false The ID of the NIC attachment.
NicId string true The ID of the NIC you want to modify.
SecurityGroupIds [string] false One or more IDs of security groups for the NIC.
You must specify at least one group, even if you use the default security group in the Net.

Responses

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

Example responses

200 Response

{
  "Nic": {
    "AccountId": "string",
    "Description": "string",
    "IsSourceDestChecked": true,
    "LinkNic": {
      "DeleteOnVmDeletion": true,
      "DeviceNumber": 0,
      "LinkNicId": "string",
      "State": "string",
      "VmAccountId": "string",
      "VmId": "string"
    },
    "LinkPublicIp": {
      "LinkPublicIpId": "string",
      "PublicDnsName": "string",
      "PublicIp": "string",
      "PublicIpAccountId": "string",
      "PublicIpId": "string"
    },
    "MacAddress": "string",
    "NetId": "string",
    "NicId": "string",
    "PrivateDnsName": "string",
    "PrivateIps": [
      {
        "IsPrimary": true,
        "LinkPublicIp": {
          "LinkPublicIpId": "string",
          "PublicDnsName": "string",
          "PublicIp": "string",
          "PublicIpAccountId": "string",
          "PublicIpId": "string"
        },
        "PrivateDnsName": "string",
        "PrivateIp": "string"
      }
    ],
    "SecurityGroups": [
      {
        "SecurityGroupId": "string",
        "SecurityGroupName": "string"
      }
    ],
    "State": "string",
    "SubnetId": "string",
    "SubregionName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ProductType

ReadProductTypes

POST /ReadProductTypes

Lists one or more product types.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadProductTypes --profile "default" \
  --DryRun False \
  --Filters '{ \
      "ProductTypeIds": ["string"] \
    }'

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadProductTypes \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "ProductTypeIds": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadProductTypes(
    Filters={ 
        "ProductTypeIds": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersProductType false One or more filters.
» ProductTypeIds [string] false The IDs of the product types.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadProductTypesResponse

Example responses

200 Response

{
  "ProductTypes": [
    {
      "Description": "string",
      "ProductTypeId": "string",
      "Vendor": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

PublicCatalog

ReadPublicCatalog

POST /ReadPublicCatalog

Returns the price list of OUTSCALE products and services for the Region specified in the endpoint of the request. For more information, see Regions, Endpoints and Availability Zones Reference.

Code samples

osc-cli api ReadPublicCatalog --profile "default" \
  --DryRun False

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadPublicCatalog()
print(result)

Parameters

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

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadPublicCatalogResponse

Example responses

200 Response

{
  "Catalog": {
    "Entries": [
      {
        "Category": "string",
        "Flags": "string",
        "Operation": "string",
        "Service": "string",
        "SubregionName": "string",
        "Title": "string",
        "Type": "string",
        "UnitPrice": 0
      }
    ]
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

PublicIp

CreatePublicIp

POST /CreatePublicIp

Acquires a public IP for your account.
A public IP is a static IP designed for dynamic Cloud computing. It can be associated with a virtual machine (VM) in the public Cloud or in a Net, a network interface card (NIC), a NAT service.

Code samples

osc-cli api CreatePublicIp --profile "default" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreatePublicIp()
print(result)

Parameters

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

Responses

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

Example responses

200 Response

{
  "PublicIp": {
    "LinkPublicIpId": "string",
    "NicAccountId": "string",
    "NicId": "string",
    "PrivateIp": "string",
    "PublicIp": "string",
    "PublicIpId": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VmId": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeletePublicIp

POST /DeletePublicIp

Releases a public IP.
You can release a public IP associated with your account. This address is released in the public IP pool and can be used by someone else. Before releasing a public IP, ensure you updated all your resources communicating with this address.

Code samples

osc-cli api DeletePublicIp --profile "default" \
  --DryRun False \
  --PublicIp "string" \
  --PublicIpId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeletePublicIp \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "PublicIp": "string",
    "PublicIpId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeletePublicIp(
    PublicIp="string",
    PublicIpId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
PublicIp string false The public IP. In the public Cloud, this parameter is required.
PublicIpId string false The ID representing the association of the public IP with the VM or the NIC. In a Net, this parameter is required.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkPublicIp

POST /LinkPublicIp

Associates a public IP with a virtual machine (VM) or a network interface card (NIC), in the public Cloud or in a Net. You can associate a public IP with only one VM or network interface at a time.
To associate a public IP in a Net, ensure that the Net has an Internet service attached. For more information, see the LinkInternetService method.
By default, the public IP is disassociated every time you stop and start the VM. For a persistent association, you can add the osc.fcu.eip.auto-attach tag to the VM with the public IP as value. For more information, see the CreateTags method.

[NOTE]
You can associate a public IP with a network address translation (NAT) service only when creating the NAT service. To modify its public IP, you need to delete the NAT service and re-create it with the new public IP. For more information, see the CreateNatService method.

Code samples

osc-cli api LinkPublicIp --profile "default" \
  --AllowRelink True \
  --DryRun False \
  --NicId "string" \
  --PrivateIp "string" \
  --PublicIp "string" \
  --PublicIpId "string" \
  --VmId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkPublicIp \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AllowRelink": true,
    "DryRun": false,
    "NicId": "string",
    "PrivateIp": "string",
    "PublicIp": "string",
    "PublicIpId": "string",
    "VmId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.LinkPublicIp(
    AllowRelink=True,
    NicId="string",
    PrivateIp="string",
    PublicIp="string",
    PublicIpId="string",
    VmId="string",
)
print(result)

Parameters

Parameter Type Required Description
AllowRelink boolean false If true, allows the public IP to be associated with the VM or NIC that you specify even if it is already associated with another VM or NIC. If false, prevents the EIP from being associated with the VM or NIC that you specify if it is already associated with another VM or NIC. (By default, true in the public Cloud, false in a Net.)
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NicId string false (Net only) The ID of the NIC. This parameter is required if the VM has more than one NIC attached. Otherwise, you need to specify the VmId parameter instead. You cannot specify both parameters at the same time.
PrivateIp string false (Net only) The primary or secondary private IP of the specified NIC. By default, the primary private IP.
PublicIp string false The public IP. This parameter is required unless you use the PublicIpId parameter.
PublicIpId string false The allocation ID of the public IP. This parameter is required unless you use the PublicIp parameter.
VmId string false The ID of the VM.
- In the public Cloud, this parameter is required.
- In a Net, this parameter is required if the VM has only one NIC. Otherwise, you need to specify the NicId parameter instead. You cannot specify both parameters at the same time.

Responses

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

Example responses

200 Response

{
  "LinkPublicIpId": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadPublicIpRanges

POST /ReadPublicIpRanges

Gets the public IPv4 addresses in CIDR notation for the Region specified in the endpoint of the request. For more information, see Regions, Endpoints and Availability Zones Reference.

Code samples

osc-cli api ReadPublicIpRanges --profile "default" \
  --DryRun False

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadPublicIpRanges()
print(result)

Parameters

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

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadPublicIpRangesResponse

Example responses

200 Response

{
  "PublicIps": [
    "string"
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadPublicIps

POST /ReadPublicIps

Lists one or more public IPs allocated to your account.
By default, this action returns information about all your public IPs: available or associated with a virtual machine (VM), a network interface card (NIC) or a NAT service.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadPublicIps --profile "default" \
  --DryRun False \
  --Filters '{ \
      "LinkPublicIpIds": ["string"], \
      "NicAccountIds": ["string"], \
      "NicIds": ["string"], \
      "Placements": ["string"], \
      "PrivateIps": ["string"], \
      "PublicIpIds": ["string"], \
      "PublicIps": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"], \
      "VmIds": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadPublicIps \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "LinkPublicIpIds": ["string"],
      "NicAccountIds": ["string"],
      "NicIds": ["string"],
      "Placements": ["string"],
      "PrivateIps": ["string"],
      "PublicIpIds": ["string"],
      "PublicIps": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"],
      "VmIds": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadPublicIps(
    Filters={ 
        "LinkPublicIpIds": ["string"], 
        "NicAccountIds": ["string"], 
        "NicIds": ["string"], 
        "Placements": ["string"], 
        "PrivateIps": ["string"], 
        "PublicIpIds": ["string"], 
        "PublicIps": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"], 
        "VmIds": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersPublicIp false One or more filters.
» LinkPublicIpIds [string] false The IDs representing the associations of public IPs with VMs or NICs.
» NicAccountIds [string] false The account IDs of the owners of the NICs.
» NicIds [string] false The IDs of the NICs.
» Placements [string] false Whether the public IPs are for use in the public Cloud or in a Net.
» PrivateIps [string] false The private IPs associated with the public IPs.
» PublicIpIds [string] false The IDs of the public IPs.
» PublicIps [string] false The public IPs.
» TagKeys [string] false The keys of the tags associated with the public IPs.
» TagValues [string] false The values of the tags associated with the public IPs.
» Tags [string] false The key/value combination of the tags associated with the public IPs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» VmIds [string] false The IDs of the VMs.

Responses

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

Example responses

200 Response

{
  "PublicIps": [
    {
      "LinkPublicIpId": "string",
      "NicAccountId": "string",
      "NicId": "string",
      "PrivateIp": "string",
      "PublicIp": "string",
      "PublicIpId": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "VmId": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

UnlinkPublicIp

POST /UnlinkPublicIp

Disassociates a public IP from the virtual machine (VM) or network interface card (NIC) it is associated with.

[NOTE]
To disassociate the public IP from a NAT service, you need to delete the NAT service. For more information, see the DeleteNatService method.

Code samples

osc-cli api UnlinkPublicIp --profile "default" \
  --DryRun False \
  --LinkPublicIpId "string" \
  --PublicIp "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkPublicIp \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "LinkPublicIpId": "string",
    "PublicIp": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UnlinkPublicIp(
    LinkPublicIpId="string",
    PublicIp="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LinkPublicIpId string false The ID representing the association of the public IP with the VM or the NIC. This parameter is required unless you use the PublicIp parameter.
PublicIp string false The public IP. This parameter is required unless you use the LinkPublicIpId parameter.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

Quota

ReadQuotas

POST /ReadQuotas

Lists one or more of your quotas.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadQuotas --profile "default" \
  --DryRun False \
  --Filters '{ \
      "Collections": ["string"], \
      "QuotaNames": ["string"], \
      "QuotaTypes": ["string"], \
      "ShortDescriptions": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadQuotas \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "Collections": ["string"],
      "QuotaNames": ["string"],
      "QuotaTypes": ["string"],
      "ShortDescriptions": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadQuotas(
    Filters={ 
        "Collections": ["string"], 
        "QuotaNames": ["string"], 
        "QuotaTypes": ["string"], 
        "ShortDescriptions": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersQuota false One or more filters.
» Collections [string] false The group names of the quotas.
» QuotaNames [string] false The names of the quotas.
» QuotaTypes [string] false The resource IDs if these are resource-specific quotas, global if they are not.
» ShortDescriptions [string] false The description of the quotas.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadQuotasResponse

Example responses

200 Response

{
  "QuotaTypes": [
    {
      "QuotaType": "string",
      "Quotas": [
        {
          "AccountId": "string",
          "Description": "string",
          "MaxValue": 0,
          "Name": "string",
          "QuotaCollection": "string",
          "ShortDescription": "string",
          "UsedValue": 0
        }
      ]
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

Region

ReadRegions

POST /ReadRegions

Lists one or more Regions of the OUTSCALE Cloud.

Code samples

osc-cli api ReadRegions --profile "default" \
  --DryRun False

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadRegions()
print(result)

Parameters

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

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadRegionsResponse

Example responses

200 Response

{
  "Regions": [
    {
      "Endpoint": "string",
      "RegionName": "string"
    }
  ],
  "ResponseContext": {
    "RequestId": "string"
  }
}

Route

CreateRoute

POST /CreateRoute

Creates a route in a specified route table within a specified Net.
You must specify one of the following elements as the target:

The routing algorithm is based on the most specific match.

Code samples

osc-cli api CreateRoute --profile "default" \
  --DestinationIpRange "string" \
  --DryRun False \
  --GatewayId "string" \
  --NatServiceId "string" \
  --NetPeeringId "string" \
  --NicId "string" \
  --RouteTableId "string" \
  --VmId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateRoute \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DestinationIpRange": "string",
    "DryRun": false,
    "GatewayId": "string",
    "NatServiceId": "string",
    "NetPeeringId": "string",
    "NicId": "string",
    "RouteTableId": "string",
    "VmId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateRoute(
    DestinationIpRange="string",
    GatewayId="string",
    NatServiceId="string",
    NetPeeringId="string",
    NicId="string",
    RouteTableId="string",
    VmId="string",
)
print(result)

Parameters

Parameter Type Required Description
DestinationIpRange string true The IP range used for the destination match, in CIDR notation (for example, 10.0.0.0/24).
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
GatewayId string false The ID of an Internet service or virtual gateway attached to your Net.
NatServiceId string false The ID of a NAT service.
NetPeeringId string false The ID of a Net peering.
NicId string false The ID of a NIC.
RouteTableId string true The ID of the route table for which you want to create a route.
VmId string false The ID of a NAT VM in your Net (attached to exactly one NIC).

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTable": {
    "LinkRouteTables": [
      {
        "LinkRouteTableId": "string",
        "Main": true,
        "RouteTableId": "string",
        "SubnetId": "string"
      }
    ],
    "NetId": "string",
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "string"
      }
    ],
    "RouteTableId": "string",
    "Routes": [
      {
        "CreationMethod": "string",
        "DestinationIpRange": "string",
        "DestinationServiceId": "string",
        "GatewayId": "string",
        "NatServiceId": "string",
        "NetAccessPointId": "string",
        "NetPeeringId": "string",
        "NicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      }
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

DeleteRoute

POST /DeleteRoute

Deletes a route from a specified route table.

Code samples

osc-cli api DeleteRoute --profile "default" \
  --DestinationIpRange "string" \
  --DryRun False \
  --RouteTableId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteRoute \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DestinationIpRange": "string",
    "DryRun": false,
    "RouteTableId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteRoute(
    DestinationIpRange="string",
    RouteTableId="string",
)
print(result)

Parameters

Parameter Type Required Description
DestinationIpRange string true The exact IP range for the route.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
RouteTableId string true The ID of the route table from which you want to delete a route.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTable": {
    "LinkRouteTables": [
      {
        "LinkRouteTableId": "string",
        "Main": true,
        "RouteTableId": "string",
        "SubnetId": "string"
      }
    ],
    "NetId": "string",
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "string"
      }
    ],
    "RouteTableId": "string",
    "Routes": [
      {
        "CreationMethod": "string",
        "DestinationIpRange": "string",
        "DestinationServiceId": "string",
        "GatewayId": "string",
        "NatServiceId": "string",
        "NetAccessPointId": "string",
        "NetPeeringId": "string",
        "NicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      }
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

UpdateRoute

POST /UpdateRoute

Replaces an existing route within a route table in a Net.
You must specify one of the following elements as the target:

The routing algorithm is based on the most specific match.

Code samples

osc-cli api UpdateRoute --profile "default" \
  --DestinationIpRange "string" \
  --DryRun False \
  --GatewayId "string" \
  --NatServiceId "string" \
  --NetPeeringId "string" \
  --NicId "string" \
  --RouteTableId "string" \
  --VmId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateRoute \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DestinationIpRange": "string",
    "DryRun": false,
    "GatewayId": "string",
    "NatServiceId": "string",
    "NetPeeringId": "string",
    "NicId": "string",
    "RouteTableId": "string",
    "VmId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateRoute(
    DestinationIpRange="string",
    GatewayId="string",
    NatServiceId="string",
    NetPeeringId="string",
    NicId="string",
    RouteTableId="string",
    VmId="string",
)
print(result)

Parameters

Parameter Type Required Description
DestinationIpRange string true The IP range used for the destination match, in CIDR notation (for example, 10.0.0.0/24).
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
GatewayId string false The ID of an Internet service or virtual gateway attached to your Net.
NatServiceId string false The ID of a NAT service.
NetPeeringId string false The ID of a Net peering.
NicId string false The ID of a network interface card (NIC).
RouteTableId string true The ID of the route table.
VmId string false The ID of a NAT VM in your Net.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTable": {
    "LinkRouteTables": [
      {
        "LinkRouteTableId": "string",
        "Main": true,
        "RouteTableId": "string",
        "SubnetId": "string"
      }
    ],
    "NetId": "string",
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "string"
      }
    ],
    "RouteTableId": "string",
    "Routes": [
      {
        "CreationMethod": "string",
        "DestinationIpRange": "string",
        "DestinationServiceId": "string",
        "GatewayId": "string",
        "NatServiceId": "string",
        "NetAccessPointId": "string",
        "NetPeeringId": "string",
        "NicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      }
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

RouteTable

CreateRouteTable

POST /CreateRouteTable

Creates a route table for a specified Net.
You can then add routes and associate this route table with a Subnet.

Code samples

osc-cli api CreateRouteTable --profile "default" \
  --DryRun False \
  --NetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateRouteTable(
    NetId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetId string true The ID of the Net for which you want to create a route table.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTable": {
    "LinkRouteTables": [
      {
        "LinkRouteTableId": "string",
        "Main": true,
        "RouteTableId": "string",
        "SubnetId": "string"
      }
    ],
    "NetId": "string",
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "string"
      }
    ],
    "RouteTableId": "string",
    "Routes": [
      {
        "CreationMethod": "string",
        "DestinationIpRange": "string",
        "DestinationServiceId": "string",
        "GatewayId": "string",
        "NatServiceId": "string",
        "NetAccessPointId": "string",
        "NetPeeringId": "string",
        "NicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      }
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

DeleteRouteTable

POST /DeleteRouteTable

Deletes a specified route table.
Before deleting a route table, you must disassociate it from any Subnet. You cannot delete the main route table.

Code samples

osc-cli api DeleteRouteTable --profile "default" \
  --DryRun False \
  --RouteTableId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteRouteTable(
    RouteTableId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
RouteTableId string true The ID of the route table you want to delete.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkRouteTable

POST /LinkRouteTable

Associates a Subnet with a route table.
The Subnet and the route table must be in the same Net. The traffic is routed according to the route table defined within this Net. You can associate a route table with several Subnets.

Code samples

osc-cli api LinkRouteTable --profile "default" \
  --DryRun False \
  --RouteTableId "string" \
  --SubnetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkRouteTable \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "RouteTableId": "string",
    "SubnetId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.LinkRouteTable(
    RouteTableId="string",
    SubnetId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
RouteTableId string true The ID of the route table.
SubnetId string true The ID of the Subnet.

Responses

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

Example responses

200 Response

{
  "LinkRouteTableId": "string",
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadRouteTables

POST /ReadRouteTables

Lists one or more of your route tables.
In your Net, each Subnet must be associated with a route table. If a Subnet is not explicitly associated with a route table, it is implicitly associated with the main route table of the Net.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadRouteTables --profile "default" \
  --DryRun False \
  --Filters '{ \
      "LinkRouteTableIds": ["string"], \
      "LinkRouteTableLinkRouteTableIds": ["string"], \
      "LinkRouteTableMain": True, \
      "LinkSubnetIds": ["string"], \
      "NetIds": ["string"], \
      "RouteCreationMethods": ["string"], \
      "RouteDestinationIpRanges": ["string"], \
      "RouteDestinationServiceIds": ["string"], \
      "RouteGatewayIds": ["string"], \
      "RouteNatServiceIds": ["string"], \
      "RouteNetPeeringIds": ["string"], \
      "RouteStates": ["string"], \
      "RouteTableIds": ["string"], \
      "RouteVmIds": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadRouteTables \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "LinkRouteTableIds": ["string"],
      "LinkRouteTableLinkRouteTableIds": ["string"],
      "LinkRouteTableMain": true,
      "LinkSubnetIds": ["string"],
      "NetIds": ["string"],
      "RouteCreationMethods": ["string"],
      "RouteDestinationIpRanges": ["string"],
      "RouteDestinationServiceIds": ["string"],
      "RouteGatewayIds": ["string"],
      "RouteNatServiceIds": ["string"],
      "RouteNetPeeringIds": ["string"],
      "RouteStates": ["string"],
      "RouteTableIds": ["string"],
      "RouteVmIds": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadRouteTables(
    Filters={ 
        "LinkRouteTableIds": ["string"], 
        "LinkRouteTableLinkRouteTableIds": ["string"], 
        "LinkRouteTableMain": True, 
        "LinkSubnetIds": ["string"], 
        "NetIds": ["string"], 
        "RouteCreationMethods": ["string"], 
        "RouteDestinationIpRanges": ["string"], 
        "RouteDestinationServiceIds": ["string"], 
        "RouteGatewayIds": ["string"], 
        "RouteNatServiceIds": ["string"], 
        "RouteNetPeeringIds": ["string"], 
        "RouteStates": ["string"], 
        "RouteTableIds": ["string"], 
        "RouteVmIds": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersRouteTable false One or more filters.
» LinkRouteTableIds [string] false The IDs of the route tables involved in the associations.
» LinkRouteTableLinkRouteTableIds [string] false The IDs of the associations between the route tables and the Subnets.
» LinkRouteTableMain boolean false If true, the route tables are the main ones for their Nets.
» LinkSubnetIds [string] false The IDs of the Subnets involved in the associations.
» NetIds [string] false The IDs of the Nets for the route tables.
» RouteCreationMethods [string] false The methods used to create a route.
» RouteDestinationIpRanges [string] false The IP ranges specified in routes in the tables.
» RouteDestinationServiceIds [string] false The service IDs specified in routes in the tables.
» RouteGatewayIds [string] false The IDs of the gateways specified in routes in the tables.
» RouteNatServiceIds [string] false The IDs of the NAT services specified in routes in the tables.
» RouteNetPeeringIds [string] false The IDs of the Net peerings specified in routes in the tables.
» RouteStates [string] false The states of routes in the route tables (always active).
» RouteTableIds [string] false The IDs of the route tables.
» RouteVmIds [string] false The IDs of the VMs specified in routes in the tables.
» TagKeys [string] false The keys of the tags associated with the route tables.
» TagValues [string] false The values of the tags associated with the route tables.
» Tags [string] false The key/value combination of the tags associated with the route tables, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTables": [
    {
      "LinkRouteTables": [
        {
          "LinkRouteTableId": "string",
          "Main": true,
          "RouteTableId": "string",
          "SubnetId": "string"
        }
      ],
      "NetId": "string",
      "RoutePropagatingVirtualGateways": [
        {
          "VirtualGatewayId": "string"
        }
      ],
      "RouteTableId": "string",
      "Routes": [
        {
          "CreationMethod": "string",
          "DestinationIpRange": "string",
          "DestinationServiceId": "string",
          "GatewayId": "string",
          "NatServiceId": "string",
          "NetAccessPointId": "string",
          "NetPeeringId": "string",
          "NicId": "string",
          "State": "string",
          "VmAccountId": "string",
          "VmId": "string"
        }
      ],
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ]
}

UnlinkRouteTable

POST /UnlinkRouteTable

Disassociates a Subnet from a route table.
After disassociation, the Subnet can no longer use the routes in this route table, but uses the routes in the main route table of the Net instead.

Code samples

osc-cli api UnlinkRouteTable --profile "default" \
  --DryRun False \
  --LinkRouteTableId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UnlinkRouteTable(
    LinkRouteTableId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
LinkRouteTableId string true The ID of the association between the route table and the Subnet.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

SecurityGroup

CreateSecurityGroup

POST /CreateSecurityGroup

Creates a security group.
This action creates a security group either in the public Cloud or in a specified Net. By default, a default security group for use in the public Cloud and a default security group for use in a Net are created.
When launching a virtual machine (VM), if no security group is explicitly specified, the appropriate default security group is assigned to the VM. Default security groups include a default rule granting VMs network access to each other.
When creating a security group, you specify a name. Two security groups for use in the public Cloud or for use in a Net cannot have the same name.
You can have up to 500 security groups in the public Cloud. You can create up to 500 security groups per Net.
To add or remove rules, use the CreateSecurityGroupRule method.

Code samples

osc-cli api CreateSecurityGroup --profile "default" \
  --Description "string" \
  --DryRun False \
  --NetId "string" \
  --SecurityGroupName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSecurityGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Description": "string",
    "DryRun": false,
    "NetId": "string",
    "SecurityGroupName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateSecurityGroup(
    Description="string",
    NetId="string",
    SecurityGroupName="string",
)
print(result)

Parameters

Parameter Type Required Description
Description string true A description for the security group, with a maximum length of 255 ASCII printable characters.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetId string false The ID of the Net for the security group.
SecurityGroupName string true The name of the security group.
This name must not start with sg-.
This name must be unique and contain between 1 and 255 ASCII characters. Accented letters are not allowed.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SecurityGroup": {
    "AccountId": "string",
    "Description": "string",
    "InboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "NetId": "string",
    "OutboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "SecurityGroupId": "string",
    "SecurityGroupName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

DeleteSecurityGroup

POST /DeleteSecurityGroup

Deletes a specified security group.
You can specify either the name of the security group or its ID.
This action fails if the specified group is associated with a virtual machine (VM) or referenced by another security group.

Code samples

osc-cli api DeleteSecurityGroup --profile "default" \
  --DryRun False \
  --SecurityGroupId "string" \
  --SecurityGroupName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteSecurityGroup \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "SecurityGroupId": "string",
    "SecurityGroupName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteSecurityGroup(
    SecurityGroupId="string",
    SecurityGroupName="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
SecurityGroupId string false The ID of the security group you want to delete.
SecurityGroupName string false The name of the security group.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadSecurityGroups

POST /ReadSecurityGroups

Lists one or more security groups.
You can specify either the name of the security groups or their IDs.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadSecurityGroups --profile "default" \
  --DryRun False \
  --Filters '{ \
      "AccountIds": ["string"], \
      "Descriptions": ["string"], \
      "InboundRuleAccountIds": ["string"], \
      "InboundRuleFromPortRanges": [0], \
      "InboundRuleIpRanges": ["string"], \
      "InboundRuleProtocols": ["string"], \
      "InboundRuleSecurityGroupIds": ["string"], \
      "InboundRuleSecurityGroupNames": ["string"], \
      "InboundRuleToPortRanges": [0], \
      "NetIds": ["string"], \
      "OutboundRuleAccountIds": ["string"], \
      "OutboundRuleFromPortRanges": [0], \
      "OutboundRuleIpRanges": ["string"], \
      "OutboundRuleProtocols": ["string"], \
      "OutboundRuleSecurityGroupIds": ["string"], \
      "OutboundRuleSecurityGroupNames": ["string"], \
      "OutboundRuleToPortRanges": [0], \
      "SecurityGroupIds": ["string"], \
      "SecurityGroupNames": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSecurityGroups \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "AccountIds": ["string"],
      "Descriptions": ["string"],
      "InboundRuleAccountIds": ["string"],
      "InboundRuleFromPortRanges": [0],
      "InboundRuleIpRanges": ["string"],
      "InboundRuleProtocols": ["string"],
      "InboundRuleSecurityGroupIds": ["string"],
      "InboundRuleSecurityGroupNames": ["string"],
      "InboundRuleToPortRanges": [0],
      "NetIds": ["string"],
      "OutboundRuleAccountIds": ["string"],
      "OutboundRuleFromPortRanges": [0],
      "OutboundRuleIpRanges": ["string"],
      "OutboundRuleProtocols": ["string"],
      "OutboundRuleSecurityGroupIds": ["string"],
      "OutboundRuleSecurityGroupNames": ["string"],
      "OutboundRuleToPortRanges": [0],
      "SecurityGroupIds": ["string"],
      "SecurityGroupNames": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadSecurityGroups(
    Filters={ 
        "AccountIds": ["string"], 
        "Descriptions": ["string"], 
        "InboundRuleAccountIds": ["string"], 
        "InboundRuleFromPortRanges": [0], 
        "InboundRuleIpRanges": ["string"], 
        "InboundRuleProtocols": ["string"], 
        "InboundRuleSecurityGroupIds": ["string"], 
        "InboundRuleSecurityGroupNames": ["string"], 
        "InboundRuleToPortRanges": [0], 
        "NetIds": ["string"], 
        "OutboundRuleAccountIds": ["string"], 
        "OutboundRuleFromPortRanges": [0], 
        "OutboundRuleIpRanges": ["string"], 
        "OutboundRuleProtocols": ["string"], 
        "OutboundRuleSecurityGroupIds": ["string"], 
        "OutboundRuleSecurityGroupNames": ["string"], 
        "OutboundRuleToPortRanges": [0], 
        "SecurityGroupIds": ["string"], 
        "SecurityGroupNames": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersSecurityGroup false One or more filters.
» AccountIds [string] false The account IDs of the owners of the security groups.
» Descriptions [string] false The descriptions of the security groups.
» InboundRuleAccountIds [string] false The account IDs that have been granted permissions.
» InboundRuleFromPortRanges [integer] false The beginnings of the port ranges for the TCP and UDP protocols, or the ICMP type numbers.
» InboundRuleIpRanges [string] false The IP ranges that have been granted permissions, in CIDR notation (for example, 10.0.0.0/24).
» InboundRuleProtocols [string] false The IP protocols for the permissions (tcp | udp | icmp, or a protocol number, or -1 for all protocols).
» InboundRuleSecurityGroupIds [string] false The IDs of the security groups that have been granted permissions.
» InboundRuleSecurityGroupNames [string] false The names of the security groups that have been granted permissions.
» InboundRuleToPortRanges [integer] false The ends of the port ranges for the TCP and UDP protocols, or the ICMP code numbers.
» NetIds [string] false The IDs of the Nets specified when the security groups were created.
» OutboundRuleAccountIds [string] false The account IDs that have been granted permissions.
» OutboundRuleFromPortRanges [integer] false The beginnings of the port ranges for the TCP and UDP protocols, or the ICMP type numbers.
» OutboundRuleIpRanges [string] false The IP ranges that have been granted permissions, in CIDR notation (for example, 10.0.0.0/24).
» OutboundRuleProtocols [string] false The IP protocols for the permissions (tcp | udp | icmp, or a protocol number, or -1 for all protocols).
» OutboundRuleSecurityGroupIds [string] false The IDs of the security groups that have been granted permissions.
» OutboundRuleSecurityGroupNames [string] false The names of the security groups that have been granted permissions.
» OutboundRuleToPortRanges [integer] false The ends of the port ranges for the TCP and UDP protocols, or the ICMP code numbers.
» SecurityGroupIds [string] false The IDs of the security groups.
» SecurityGroupNames [string] false The names of the security groups.
» TagKeys [string] false The keys of the tags associated with the security groups.
» TagValues [string] false The values of the tags associated with the security groups.
» Tags [string] false The key/value combination of the tags associated with the security groups, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SecurityGroups": [
    {
      "AccountId": "string",
      "Description": "string",
      "InboundRules": [
        {
          "FromPortRange": 0,
          "IpProtocol": "string",
          "IpRanges": [
            "string"
          ],
          "SecurityGroupsMembers": [
            {
              "AccountId": "string",
              "SecurityGroupId": "string",
              "SecurityGroupName": "string"
            }
          ],
          "ServiceIds": [
            "string"
          ],
          "ToPortRange": 0
        }
      ],
      "NetId": "string",
      "OutboundRules": [
        {
          "FromPortRange": 0,
          "IpProtocol": "string",
          "IpRanges": [
            "string"
          ],
          "SecurityGroupsMembers": [
            {
              "AccountId": "string",
              "SecurityGroupId": "string",
              "SecurityGroupName": "string"
            }
          ],
          "ServiceIds": [
            "string"
          ],
          "ToPortRange": 0
        }
      ],
      "SecurityGroupId": "string",
      "SecurityGroupName": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ]
}

SecurityGroupRule

CreateSecurityGroupRule

POST /CreateSecurityGroupRule

Adds one or more rules to a security group.
Use the SecurityGroupId parameter to specify the security group for which you want to create a rule.
Use the Flow parameter to specify if you want an inbound rule or an outbound rule.

An inbound rule allows the security group to receive traffic:

(Net only) An outbound rule works similarly but allows the security group to send traffic rather than receive traffic.

Alternatively, you can use the Rules parameter to add several rules at the same time.

[NOTE]

Code samples

osc-cli api CreateSecurityGroupRule --profile "default" \
  --DryRun False \
  --Flow "string" \
  --FromPortRange 0 \
  --IpProtocol "string" \
  --IpRange "string" \
  --Rules '[ \
      { \
        "FromPortRange": 0, \
        "IpProtocol": "string", \
        "IpRanges": ["string"], \
        "SecurityGroupsMembers": [{"AccountId": "string", "SecurityGroupId": "string", "SecurityGroupName": "string"}], \
        "ServiceIds": ["string"], \
        "ToPortRange": 0 \
      } \
    ]' \
  --SecurityGroupAccountIdToLink "string" \
  --SecurityGroupId "string" \
  --SecurityGroupNameToLink "string" \
  --ToPortRange 0

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSecurityGroupRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Flow": "string",
    "FromPortRange": 0,
    "IpProtocol": "string",
    "IpRange": "string",
    "Rules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": ["string"],
        "SecurityGroupsMembers": [{"AccountId": "string", "SecurityGroupId": "string", "SecurityGroupName": "string"}],
        "ServiceIds": ["string"],
        "ToPortRange": 0
      }
    ],
    "SecurityGroupAccountIdToLink": "string",
    "SecurityGroupId": "string",
    "SecurityGroupNameToLink": "string",
    "ToPortRange": 0
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateSecurityGroupRule(
    Flow="string",
    FromPortRange=0,
    IpProtocol="string",
    IpRange="string",
    Rules=[ 
        { 
            "FromPortRange": 0, 
            "IpProtocol": "string", 
            "IpRanges": ["string"], 
            "SecurityGroupsMembers": [ 
                {"AccountId": "string", "SecurityGroupId": "string", "SecurityGroupName": "string"} 
            ], 
            "ServiceIds": ["string"], 
            "ToPortRange": 0 
        } 
    ],
    SecurityGroupAccountIdToLink="string",
    SecurityGroupId="string",
    SecurityGroupNameToLink="string",
    ToPortRange=0,
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Flow string true The direction of the flow: Inbound or Outbound. You can specify Outbound for Nets only.
FromPortRange integer false The beginning of the port range for the TCP and UDP protocols, or an ICMP type number. If you specify this parameter, you cannot specify the Rules parameter and its subparameters.
IpProtocol string false The IP protocol name (tcp, udp, icmp, or -1 for all protocols). By default, -1. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. If you specify this parameter, you cannot specify the Rules parameter and its subparameters.
IpRange string false The IP range for the security group rule, in CIDR notation (for example, 10.0.0.0/16). If you specify this parameter, you cannot specify the Rules parameter and its subparameters.
Rules [SecurityGroupRule] false Information about the security group rule to create. If you specify this parent parameter and its subparameters, you cannot specify the following parent parameters: FromPortRange, IpProtocol, IpRange, and ToPortRange.
» FromPortRange integer false The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
» IpProtocol string false The IP protocol name (tcp, udp, icmp, or -1 for all protocols). By default, -1. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website.
» IpRanges [string] false One or more IP ranges for the security group rules, in CIDR notation (for example, 10.0.0.0/16).
» SecurityGroupsMembers [SecurityGroupsMember] false Information about one or more source or destination security groups.
»» AccountId string false The account ID that owns the source or destination security group.
»» SecurityGroupId string false The ID of a source or destination security group that you want to link to the security group of the rule.
»» SecurityGroupName string false (Public Cloud only) The name of a source or destination security group that you want to link to the security group of the rule.
» ServiceIds [string] false One or more service IDs to allow traffic from a Net to access the corresponding OUTSCALE services. For more information, see ReadNetAccessPointServices.
» ToPortRange integer false The end of the port range for the TCP and UDP protocols, or an ICMP code number.
SecurityGroupAccountIdToLink string false The account ID that owns the source or destination security group specified in the SecurityGroupNameToLink parameter.
SecurityGroupId string true The ID of the security group for which you want to create a rule.
SecurityGroupNameToLink string false The ID of a source or destination security group that you want to link to the security group of the rule.
ToPortRange integer false The end of the port range for the TCP and UDP protocols, or an ICMP code number. If you specify this parameter, you cannot specify the Rules parameter and its subparameters.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SecurityGroup": {
    "AccountId": "string",
    "Description": "string",
    "InboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "NetId": "string",
    "OutboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "SecurityGroupId": "string",
    "SecurityGroupName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

DeleteSecurityGroupRule

POST /DeleteSecurityGroupRule

Deletes one or more inbound or outbound rules from a security group. For the rule to be deleted, the values specified in the deletion request must exactly match the value of the existing rule.
In case of TCP and UDP protocols, you have to indicate the destination port or range of ports. In case of ICMP protocol, you have to specify the ICMP type and code numbers.
Rules (IP permissions) consist of the protocol, IP range or source security group.
To remove outbound access to a destination security group, we recommend to use a set of IP permissions. We also recommend to specify the protocol in a set of IP permissions.

Code samples

osc-cli api DeleteSecurityGroupRule --profile "default" \
  --DryRun False \
  --Flow "string" \
  --FromPortRange 0 \
  --IpProtocol "string" \
  --IpRange "string" \
  --Rules '[ \
      { \
        "FromPortRange": 0, \
        "IpProtocol": "string", \
        "IpRanges": ["string"], \
        "SecurityGroupsMembers": [{"AccountId": "string", "SecurityGroupId": "string", "SecurityGroupName": "string"}], \
        "ServiceIds": ["string"], \
        "ToPortRange": 0 \
      } \
    ]' \
  --SecurityGroupAccountIdToUnlink "string" \
  --SecurityGroupId "string" \
  --SecurityGroupNameToUnlink "string" \
  --ToPortRange 0

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteSecurityGroupRule \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Flow": "string",
    "FromPortRange": 0,
    "IpProtocol": "string",
    "IpRange": "string",
    "Rules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": ["string"],
        "SecurityGroupsMembers": [{"AccountId": "string", "SecurityGroupId": "string", "SecurityGroupName": "string"}],
        "ServiceIds": ["string"],
        "ToPortRange": 0
      }
    ],
    "SecurityGroupAccountIdToUnlink": "string",
    "SecurityGroupId": "string",
    "SecurityGroupNameToUnlink": "string",
    "ToPortRange": 0
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteSecurityGroupRule(
    Flow="string",
    FromPortRange=0,
    IpProtocol="string",
    IpRange="string",
    Rules=[ 
        { 
            "FromPortRange": 0, 
            "IpProtocol": "string", 
            "IpRanges": ["string"], 
            "SecurityGroupsMembers": [ 
                {"AccountId": "string", "SecurityGroupId": "string", "SecurityGroupName": "string"} 
            ], 
            "ServiceIds": ["string"], 
            "ToPortRange": 0 
        } 
    ],
    SecurityGroupAccountIdToUnlink="string",
    SecurityGroupId="string",
    SecurityGroupNameToUnlink="string",
    ToPortRange=0,
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Flow string true The direction of the flow: Inbound or Outbound. You can specify Outbound for Nets only.
FromPortRange integer false The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
IpProtocol string false The IP protocol name (tcp, udp, icmp, or -1 for all protocols). By default, -1. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website.
IpRange string false The IP range for the security group rule, in CIDR notation (for example, 10.0.0.0/16).
Rules [SecurityGroupRule] false One or more rules you want to delete from the security group.
» FromPortRange integer false The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
» IpProtocol string false The IP protocol name (tcp, udp, icmp, or -1 for all protocols). By default, -1. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website.
» IpRanges [string] false One or more IP ranges for the security group rules, in CIDR notation (for example, 10.0.0.0/16).
» SecurityGroupsMembers [SecurityGroupsMember] false Information about one or more source or destination security groups.
»» AccountId string false The account ID that owns the source or destination security group.
»» SecurityGroupId string false The ID of a source or destination security group that you want to link to the security group of the rule.
»» SecurityGroupName string false (Public Cloud only) The name of a source or destination security group that you want to link to the security group of the rule.
» ServiceIds [string] false One or more service IDs to allow traffic from a Net to access the corresponding OUTSCALE services. For more information, see ReadNetAccessPointServices.
» ToPortRange integer false The end of the port range for the TCP and UDP protocols, or an ICMP code number.
SecurityGroupAccountIdToUnlink string false The account ID of the owner of the security group you want to delete a rule from.
SecurityGroupId string true The ID of the security group you want to delete a rule from.
SecurityGroupNameToUnlink string false The ID of the source security group. If you are in the Public Cloud, you can also specify the name of the source security group.
ToPortRange integer false The end of the port range for the TCP and UDP protocols, or an ICMP code number.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SecurityGroup": {
    "AccountId": "string",
    "Description": "string",
    "InboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "NetId": "string",
    "OutboundRules": [
      {
        "FromPortRange": 0,
        "IpProtocol": "string",
        "IpRanges": [
          "string"
        ],
        "SecurityGroupsMembers": [
          {
            "AccountId": "string",
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "ServiceIds": [
          "string"
        ],
        "ToPortRange": 0
      }
    ],
    "SecurityGroupId": "string",
    "SecurityGroupName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

ServerCertificate

CreateServerCertificate

POST /CreateServerCertificate

Creates a server certificate and its matching private key.

These elements can be used with other services (for example, to configure SSL termination on load balancers).

You can also specify the chain of intermediate certification authorities if your certificate is not directly signed by a root one. You can specify multiple intermediate certification authorities in the CertificateChain parameter. To do so, concatenate all certificates in the correct order (the first certificate must be the authority of your certificate, the second must the the authority of the first one, and so on).

The private key must be a RSA key in PKCS1 form. To check this, open the PEM file and ensure its header reads as follows: BEGIN RSA PRIVATE KEY.

[IMPORTANT]

This private key must not be protected by a password or a passphrase.

Code samples

osc-cli api CreateServerCertificate --profile "default" \
  --Body="$(cat certificate.pem)" \
  --Chain="$(cat certificate-chain.pem)" \
  --DryRun False \
  --Name "string" \
  --Path "string" \
  --PrivateKey="$(cat private-key.pem)"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateServerCertificate \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Body": "string",
    "Chain": "string",
    "DryRun": false,
    "Name": "string",
    "Path": "string",
    "PrivateKey": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateServerCertificate(
    Body="string",
    Chain="string",
    Name="string",
    Path="string",
    PrivateKey="string",
)
print(result)

Parameters

Parameter Type Required Description
Body string true The PEM-encoded X509 certificate.
With OSC CLI, use the following syntax to make sure your CA file is correctly parsed: --CaPem="$(cat FILENAME)".
Chain string false The PEM-encoded intermediate certification authorities.
With OSC CLI, use the following syntax to make sure your CA file is correctly parsed: --CaPem="$(cat FILENAME)".
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Name string true A unique name for the certificate. Constraints: 1-128 alphanumeric characters, pluses (+), equals (=), commas (,), periods (.), at signs (@), minuses (-), or underscores (_).
Path string false The path to the server certificate, set to a slash (/) if not specified.
PrivateKey string true The PEM-encoded private key matching the certificate.
With OSC CLI, use the following syntax to make sure your CA file is correctly parsed: --CaPem="$(cat FILENAME)".

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). CreateServerCertificateResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "ServerCertificate": {
    "ExpirationDate": "2019-08-24",
    "Id": "string",
    "Name": "string",
    "Orn": "string",
    "Path": "string",
    "UploadDate": "2019-08-24"
  }
}

DeleteServerCertificate

POST /DeleteServerCertificate

Deletes a specified server certificate.

Code samples

osc-cli api DeleteServerCertificate --profile "default" \
  --DryRun False \
  --Name "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteServerCertificate(
    Name="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Name string true The name of the server certificate you want to delete.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). DeleteServerCertificateResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadServerCertificates

POST /ReadServerCertificates

Lists your server certificates.

Code samples

osc-cli api ReadServerCertificates --profile "default" \
  --DryRun False \
  --Filters '{ \
      "Paths": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadServerCertificates \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "Paths": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadServerCertificates(
    Filters={ 
        "Paths": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersServerCertificate false One or more filters.
» Paths [string] false The paths to the server certificates.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadServerCertificatesResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "ServerCertificates": [
    {
      "ExpirationDate": "2019-08-24",
      "Id": "string",
      "Name": "string",
      "Orn": "string",
      "Path": "string",
      "UploadDate": "2019-08-24"
    }
  ]
}

UpdateServerCertificate

POST /UpdateServerCertificate

Modifies the name and/or the path of a specified server certificate.

Code samples

osc-cli api UpdateServerCertificate --profile "default" \
  --DryRun False \
  --Name "string" \
  --NewName "string" \
  --NewPath "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateServerCertificate \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Name": "string",
    "NewName": "string",
    "NewPath": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateServerCertificate(
    Name="string",
    NewName="string",
    NewPath="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Name string true The name of the server certificate you want to modify.
NewName string false A new name for the server certificate.
NewPath string false A new path for the server certificate.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). UpdateServerCertificateResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "ServerCertificate": {
    "ExpirationDate": "2019-08-24",
    "Id": "string",
    "Name": "string",
    "Orn": "string",
    "Path": "string",
    "UploadDate": "2019-08-24"
  }
}

Snapshot

CreateSnapshot

POST /CreateSnapshot

Creates a snapshot. Snapshots are point-in-time images of a volume that you can use to back up your data or to create replicas of this volume.
You can use this method in three different ways:

Code samples

osc-cli api CreateSnapshot --profile "default" \
  --Description "string" \
  --DryRun False \
  --FileLocation "string" \
  --SnapshotSize 0 \
  --SourceRegionName "string" \
  --SourceSnapshotId "string" \
  --VolumeId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSnapshot \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "Description": "string",
    "DryRun": false,
    "FileLocation": "string",
    "SnapshotSize": 0,
    "SourceRegionName": "string",
    "SourceSnapshotId": "string",
    "VolumeId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateSnapshot(
    Description="string",
    FileLocation="string",
    SnapshotSize=0,
    SourceRegionName="string",
    SourceSnapshotId="string",
    VolumeId="string",
)
print(result)

Parameters

Parameter Type Required Description
Description string false A description for the snapshot.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
FileLocation string false (When importing) The pre-signed URL of the snapshot you want to import, or the normal URL of the snapshot if you have permission on the OOS bucket. For more information, see Configuring a Pre-signed URL or Managing Access to Your Buckets and Objects.
SnapshotSize integer (int64) false (When importing) The size of the snapshot you want to create in your account, in bytes. This size must be greater than or equal to the size of the original, uncompressed snapshot.
SourceRegionName string false (When copying) The name of the source Region, which must be the same as the Region of your account.
SourceSnapshotId string false (When copying) The ID of the snapshot you want to copy.
VolumeId string false (When creating) The ID of the volume you want to create a snapshot of.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Snapshot": {
    "AccountAlias": "string",
    "AccountId": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "PermissionsToCreateVolume": {
      "AccountIds": [
        "string"
      ],
      "GlobalPermission": true
    },
    "Progress": 0,
    "SnapshotId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VolumeId": "string",
    "VolumeSize": 0
  }
}

CreateSnapshotExportTask

POST /CreateSnapshotExportTask

Exports a snapshot to an OUTSCALE Object Storage (OOS) bucket.
This action enables you to create a backup of your snapshot or to copy it to another account. You, or other users you send a pre-signed URL to, can then download this snapshot from the bucket using the CreateSnapshot method.
This procedure enables you to copy a snapshot between accounts within the same Region or in different Regions. To copy a snapshot within the same Region, you can also use the CreateSnapshot direct method. The copy of the source snapshot is independent and belongs to you.

Code samples

osc-cli api CreateSnapshotExportTask --profile "default" \
  --DryRun False \
  --OsuExport '{ \
      "DiskImageFormat": "string", \
      "OsuApiKey": { \
        "ApiKeyId": "string", \
        "SecretKey": "string" \
      }, \
      "OsuBucket": "string", \
      "OsuManifestUrl": "string", \
      "OsuPrefix": "string" \
    }' \
  --SnapshotId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSnapshotExportTask \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "OsuExport": {
      "DiskImageFormat": "string",
      "OsuApiKey": {
        "ApiKeyId": "string",
        "SecretKey": "string"
      },
      "OsuBucket": "string",
      "OsuManifestUrl": "string",
      "OsuPrefix": "string"
    },
    "SnapshotId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateSnapshotExportTask(
    OsuExport={ 
        "DiskImageFormat": "string", 
        "OsuApiKey": { 
            "ApiKeyId": "string", 
            "SecretKey": "string" 
        }, 
        "OsuBucket": "string", 
        "OsuManifestUrl": "string", 
        "OsuPrefix": "string" 
    },
    SnapshotId="string",
)
print(result)

Parameters

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

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). CreateSnapshotExportTaskResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SnapshotExportTask": {
    "Comment": "string",
    "OsuExport": {
      "DiskImageFormat": "string",
      "OsuBucket": "string",
      "OsuPrefix": "string"
    },
    "Progress": 0,
    "SnapshotId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "TaskId": "string"
  }
}

DeleteSnapshot

POST /DeleteSnapshot

Deletes a specified snapshot.
You cannot delete a snapshot that is currently used by an OUTSCALE machine image (OMI). To do so, you first need to delete the corresponding OMI. For more information, see the DeleteImage method.

Code samples

osc-cli api DeleteSnapshot --profile "default" \
  --DryRun False \
  --SnapshotId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteSnapshot(
    SnapshotId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
SnapshotId string true The ID of the snapshot you want to delete.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadSnapshotExportTasks

POST /ReadSnapshotExportTasks

Lists one or more snapshot export tasks.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadSnapshotExportTasks --profile "default" \
  --DryRun False \
  --Filters '{ \
      "TaskIds": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSnapshotExportTasks \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "TaskIds": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadSnapshotExportTasks(
    Filters={ 
        "TaskIds": ["string"] 
    },
)
print(result)

Parameters

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

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadSnapshotExportTasksResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "SnapshotExportTasks": [
    {
      "Comment": "string",
      "OsuExport": {
        "DiskImageFormat": "string",
        "OsuBucket": "string",
        "OsuPrefix": "string"
      },
      "Progress": 0,
      "SnapshotId": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "TaskId": "string"
    }
  ]
}

ReadSnapshots

POST /ReadSnapshots

Lists one or more snapshots that are available to you and the permissions to create volumes from them.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadSnapshots --profile "default" \
  --DryRun False \
  --Filters '{ \
      "AccountAliases": ["string"], \
      "AccountIds": ["string"], \
      "Descriptions": ["string"], \
      "FromCreationDate": "2019-08-24T14:15:22Z", \
      "PermissionsToCreateVolumeAccountIds": ["string"], \
      "PermissionsToCreateVolumeGlobalPermission": True, \
      "Progresses": [0], \
      "SnapshotIds": ["string"], \
      "States": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"], \
      "ToCreationDate": "2019-08-24T14:15:22Z", \
      "VolumeIds": ["string"], \
      "VolumeSizes": [0] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSnapshots \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "AccountAliases": ["string"],
      "AccountIds": ["string"],
      "Descriptions": ["string"],
      "FromCreationDate": "2019-08-24T14:15:22Z",
      "PermissionsToCreateVolumeAccountIds": ["string"],
      "PermissionsToCreateVolumeGlobalPermission": true,
      "Progresses": [0],
      "SnapshotIds": ["string"],
      "States": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"],
      "ToCreationDate": "2019-08-24T14:15:22Z",
      "VolumeIds": ["string"],
      "VolumeSizes": [0]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadSnapshots(
    Filters={ 
        "AccountAliases": ["string"], 
        "AccountIds": ["string"], 
        "Descriptions": ["string"], 
        "FromCreationDate": "2019-08-24T14:15:22Z", 
        "PermissionsToCreateVolumeAccountIds": ["string"], 
        "PermissionsToCreateVolumeGlobalPermission": True, 
        "Progresses": [0], 
        "SnapshotIds": ["string"], 
        "States": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"], 
        "ToCreationDate": "2019-08-24T14:15:22Z", 
        "VolumeIds": ["string"], 
        "VolumeSizes": [0] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersSnapshot false One or more filters.
» AccountAliases [string] false The account aliases of the owners of the snapshots.
» AccountIds [string] false The account IDs of the owners of the snapshots.
» Descriptions [string] false The descriptions of the snapshots.
» FromCreationDate string (date-time) false The beginning of the time period, in ISO 8601 date-time format (for example, 2020-06-14T00:00:00.000Z).
» PermissionsToCreateVolumeAccountIds [string] false The account IDs of one or more users who have permissions to create volumes.
» PermissionsToCreateVolumeGlobalPermission boolean false If true, lists all public volumes. If false, lists all private volumes.
» Progresses [integer] false The progresses of the snapshots, as a percentage.
» SnapshotIds [string] false The IDs of the snapshots.
» States [string] false The states of the snapshots (in-queue | completed | error).
» TagKeys [string] false The keys of the tags associated with the snapshots.
» TagValues [string] false The values of the tags associated with the snapshots.
» Tags [string] false The key/value combination of the tags associated with the snapshots, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» ToCreationDate string (date-time) false The end of the time period, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).
» VolumeIds [string] false The IDs of the volumes used to create the snapshots.
» VolumeSizes [integer] false The sizes of the volumes used to create the snapshots, in gibibytes (GiB).

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Snapshots": [
    {
      "AccountAlias": "string",
      "AccountId": "string",
      "CreationDate": "2019-08-24T14:15:22Z",
      "Description": "string",
      "PermissionsToCreateVolume": {
        "AccountIds": [
          "string"
        ],
        "GlobalPermission": true
      },
      "Progress": 0,
      "SnapshotId": "string",
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "VolumeId": "string",
      "VolumeSize": 0
    }
  ]
}

UpdateSnapshot

POST /UpdateSnapshot

Modifies the permissions for a specified snapshot.
You must specify either the Additions or the Removals parameter.
After sharing a snapshot with an account, the other account can create a copy of it that they own. For more information about copying snapshots, see CreateSnapshot.

Code samples

osc-cli api UpdateSnapshot --profile "default" \
  --DryRun False \
  --PermissionsToCreateVolume '{ \
      "Additions": { \
        "AccountIds": ["string"], \
        "GlobalPermission": True \
      }, \
      "Removals": { \
        "AccountIds": ["string"], \
        "GlobalPermission": True \
      } \
    }' \
  --SnapshotId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateSnapshot \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "PermissionsToCreateVolume": {
      "Additions": {
        "AccountIds": ["string"],
        "GlobalPermission": true
      },
      "Removals": {
        "AccountIds": ["string"],
        "GlobalPermission": true
      }
    },
    "SnapshotId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateSnapshot(
    PermissionsToCreateVolume={ 
        "Additions": { 
            "AccountIds": ["string"], 
            "GlobalPermission": True 
        }, 
        "Removals": { 
            "AccountIds": ["string"], 
            "GlobalPermission": True 
        } 
    },
    SnapshotId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
PermissionsToCreateVolume PermissionsOnResourceCreation true Information about the permissions for the resource.
Specify either the Additions or the Removals parameter.
» Additions PermissionsOnResource false Permissions for the resource.
»» AccountIds [string] false One or more account IDs that the permission is associated with.
»» GlobalPermission boolean false 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 false Permissions for the resource.
SnapshotId string true The ID of the snapshot.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Snapshot": {
    "AccountAlias": "string",
    "AccountId": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "Description": "string",
    "PermissionsToCreateVolume": {
      "AccountIds": [
        "string"
      ],
      "GlobalPermission": true
    },
    "Progress": 0,
    "SnapshotId": "string",
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VolumeId": "string",
    "VolumeSize": 0
  }
}

Subnet

CreateSubnet

POST /CreateSubnet

Creates a Subnet in an existing Net.
To create a Subnet in a Net, you have to provide the ID of the Net and the IP range for the Subnet (its network range). Once the Subnet is created, you cannot modify its IP range.

Code samples

osc-cli api CreateSubnet --profile "default" \
  --DryRun False \
  --IpRange "string" \
  --NetId "string" \
  --SubregionName "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateSubnet \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "IpRange": "string",
    "NetId": "string",
    "SubregionName": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateSubnet(
    IpRange="string",
    NetId="string",
    SubregionName="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
IpRange string true The IP range in the Subnet, in CIDR notation (for example, 10.0.0.0/16).
The IP range of the Subnet can be either the same as the Net one if you create only a single Subnet in this Net, or a subset of the Net one. In case of several Subnets in a Net, their IP ranges must not overlap. The smallest Subnet you can create uses a /29 netmask (eight IPs). For more information, see About VPCs.
NetId string true The ID of the Net for which you want to create a Subnet.
SubregionName string false The name of the Subregion in which you want to create the Subnet.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Subnet": {
    "AvailableIpsCount": 0,
    "IpRange": "string",
    "MapPublicIpOnLaunch": true,
    "NetId": "string",
    "State": "string",
    "SubnetId": "string",
    "SubregionName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

DeleteSubnet

POST /DeleteSubnet

Deletes a specified Subnet.
Before deleting the Subnet, you need to delete all resources associated with the Subnet:

Code samples

osc-cli api DeleteSubnet --profile "default" \
  --DryRun False \
  --SubnetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteSubnet(
    SubnetId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
SubnetId string true The ID of the Subnet you want to delete.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadSubnets

POST /ReadSubnets

Lists one or more of your Subnets.
If you do not specify any Subnet ID, this action describes all of your Subnets.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadSubnets --profile "default" \
  --DryRun False \
  --Filters '{ \
      "AvailableIpsCounts": [0], \
      "IpRanges": ["string"], \
      "NetIds": ["string"], \
      "States": ["string"], \
      "SubnetIds": ["string"], \
      "SubregionNames": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSubnets \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "AvailableIpsCounts": [0],
      "IpRanges": ["string"],
      "NetIds": ["string"],
      "States": ["string"],
      "SubnetIds": ["string"],
      "SubregionNames": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadSubnets(
    Filters={ 
        "AvailableIpsCounts": [0], 
        "IpRanges": ["string"], 
        "NetIds": ["string"], 
        "States": ["string"], 
        "SubnetIds": ["string"], 
        "SubregionNames": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersSubnet false One or more filters.
» AvailableIpsCounts [integer] false The number of available IPs.
» IpRanges [string] false The IP ranges in the Subnets, in CIDR notation (for example, 10.0.0.0/16).
» NetIds [string] false The IDs of the Nets in which the Subnets are.
» States [string] false The states of the Subnets (pending | available | deleted).
» SubnetIds [string] false The IDs of the Subnets.
» SubregionNames [string] false The names of the Subregions in which the Subnets are located.
» TagKeys [string] false The keys of the tags associated with the Subnets.
» TagValues [string] false The values of the tags associated with the Subnets.
» Tags [string] false The key/value combination of the tags associated with the Subnets, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Subnets": [
    {
      "AvailableIpsCount": 0,
      "IpRange": "string",
      "MapPublicIpOnLaunch": true,
      "NetId": "string",
      "State": "string",
      "SubnetId": "string",
      "SubregionName": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ]
    }
  ]
}

UpdateSubnet

POST /UpdateSubnet

Modifies the specified attribute of a Subnet.

Code samples

osc-cli api UpdateSubnet --profile "default" \
  --DryRun False \
  --MapPublicIpOnLaunch True \
  --SubnetId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateSubnet \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "MapPublicIpOnLaunch": true,
    "SubnetId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateSubnet(
    MapPublicIpOnLaunch=True,
    SubnetId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
MapPublicIpOnLaunch boolean true If true, a public IP is assigned to the network interface cards (NICs) created in the specified Subnet.
SubnetId string true The ID of the Subnet.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Subnet": {
    "AvailableIpsCount": 0,
    "IpRange": "string",
    "MapPublicIpOnLaunch": true,
    "NetId": "string",
    "State": "string",
    "SubnetId": "string",
    "SubregionName": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

Subregion

ReadSubregions

POST /ReadSubregions

Lists one or more of the enabled Subregions that you can access in the current Region.

[NOTE]

Code samples

osc-cli api ReadSubregions --profile "default" \
  --DryRun False \
  --Filters '{ \
      "SubregionNames": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadSubregions \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "SubregionNames": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadSubregions(
    Filters={ 
        "SubregionNames": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersSubregion false One or more filters.
» SubregionNames [string] false The names of the Subregions.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadSubregionsResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Subregions": [
    {
      "LocationCode": "string",
      "RegionName": "string",
      "State": "string",
      "SubregionName": "string"
    }
  ]
}

Tag

CreateTags

POST /CreateTags

Adds one or more tags to the specified resources.
If a tag with the same key already exists for the resource, the tag value is replaced.
You can tag the following resources using their IDs:

Code samples

osc-cli api CreateTags --profile "default" \
  --DryRun False \
  --ResourceIds '["string"]' \
  --Tags '[ \
      { \
        "Key": "string", \
        "Value": "string" \
      } \
    ]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateTags \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "ResourceIds": ["string"],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateTags(
    ResourceIds=["string"],
    Tags=[ 
        { 
            "Key": "string", 
            "Value": "string" 
        } 
    ],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
ResourceIds [string] true One or more resource IDs.
Tags [ResourceTag] true One or more tags to add to the specified resources.
» Key string true The key of the tag, with a minimum of 1 character.
» Value string true The value of the tag, between 0 and 255 characters.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

DeleteTags

POST /DeleteTags

Deletes one or more tags from the specified resources.

Code samples

osc-cli api DeleteTags --profile "default" \
  --DryRun False \
  --ResourceIds '["string"]' \
  --Tags '[ \
      { \
        "Key": "string", \
        "Value": "string" \
      } \
    ]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteTags \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "ResourceIds": ["string"],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteTags(
    ResourceIds=["string"],
    Tags=[ 
        { 
            "Key": "string", 
            "Value": "string" 
        } 
    ],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
ResourceIds [string] true One or more resource IDs.
Tags [ResourceTag] true One or more tags to delete (if you set a tag value, only the tags matching exactly this value are deleted).
» Key string true The key of the tag, with a minimum of 1 character.
» Value string true The value of the tag, between 0 and 255 characters.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadTags

POST /ReadTags

Lists one or more tags for your resources.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadTags --profile "default" \
  --DryRun False \
  --Filters '{ \
      "Keys": ["string"], \
      "ResourceIds": ["string"], \
      "ResourceTypes": ["string"], \
      "Values": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadTags \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "Keys": ["string"],
      "ResourceIds": ["string"],
      "ResourceTypes": ["string"],
      "Values": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadTags(
    Filters={ 
        "Keys": ["string"], 
        "ResourceIds": ["string"], 
        "ResourceTypes": ["string"], 
        "Values": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersTag false One or more filters.
» Keys [string] false The keys of the tags that are assigned to the resources. You can use this filter alongside the Values filter. In that case, you filter the resources corresponding to each tag, regardless of the other filter.
» ResourceIds [string] false The IDs of the resources with which the tags are associated.
» ResourceTypes [string] false The resource type (vm | image | volume | snapshot | public-ip | security-group | route-table | nic | net | subnet | net-peering | net-access-point | nat-service | internet-service | client-gateway | virtual-gateway | vpn-connection | dhcp-options | task).
» Values [string] false The values of the tags that are assigned to the resources. You can use this filter alongside the TagKeys filter. In that case, you filter the resources corresponding to each tag, regardless of the other filter.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Tags": [
    {
      "Key": "string",
      "ResourceId": "string",
      "ResourceType": "string",
      "Value": "string"
    }
  ]
}

Task

DeleteExportTask

POST /DeleteExportTask

Deletes an export task.
If the export task is not running, the command fails and an error is returned.

Code samples

osc-cli api DeleteExportTask --profile "default" \
  --DryRun False \
  --ExportTaskId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteExportTask(
    ExportTaskId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
ExportTaskId string true The ID of the export task to delete.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). DeleteExportTaskResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

VirtualGateway

CreateVirtualGateway

POST /CreateVirtualGateway

Creates a virtual gateway.
A virtual gateway is the access point on the Net side of a VPN connection.

Code samples

osc-cli api CreateVirtualGateway --profile "default" \
  --ConnectionType "string" \
  --DryRun False

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateVirtualGateway(
    ConnectionType="string",
)
print(result)

Parameters

Parameter Type Required Description
ConnectionType string true The type of VPN connection supported by the virtual gateway (only ipsec.1 is supported).
DryRun boolean false If true, checks whether you have the required permissions to perform the action.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). CreateVirtualGatewayResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VirtualGateway": {
    "ConnectionType": "string",
    "NetToVirtualGatewayLinks": [
      {
        "NetId": "string",
        "State": "string"
      }
    ],
    "State": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "VirtualGatewayId": "string"
  }
}

DeleteVirtualGateway

POST /DeleteVirtualGateway

Deletes a specified virtual gateway.
Before deleting a virtual gateway, we recommend to detach it from the Net and delete the VPN connection.

Code samples

osc-cli api DeleteVirtualGateway --profile "default" \
  --DryRun False \
  --VirtualGatewayId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteVirtualGateway(
    VirtualGatewayId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
VirtualGatewayId string true The ID of the virtual gateway you want to delete.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). DeleteVirtualGatewayResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

LinkVirtualGateway

POST /LinkVirtualGateway

Attaches a virtual gateway to a Net.

Code samples

osc-cli api LinkVirtualGateway --profile "default" \
  --DryRun False \
  --NetId "string" \
  --VirtualGatewayId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/LinkVirtualGateway \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "NetId": "string",
    "VirtualGatewayId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.LinkVirtualGateway(
    NetId="string",
    VirtualGatewayId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetId string true The ID of the Net to which you want to attach the virtual gateway.
VirtualGatewayId string true The ID of the virtual gateway.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). LinkVirtualGatewayResponse

Example responses

200 Response

{
  "NetToVirtualGatewayLink": {
    "NetId": "string",
    "State": "string"
  },
  "ResponseContext": {
    "RequestId": "string"
  }
}

ReadVirtualGateways

POST /ReadVirtualGateways

Lists one or more virtual gateways.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadVirtualGateways --profile "default" \
  --DryRun False \
  --Filters '{ \
      "ConnectionTypes": ["string"], \
      "LinkNetIds": ["string"], \
      "LinkStates": ["string"], \
      "States": ["string"], \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"], \
      "VirtualGatewayIds": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVirtualGateways \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "ConnectionTypes": ["string"],
      "LinkNetIds": ["string"],
      "LinkStates": ["string"],
      "States": ["string"],
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"],
      "VirtualGatewayIds": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadVirtualGateways(
    Filters={ 
        "ConnectionTypes": ["string"], 
        "LinkNetIds": ["string"], 
        "LinkStates": ["string"], 
        "States": ["string"], 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"], 
        "VirtualGatewayIds": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersVirtualGateway false One or more filters.
» ConnectionTypes [string] false The types of the virtual gateways (only ipsec.1 is supported).
» LinkNetIds [string] false The IDs of the Nets the virtual gateways are attached to.
» LinkStates [string] false The current states of the attachments between the virtual gateways and the Nets (attaching | attached | detaching | detached).
» States [string] false The states of the virtual gateways (pending | available | deleting | deleted).
» TagKeys [string] false The keys of the tags associated with the virtual gateways.
» TagValues [string] false The values of the tags associated with the virtual gateways.
» Tags [string] false The key/value combination of the tags associated with the virtual gateways, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» VirtualGatewayIds [string] false The IDs of the virtual gateways.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadVirtualGatewaysResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VirtualGateways": [
    {
      "ConnectionType": "string",
      "NetToVirtualGatewayLinks": [
        {
          "NetId": "string",
          "State": "string"
        }
      ],
      "State": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "VirtualGatewayId": "string"
    }
  ]
}

UnlinkVirtualGateway

POST /UnlinkVirtualGateway

Detaches a virtual gateway from a Net.
You must wait until the virtual gateway is in the detached state before you can attach another Net to it or delete the Net it was previously attached to.

Code samples

osc-cli api UnlinkVirtualGateway --profile "default" \
  --DryRun False \
  --NetId "string" \
  --VirtualGatewayId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UnlinkVirtualGateway \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "NetId": "string",
    "VirtualGatewayId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UnlinkVirtualGateway(
    NetId="string",
    VirtualGatewayId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
NetId string true The ID of the Net from which you want to detach the virtual gateway.
VirtualGatewayId string true The ID of the virtual gateway.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). UnlinkVirtualGatewayResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

UpdateRoutePropagation

POST /UpdateRoutePropagation

Configures the propagation of routes to a specified route table of a Net by a virtual gateway.

Code samples

osc-cli api UpdateRoutePropagation --profile "default" \
  --DryRun False \
  --Enable True \
  --RouteTableId "string" \
  --VirtualGatewayId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateRoutePropagation \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Enable": true,
    "RouteTableId": "string",
    "VirtualGatewayId": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateRoutePropagation(
    Enable=True,
    RouteTableId="string",
    VirtualGatewayId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Enable boolean true If true, a virtual gateway can propagate routes to a specified route table of a Net. If false, the propagation is disabled.
RouteTableId string true The ID of the route table.
VirtualGatewayId string true The ID of the virtual gateway.

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). UpdateRoutePropagationResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "RouteTable": {
    "LinkRouteTables": [
      {
        "LinkRouteTableId": "string",
        "Main": true,
        "RouteTableId": "string",
        "SubnetId": "string"
      }
    ],
    "NetId": "string",
    "RoutePropagatingVirtualGateways": [
      {
        "VirtualGatewayId": "string"
      }
    ],
    "RouteTableId": "string",
    "Routes": [
      {
        "CreationMethod": "string",
        "DestinationIpRange": "string",
        "DestinationServiceId": "string",
        "GatewayId": "string",
        "NatServiceId": "string",
        "NetAccessPointId": "string",
        "NetPeeringId": "string",
        "NicId": "string",
        "State": "string",
        "VmAccountId": "string",
        "VmId": "string"
      }
    ],
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ]
  }
}

Vm

CreateVms

POST /CreateVms

Creates virtual machines (VMs), and then launches them.
This action enables you to create a specified number of VMs using an OUTSCALE machine image (OMI) that you are allowed to use, and then to automatically launch them.
The VMs remain in the pending state until they are created and ready to be used. Once automatically launched, they are in the running state.
To check the state of your VMs, call the ReadVms method.
If not specified, the security group used by the service is the default one.
The metadata server enables you to get the public key provided when the VM is launched. Official OMIs contain a script to get this public key and put it inside the VM to provide secure access without password.

Code samples

osc-cli api CreateVms --profile "default" \
  --BlockDeviceMappings '[ \
      { \
        "Bsu": {"DeleteOnVmDeletion": True, "Iops": 0, "SnapshotId": "string", "VolumeSize": 0, "VolumeType": "string"}, \
        "DeviceName": "string", \
        "NoDevice": "string", \
        "VirtualDeviceName": "string" \
      } \
    ]' \
  --BootOnCreation True \
  --BsuOptimized True \
  --ClientToken "string" \
  --DeletionProtection True \
  --DryRun False \
  --ImageId "string" \
  --KeypairName "string" \
  --MaxVmsCount 0 \
  --MinVmsCount 0 \
  --NestedVirtualization False \
  --Nics '[ \
      { \
        "DeleteOnVmDeletion": True, \
        "Description": "string", \
        "DeviceNumber": 0, \
        "NicId": "string", \
        "PrivateIps": [{"IsPrimary": True, "PrivateIp": "string"}], \
        "SecondaryPrivateIpCount": 0, \
        "SecurityGroupIds": ["string"], \
        "SubnetId": "string" \
      } \
    ]' \
  --Performance "medium" \
  --Placement '{ \
      "SubregionName": "string", \
      "Tenancy": "string" \
    }' \
  --PrivateIps '["string"]' \
  --SecurityGroupIds '["string"]' \
  --SecurityGroups '["string"]' \
  --SubnetId "string" \
  --UserData "string" \
  --VmInitiatedShutdownBehavior "stop" \
  --VmType "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/CreateVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "BlockDeviceMappings": [
      {
        "Bsu": {"DeleteOnVmDeletion": true, "Iops": 0, "SnapshotId": "string", "VolumeSize": 0, "VolumeType": "string"},
        "DeviceName": "string",
        "NoDevice": "string",
        "VirtualDeviceName": "string"
      }
    ],
    "BootOnCreation": true,
    "BsuOptimized": true,
    "ClientToken": "string",
    "DeletionProtection": true,
    "DryRun": false,
    "ImageId": "string",
    "KeypairName": "string",
    "MaxVmsCount": 0,
    "MinVmsCount": 0,
    "NestedVirtualization": false,
    "Nics": [
      {
        "DeleteOnVmDeletion": true,
        "Description": "string",
        "DeviceNumber": 0,
        "NicId": "string",
        "PrivateIps": [{"IsPrimary": true, "PrivateIp": "string"}],
        "SecondaryPrivateIpCount": 0,
        "SecurityGroupIds": ["string"],
        "SubnetId": "string"
      }
    ],
    "Performance": "medium",
    "Placement": {
      "SubregionName": "string",
      "Tenancy": "string"
    },
    "PrivateIps": ["string"],
    "SecurityGroupIds": ["string"],
    "SecurityGroups": ["string"],
    "SubnetId": "string",
    "UserData": "string",
    "VmInitiatedShutdownBehavior": "stop",
    "VmType": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.CreateVms(
    BlockDeviceMappings=[ 
        { 
            "Bsu": { 
                "DeleteOnVmDeletion": True, 
                "Iops": 0, 
                "SnapshotId": "string", 
                "VolumeSize": 0, 
                "VolumeType": "string" 
            }, 
            "DeviceName": "string", 
            "NoDevice": "string", 
            "VirtualDeviceName": "string" 
        } 
    ],
    BootOnCreation=True,
    BsuOptimized=True,
    ClientToken="string",
    DeletionProtection=True,
    ImageId="string",
    KeypairName="string",
    MaxVmsCount=0,
    MinVmsCount=0,
    NestedVirtualization=False,
    Nics=[ 
        { 
            "DeleteOnVmDeletion": True, 
            "Description": "string", 
            "DeviceNumber": 0, 
            "NicId": "string", 
            "PrivateIps": [ 
                {"IsPrimary": True, "PrivateIp": "string"} 
            ], 
            "SecondaryPrivateIpCount": 0, 
            "SecurityGroupIds": ["string"], 
            "SubnetId": "string" 
        } 
    ],
    Performance="medium",
    Placement={ 
        "SubregionName": "string", 
        "Tenancy": "string" 
    },
    PrivateIps=["string"],
    SecurityGroupIds=["string"],
    SecurityGroups=["string"],
    SubnetId="string",
    UserData="string",
    VmInitiatedShutdownBehavior="stop",
    VmType="string",
)
print(result)

Parameters

Parameter Type Required Description
BlockDeviceMappings [BlockDeviceMappingVmCreation] false One or more block device mappings.
» Bsu BsuToCreate false Information about the BSU volume to create.
»» DeleteOnVmDeletion boolean false 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 false 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 false The ID of the snapshot used to create the volume.
»» VolumeSize integer false 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 false 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 false The device name for the volume. For a root device, you must use /dev/sda1. For other volumes, you must use /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX (where the first X is a letter between b and z, and the second X is a letter between a and z).
» NoDevice string false Removes the device which is included in the block device mapping of the OMI.
» VirtualDeviceName string false The name of the virtual device (ephemeralN).
BootOnCreation boolean false By default or if true, the VM is started on creation. If false, the VM is stopped on creation.
BsuOptimized boolean false This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.
ClientToken string false A unique identifier which enables you to manage the idempotency.
DeletionProtection boolean false If true, you cannot delete the VM unless you change this parameter back to false.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
ImageId string true The ID of the OMI used to create the VM. You can find the list of OMIs by calling the ReadImages method.
KeypairName string false The name of the keypair.
MaxVmsCount integer false The maximum number of VMs you want to create. If all the VMs cannot be created, the largest possible number of VMs above MinVmsCount is created.
MinVmsCount integer false The minimum number of VMs you want to create. If this number of VMs cannot be created, no VMs are created.
NestedVirtualization boolean false (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is disabled.
Nics [NicForVmCreation] false One or more NICs. If you specify this parameter, you must not specify the SubnetId and SubregionName parameters. You also must define one NIC as the primary network interface of the VM with 0 as its device number.
» DeleteOnVmDeletion boolean false If true, the NIC is deleted when the VM is terminated. You can specify this parameter only for a new NIC. To modify this value for an existing NIC, see UpdateNic.
» Description string false The description of the NIC, if you are creating a NIC when creating the VM.
» DeviceNumber integer false The index of the VM device for the NIC attachment (between 0 and 7, both included). This parameter is required if you create a NIC when creating the VM.
» NicId string false The ID of the NIC, if you are attaching an existing NIC when creating a VM.
» PrivateIps [PrivateIpLight] false One or more private IPs to assign to the NIC, if you create a NIC when creating a VM. Only one private IP can be the primary private IP.
»» IsPrimary boolean false If true, the IP is the primary private IP of the NIC.
»» PrivateIp string false The private IP of the NIC.
» SecondaryPrivateIpCount integer false The number of secondary private IPs, if you create a NIC when creating a VM. This parameter cannot be specified if you specified more than one private IP in the PrivateIps parameter.
» SecurityGroupIds [string] false One or more IDs of security groups for the NIC, if you create a NIC when creating a VM.
» SubnetId string false The ID of the Subnet for the NIC, if you create a NIC when creating a VM. This parameter is required if you create a NIC when creating the VM.
Performance string false The performance of the VM (medium | high | highest). By default, high. This parameter is ignored if you specify a performance flag directly in the VmType parameter.
Placement Placement false Information about the placement of the VM.
» SubregionName string false The name of the Subregion. If you specify this parameter, you must not specify the Nics parameter.
» Tenancy string false The tenancy of the VM (default | dedicated).
PrivateIps [string] false One or more private IPs of the VM.
SecurityGroupIds [string] false One or more IDs of security group for the VMs.
SecurityGroups [string] false One or more names of security groups for the VMs.
SubnetId string false The ID of the Subnet in which you want to create the VM. If you specify this parameter, you must not specify the Nics parameter.
UserData string false Data or script used to add a specific configuration to the VM. It must be Base64-encoded and is limited to 500 kibibytes (KiB).
VmInitiatedShutdownBehavior string false The VM behavior when you stop it. By default or if set to stop, the VM stops. If set to restart, the VM stops then automatically restarts. If set to terminate, the VM stops and is terminated.
VmType string false The type of VM. You can specify a TINA type (in the tinavW.cXrYpZ or tinavW.cXrY format), or an AWS type (for example, t2.small, which is the default value).
If you specify an AWS type, it is converted in the background to its corresponding TINA type, but the AWS type is still returned. If the specified or converted TINA type includes a performance flag, this performance flag is applied regardless of the value you may have provided in the Performance parameter. For more information, see Instance Types.

Enumerated Values

Parameter Value
Performance medium
Performance high
Performance highest

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vms": [
    {
      "Architecture": "string",
      "BlockDeviceMappings": [
        {
          "Bsu": {
            "DeleteOnVmDeletion": true,
            "LinkDate": "2019-08-24T14:15:22Z",
            "State": "string",
            "VolumeId": "string"
          },
          "DeviceName": "string"
        }
      ],
      "BsuOptimized": true,
      "ClientToken": "string",
      "CreationDate": "2019-08-24T14:15:22Z",
      "DeletionProtection": true,
      "Hypervisor": "string",
      "ImageId": "string",
      "IsSourceDestChecked": true,
      "KeypairName": "string",
      "LaunchNumber": 0,
      "NestedVirtualization": true,
      "NetId": "string",
      "Nics": [
        {
          "AccountId": "string",
          "Description": "string",
          "IsSourceDestChecked": true,
          "LinkNic": {
            "DeleteOnVmDeletion": true,
            "DeviceNumber": 0,
            "LinkNicId": "string",
            "State": "string"
          },
          "LinkPublicIp": {
            "PublicDnsName": "string",
            "PublicIp": "string",
            "PublicIpAccountId": "string"
          },
          "MacAddress": "string",
          "NetId": "string",
          "NicId": "string",
          "PrivateDnsName": "string",
          "PrivateIps": [
            {
              "IsPrimary": true,
              "LinkPublicIp": {
                "PublicDnsName": "string",
                "PublicIp": "string",
                "PublicIpAccountId": "string"
              },
              "PrivateDnsName": "string",
              "PrivateIp": "string"
            }
          ],
          "SecurityGroups": [
            {
              "SecurityGroupId": "string",
              "SecurityGroupName": "string"
            }
          ],
          "State": "string",
          "SubnetId": "string"
        }
      ],
      "OsFamily": "string",
      "Performance": "string",
      "Placement": {
        "SubregionName": "string",
        "Tenancy": "string"
      },
      "PrivateDnsName": "string",
      "PrivateIp": "string",
      "ProductCodes": [
        "string"
      ],
      "PublicDnsName": "string",
      "PublicIp": "string",
      "ReservationId": "string",
      "RootDeviceName": "string",
      "RootDeviceType": "string",
      "SecurityGroups": [
        {
          "SecurityGroupId": "string",
          "SecurityGroupName": "string"
        }
      ],
      "State": "string",
      "StateReason": "string",
      "SubnetId": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "UserData": "string",
      "VmId": "string",
      "VmInitiatedShutdownBehavior": "string",
      "VmType": "string"
    }
  ]
}

DeleteVms

POST /DeleteVms

Terminates one or more virtual machines (VMs).
This operation is idempotent, that means that all calls succeed if you terminate a VM more than once.

Code samples

osc-cli api DeleteVms --profile "default" \
  --DryRun False \
  --VmIds '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/DeleteVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "VmIds": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.DeleteVms(
    VmIds=["string"],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
VmIds [string] true One or more IDs of VMs.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vms": [
    {
      "CurrentState": "string",
      "PreviousState": "string",
      "VmId": "string"
    }
  ]
}

ReadAdminPassword

POST /ReadAdminPassword

Gets the administrator password for a Windows running virtual machine (VM).
The administrator password is encrypted using the keypair you specified when launching the VM.

[NOTE]
The administrator password is generated only on the first boot of the Windows VM. It is not returned after the first boot.

Code samples

osc-cli api ReadAdminPassword --profile "default" \
  --DryRun False \
  --VmId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadAdminPassword(
    VmId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
VmId string true The ID of the VM.

Responses

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

Example responses

200 Response

{
  "AdminPassword": "string",
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmId": "string"
}

ReadConsoleOutput

POST /ReadConsoleOutput

Gets the console output for a virtual machine (VM). This console provides the most recent 64 KiB output.

[NOTE]
On Windows VMs, the console is handled only on the first boot. It returns no output after the first boot.

Code samples

osc-cli api ReadConsoleOutput --profile "default" \
  --DryRun False \
  --VmId "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

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

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadConsoleOutput(
    VmId="string",
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
VmId string true The ID of the VM.

Responses

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

Example responses

200 Response

{
  "ConsoleOutput": "string",
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmId": "string"
}

ReadVmTypes

POST /ReadVmTypes

Lists one or more predefined VM types.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadVmTypes --profile "default" \
  --DryRun False \
  --Filters '{ \
      "BsuOptimized": True, \
      "MemorySizes": [0], \
      "VcoreCounts": [0], \
      "VmTypeNames": ["string"], \
      "VolumeCounts": [0], \
      "VolumeSizes": [0] \
    }'

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVmTypes \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "BsuOptimized": true,
      "MemorySizes": [0],
      "VcoreCounts": [0],
      "VmTypeNames": ["string"],
      "VolumeCounts": [0],
      "VolumeSizes": [0]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadVmTypes(
    Filters={ 
        "BsuOptimized": True, 
        "MemorySizes": [0], 
        "VcoreCounts": [0], 
        "VmTypeNames": ["string"], 
        "VolumeCounts": [0], 
        "VolumeSizes": [0] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersVmType false One or more filters.
» BsuOptimized boolean false This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.
» MemorySizes [number] false The amounts of memory, in gibibytes (GiB).
» VcoreCounts [integer] false The numbers of vCores.
» VmTypeNames [string] false The names of the VM types. For more information, see Instance Types.
» VolumeCounts [integer] false The maximum number of ephemeral storage disks.
» VolumeSizes [integer] false The size of one ephemeral storage disk, in gibibytes (GiB).

Responses

Status Meaning Description Schema
200 OK The HTTP 200 response (OK). ReadVmTypesResponse

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmTypes": [
    {
      "BsuOptimized": true,
      "MaxPrivateIps": 0,
      "MemorySize": 0,
      "VcoreCount": 0,
      "VmTypeName": "string",
      "VolumeCount": 0,
      "VolumeSize": 0
    }
  ]
}

ReadVms

POST /ReadVms

Lists one or more of your virtual machines (VMs).
If you provide one or more VM IDs, this action returns a description for all of these VMs. If you do not provide any VM ID, this action returns a description for all of the VMs that belong to you. If you provide an invalid VM ID, an error is returned. If you provide the ID of a VM that does not belong to you, the description of this VM is not included in the response. The refresh interval for data returned by this action is one hour, meaning that a terminated VM may appear in the response.

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadVms --profile "default" \
  --DryRun False \
  --Filters '{ \
      "TagKeys": ["string"], \
      "TagValues": ["string"], \
      "Tags": ["string"], \
      "VmIds": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "Filters": {
      "TagKeys": ["string"],
      "TagValues": ["string"],
      "Tags": ["string"],
      "VmIds": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadVms(
    Filters={ 
        "TagKeys": ["string"], 
        "TagValues": ["string"], 
        "Tags": ["string"], 
        "VmIds": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersVm false One or more filters.
» TagKeys [string] false The keys of the tags associated with the VMs.
» TagValues [string] false The values of the tags associated with the VMs.
» Tags [string] false The key/value combination of the tags associated with the VMs, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
» VmIds [string] false One or more IDs of VMs.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vms": [
    {
      "Architecture": "string",
      "BlockDeviceMappings": [
        {
          "Bsu": {
            "DeleteOnVmDeletion": true,
            "LinkDate": "2019-08-24T14:15:22Z",
            "State": "string",
            "VolumeId": "string"
          },
          "DeviceName": "string"
        }
      ],
      "BsuOptimized": true,
      "ClientToken": "string",
      "CreationDate": "2019-08-24T14:15:22Z",
      "DeletionProtection": true,
      "Hypervisor": "string",
      "ImageId": "string",
      "IsSourceDestChecked": true,
      "KeypairName": "string",
      "LaunchNumber": 0,
      "NestedVirtualization": true,
      "NetId": "string",
      "Nics": [
        {
          "AccountId": "string",
          "Description": "string",
          "IsSourceDestChecked": true,
          "LinkNic": {
            "DeleteOnVmDeletion": true,
            "DeviceNumber": 0,
            "LinkNicId": "string",
            "State": "string"
          },
          "LinkPublicIp": {
            "PublicDnsName": "string",
            "PublicIp": "string",
            "PublicIpAccountId": "string"
          },
          "MacAddress": "string",
          "NetId": "string",
          "NicId": "string",
          "PrivateDnsName": "string",
          "PrivateIps": [
            {
              "IsPrimary": true,
              "LinkPublicIp": {
                "PublicDnsName": "string",
                "PublicIp": "string",
                "PublicIpAccountId": "string"
              },
              "PrivateDnsName": "string",
              "PrivateIp": "string"
            }
          ],
          "SecurityGroups": [
            {
              "SecurityGroupId": "string",
              "SecurityGroupName": "string"
            }
          ],
          "State": "string",
          "SubnetId": "string"
        }
      ],
      "OsFamily": "string",
      "Performance": "string",
      "Placement": {
        "SubregionName": "string",
        "Tenancy": "string"
      },
      "PrivateDnsName": "string",
      "PrivateIp": "string",
      "ProductCodes": [
        "string"
      ],
      "PublicDnsName": "string",
      "PublicIp": "string",
      "ReservationId": "string",
      "RootDeviceName": "string",
      "RootDeviceType": "string",
      "SecurityGroups": [
        {
          "SecurityGroupId": "string",
          "SecurityGroupName": "string"
        }
      ],
      "State": "string",
      "StateReason": "string",
      "SubnetId": "string",
      "Tags": [
        {
          "Key": "string",
          "Value": "string"
        }
      ],
      "UserData": "string",
      "VmId": "string",
      "VmInitiatedShutdownBehavior": "string",
      "VmType": "string"
    }
  ]
}

ReadVmsState

POST /ReadVmsState

Lists the status of one or more virtual machines (VMs).

[NOTE]
If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

Code samples

osc-cli api ReadVmsState --profile "default" \
  --AllVms False \
  --DryRun False \
  --Filters '{ \
      "MaintenanceEventCodes": ["string"], \
      "MaintenanceEventDescriptions": ["string"], \
      "MaintenanceEventsNotAfter": ["2019-08-24"], \
      "MaintenanceEventsNotBefore": ["2019-08-24"], \
      "SubregionNames": ["string"], \
      "VmIds": ["string"], \
      "VmStates": ["string"] \
    }'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/ReadVmsState \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "AllVms": false,
    "DryRun": false,
    "Filters": {
      "MaintenanceEventCodes": ["string"],
      "MaintenanceEventDescriptions": ["string"],
      "MaintenanceEventsNotAfter": ["2019-08-24"],
      "MaintenanceEventsNotBefore": ["2019-08-24"],
      "SubregionNames": ["string"],
      "VmIds": ["string"],
      "VmStates": ["string"]
    }
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.ReadVmsState(
    AllVms=False,
    Filters={ 
        "MaintenanceEventCodes": ["string"], 
        "MaintenanceEventDescriptions": ["string"], 
        "MaintenanceEventsNotAfter": ["2019-08-24"], 
        "MaintenanceEventsNotBefore": ["2019-08-24"], 
        "SubregionNames": ["string"], 
        "VmIds": ["string"], 
        "VmStates": ["string"] 
    },
)
print(result)

Parameters

Parameter Type Required Description
AllVms boolean false If true, includes the status of all VMs. By default or if set to false, only includes the status of running VMs.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
Filters FiltersVmsState false One or more filters.
» MaintenanceEventCodes [string] false The code for the scheduled event (system-reboot | system-maintenance).
» MaintenanceEventDescriptions [string] false The description of the scheduled event.
» MaintenanceEventsNotAfter [string] false The latest time the event can end.
» MaintenanceEventsNotBefore [string] false The earliest time the event can start.
» SubregionNames [string] false The names of the Subregions of the VMs.
» VmIds [string] false One or more IDs of VMs.
» VmStates [string] false The states of the VMs (pending | running | stopping | stopped | shutting-down | terminated | quarantine).

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "VmStates": [
    {
      "MaintenanceEvents": [
        {
          "Code": "string",
          "Description": "string",
          "NotAfter": "2019-08-24",
          "NotBefore": "2019-08-24"
        }
      ],
      "SubregionName": "string",
      "VmId": "string",
      "VmState": "string"
    }
  ]
}

RebootVms

POST /RebootVms

Reboots one or more virtual machines (VMs).
This operation sends a reboot request to one or more specified VMs. This is an asynchronous action that queues this reboot request. This action only reboots VMs that are valid and that belong to you.

Code samples

osc-cli api RebootVms --profile "default" \
  --DryRun False \
  --VmIds '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/RebootVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "VmIds": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.RebootVms(
    VmIds=["string"],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
VmIds [string] true One or more IDs of the VMs you want to reboot.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  }
}

StartVms

POST /StartVms

Start one or more virtual machines (VMs).
You can start only VMs that are valid and that belong to you.

Code samples

osc-cli api StartVms --profile "default" \
  --DryRun False \
  --VmIds '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/StartVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "VmIds": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.StartVms(
    VmIds=["string"],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
VmIds [string] true One or more IDs of VMs.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vms": [
    {
      "CurrentState": "string",
      "PreviousState": "string",
      "VmId": "string"
    }
  ]
}

StopVms

POST /StopVms

Stops one or more running virtual machines (VMs).
You can stop only VMs that are valid and that belong to you. Data stored in the VM RAM is lost.

Code samples

osc-cli api StopVms --profile "default" \
  --DryRun False \
  --ForceStop True \
  --VmIds '["string"]'

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/StopVms \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "DryRun": false,
    "ForceStop": true,
    "VmIds": ["string"]
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.StopVms(
    ForceStop=True,
    VmIds=["string"],
)
print(result)

Parameters

Parameter Type Required Description
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
ForceStop boolean false Forces the VM to stop.
VmIds [string] true One or more IDs of VMs.

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vms": [
    {
      "CurrentState": "string",
      "PreviousState": "string",
      "VmId": "string"
    }
  ]
}

UpdateVm

POST /UpdateVm

Modifies the specified attributes of a virtual machine (VM).
You must stop the VM before modifying the following attributes:

Code samples

osc-cli api UpdateVm --profile "default" \
  --BlockDeviceMappings '[ \
      { \
        "Bsu": {"DeleteOnVmDeletion": True, "VolumeId": "string"}, \
        "DeviceName": "string", \
        "NoDevice": "string", \
        "VirtualDeviceName": "string" \
      } \
    ]' \
  --BsuOptimized True \
  --DeletionProtection True \
  --DryRun False \
  --IsSourceDestChecked True \
  --KeypairName "string" \
  --NestedVirtualization True \
  --Performance "medium" \
  --SecurityGroupIds '["string"]' \
  --UserData "string" \
  --VmId "string" \
  --VmInitiatedShutdownBehavior "string" \
  --VmType "string"

# To use this command, you need to install version 7.75 (or later) of curl and libcurl from https://github.com/curl/curl

curl -X POST https://api.$OSC_REGION.outscale.com/api/v1/UpdateVm \
  --user $OSC_ACCESS_KEY:$OSC_SECRET_KEY \
  --aws-sigv4 'osc' \
  --header 'Content-Type: application/json' \
  --data '{
    "BlockDeviceMappings": [
      {
        "Bsu": {"DeleteOnVmDeletion": true, "VolumeId": "string"},
        "DeviceName": "string",
        "NoDevice": "string",
        "VirtualDeviceName": "string"
      }
    ],
    "BsuOptimized": true,
    "DeletionProtection": true,
    "DryRun": false,
    "IsSourceDestChecked": true,
    "KeypairName": "string",
    "NestedVirtualization": true,
    "Performance": "medium",
    "SecurityGroupIds": ["string"],
    "UserData": "string",
    "VmId": "string",
    "VmInitiatedShutdownBehavior": "string",
    "VmType": "string"
  }'

from osc_sdk_python import Gateway

gw = Gateway()
result = gw.UpdateVm(
    BlockDeviceMappings=[ 
        { 
            "Bsu": { 
                "DeleteOnVmDeletion": True, 
                "VolumeId": "string" 
            }, 
            "DeviceName": "string", 
            "NoDevice": "string", 
            "VirtualDeviceName": "string" 
        } 
    ],
    BsuOptimized=True,
    DeletionProtection=True,
    IsSourceDestChecked=True,
    KeypairName="string",
    NestedVirtualization=True,
    Performance="medium",
    SecurityGroupIds=["string"],
    UserData="string",
    VmId="string",
    VmInitiatedShutdownBehavior="string",
    VmType="string",
)
print(result)

Parameters

Parameter Type Required Description
BlockDeviceMappings [BlockDeviceMappingVmUpdate] false One or more block device mappings of the VM.
» Bsu BsuToUpdateVm false Information about the BSU volume.
»» DeleteOnVmDeletion boolean false If set to true, the volume is deleted when terminating the VM. If set to false, the volume is not deleted when terminating the VM.
»» VolumeId string false The ID of the volume.
» DeviceName string false The device name for the volume. For a root device, you must use /dev/sda1. For other volumes, you must use /dev/sdX, /dev/sdXX, /dev/xvdX, or /dev/xvdXX (where the first X is a letter between b and z, and the second X is a letter between a and z).
» NoDevice string false Removes the device which is included in the block device mapping of the OMI.
» VirtualDeviceName string false The name of the virtual device (ephemeralN).
BsuOptimized boolean false This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.
DeletionProtection boolean false If true, you cannot delete the VM unless you change this parameter back to false.
DryRun boolean false If true, checks whether you have the required permissions to perform the action.
IsSourceDestChecked boolean false (Net only) If true, the source/destination check is enabled. If false, it is disabled. This value must be false for a NAT VM to perform network address translation (NAT) in a Net.
KeypairName string false The name of a keypair you want to associate with the VM.
When you replace the keypair of a VM with another one, the metadata of the VM is modified to reflect the new public key, but the replacement is still not effective in the operating system of the VM. To complete the replacement and effectively apply the new keypair, you need to perform other actions inside the VM. For more information, see Modifying the Keypair of an Instance.
NestedVirtualization boolean false (dedicated tenancy only) If true, nested virtualization is enabled. If false, it is disabled.
Performance string false The performance of the VM (medium | high | highest).
SecurityGroupIds [string] false One or more IDs of security groups for the VM.
UserData string false The Base64-encoded MIME user data, limited to 500 kibibytes (KiB).
VmId string true The ID of the VM.
VmInitiatedShutdownBehavior string false The VM behavior when you stop it. If set to stop, the VM stops. If set to restart, the VM stops then automatically restarts. If set to terminate, the VM stops and is terminated.
VmType string false The type of VM. For more information, see Instance Types.

Enumerated Values

Parameter Value
Performance medium
Performance high
Performance highest

Responses

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

Example responses

200 Response

{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Vm": {
    "Architecture": "string",
    "BlockDeviceMappings": [
      {
        "Bsu": {
          "DeleteOnVmDeletion": true,
          "LinkDate": "2019-08-24T14:15:22Z",
          "State": "string",
          "VolumeId": "string"
        },
        "DeviceName": "string"
      }
    ],
    "BsuOptimized": true,
    "ClientToken": "string",
    "CreationDate": "2019-08-24T14:15:22Z",
    "DeletionProtection": true,
    "Hypervisor": "string",
    "ImageId": "string",
    "IsSourceDestChecked": true,
    "KeypairName": "string",
    "LaunchNumber": 0,
    "NestedVirtualization": true,
    "NetId": "string",
    "Nics": [
      {
        "AccountId": "string",
        "Description": "string",
        "IsSourceDestChecked": true,
        "LinkNic": {
          "DeleteOnVmDeletion": true,
          "DeviceNumber": 0,
          "LinkNicId": "string",
          "State": "string"
        },
        "LinkPublicIp": {
          "PublicDnsName": "string",
          "PublicIp": "string",
          "PublicIpAccountId": "string"
        },
        "MacAddress": "string",
        "NetId": "string",
        "NicId": "string",
        "PrivateDnsName": "string",
        "PrivateIps": [
          {
            "IsPrimary": true,
            "LinkPublicIp": {
              "PublicDnsName": "string",
              "PublicIp": "string",
              "PublicIpAccountId": "string"
            },
            "PrivateDnsName": "string",
            "PrivateIp": "string"
          }
        ],
        "SecurityGroups": [
          {
            "SecurityGroupId": "string",
            "SecurityGroupName": "string"
          }
        ],
        "State": "string",
        "SubnetId": "string"
      }
    ],
    "OsFamily": "string",
    "Performance": "string",
    "Placement": {
      "SubregionName": "string",
      "Tenancy": "string"
    },
    "PrivateDnsName": "string",
    "PrivateIp": "string",
    "ProductCodes": [
      "string"
    ],
    "PublicDnsName": "string",
    "PublicIp": "string",
    "ReservationId": "string",
    "RootDeviceName": "string",
    "RootDeviceType": "string",
    "SecurityGroups": [
      {
        "SecurityGroupId": "string",
        "SecurityGroupName": "string"
      }
    ],
    "State": "string",
    "StateReason": "string",
    "SubnetId": "string",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
    ],
    "UserData": "string",
    "VmId": "string",
    "VmInitiatedShutdownBehavior": "string",
    "VmType": "string"
  }
}

VmGroup

CreateVmGroup

POST /CreateVmGroup

[WARNING]
This feature is currently under development and may not function properly.

Creates a group of virtual machines (VMs) containing the same characteristics as a specified VM template, and then launches them.
You can create up to 100 VM groups in your account.

Code samples

osc-cli api CreateVmGroup --profile "default" \
  --Description "string" \
  --DryRun False \
  --