Obtenir des informations sur la consommation de vos ressources

Vous pouvez obtenir des informations sur la consommation de vos ressources. Notez toutefois que ce décompte est fourni à titre indicatif uniquement. Seules les factures ont valeur contractuelle.

En termes de gouvernance, une bonne pratique peut être de déléguer la lecture de votre consommation à un utilisateur EIM. Pour en savoir plus, voir Tutoriel : Obtenir votre consommation avec un utilisateur EIM.

Obtenir des informations sur la consommation de vos ressources avec Cockpit

  1. Dans le coin supérieur droit, cliquez sur vos initiales.
    Un menu déroulant apparaît.

  2. Placez le curseur de la souris sur IconData Mes données et cliquez sur IconConsumption  Ma consommation.
    La consommation de votre compte depuis le premier jour du mois en cours apparaît.

Consommation totale

En tant que paying account :
  1. (optionnel) Cliquez sur la liste Comptes dans l’en-tête pour sélectionner le compte dont vous voulez afficher la consommation. Vous pouvez sélectionner :

    • Votre compte, en sélectionnant Mon compte.

    • N’importe quel compte lié, en sélectionnant l’ID du compte.

    • Tous les comptes, en sélectionnant Tous les comptes. Il s’agit de la consommation consolidée du paying account et de tous les comptes liés.

Pour en savoir plus sur les paying accounts, voir À propos de votre compte OUTSCALE.

  1. (optionnel) Cliquez sur l’intervalle des dates dans l’en-tête pour changer la période sélectionnée. Pour définir :

    • Une période prédéfinie, cliquez sur Hier, Mois en cours ou Mois précédent.

    • Une période personnalisée, sélectionnez une date de début et une date de fin.

      L’intervalle des dates pour la période peut aller jusqu’à 62 jours.

      Votre consommation pour la période définie apparaît.

  2. (optionnel) Dans le coin supérieur droit, cliquez sur Catégorie ou Service pour voir la consommation répartie par catégorie ou service.

  3. (optionnel) Activez le bouton Afficher sous forme de tableau sous le graphique de consommation pour l’afficher sous forme de tableau.

Détails de la consommation

  1. (optionnel) Activez le bouton Granularité pour modifier l’affichage de la consommation dans le tableau :

    • Si le bouton est désactivé, le tableau affiche la consommation par ID de compte et type de ressource.

    • Si le bouton est activé, le tableau affiche la consommation par ID de ressource.

      Utilisez la barre de recherche pour filtrer les ressources consommées en fonction de mots-clés spécifiques ou utilisez les filtres à votre disposition.

  2. (optionnel) Pour télécharger le détail de votre consommation selon les dates sélectionnées au format .json ou .csv, cliquez sur Exporter en JSON ou Exporter en CSV dans le coin supérieur droit.

Obtenir des informations sur la consommation de vos ressources avec OSC CLI

À ce jour, cette section est disponible en anglais uniquement.

The ReadConsumptionAccount command gets information about the consumption of your OUTSCALE account for each billable resource within the specified time period.

Request sample
$ osc-cli api ReadConsumptionAccount --profile "default" \
    --FromDate "2023-06-01" \
    --ToDate "2023-07-01" \
    --ShowPrice False \
    --ShowResourceDetails False
Request sample
$ osc-cli api ReadConsumptionAccount --profile "default" \
    --FromDate "2023-06-01" \
    --ToDate "2023-07-01" \
    --ShowPrice True \
    --ShowResourceDetails True

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • FromDate: The beginning of the time period, in ISO 8601 date format (for example, 2020-06-14). The date-time format is also accepted, but only with a time set to midnight (for example, 2020-06-14T00:00:00.000Z). This value is included in the time period.

  • Overall: (optional) 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).
    Default: false.

  • ShowPrice: (optional) If true, the response also includes the unit price of the consumed resource (UnitPrice) and the total price of the consumed resource during the specified time period (Price), in the currency of the Region’s catalog.

  • ShowResourceDetails: (optional) By default or if false, returns the consumption aggregated by resource type. If true, the response returns the consumption per ResourceId.
    Default: false.

  • ToDate: The end of the time period, in ISO 8601 date format (for example, 2020-06-30). The date-time format is also accepted, but only with a time set to midnight (for example, 2020-06-30T00:00:00.000Z). This value is excluded from the time period, and must be set to a later date than FromDate.

The ReadConsumptionAccount command returns the following elements:

  • ConsumptionEntries: Information about the resources consumed during the specified time period.

    • AccountId: The ID of your OUTSCALE account.

    • Category: The category of the resource (for example, network).

    • FromDate: The beginning of the time period (UTC).

    • Operation: The API call that triggered the resource consumption (for example, RunInstances or CreateVolume).

    • PayingAccountId: The ID of the OUTSCALE account which is billed for your consumption. It can be different from your account in the AccountId parameter.

    • Price: The total price of the consumed resource during the specified time period, in the currency of the Region’s catalog.

    • ResourceId: The ID of the consumed resource.

    • Service: The service of the API call (TinaOS-FCU, TinaOS-LBU, TinaOS-DirectLink, TinaOS-OOS, TinaOS-OSU, or OKS).

    • SubregionName: The name of the Subregion.

    • Title: A description of the consumed resource.

    • ToDate: The end of the time period (UTC).

    • Type: The type of resource, depending on the API call.

    • UnitPrice: The unit price of the consumed resource in the currency of your account, in the ISO-4217 format (for example, EUR).

    • Value: The consumed amount for the resource. The unit depends on the resource type. For more information, see the Title element.

  • Currency: The currency of your account for the UnitPrice and Price parameters, in the ISO-4217 format (for example, EUR).

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample: ReadConsumptionAccount with ShowPrice and ShowResourceDetails at false
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ConsumptionEntries": [
    {
      "UnitPrice": 0.18,
      "Type": "BoxUsage:tinav5.c4r8p2"
    },
    {
      "FromDate": "2023-06-01T00:00:00.000+0000",
      "SubregionName": "eu-west-2a",
      "Value": 1488,
      "Title": "Instance - On demand - tinav5.c4r8 high performance - par heure",
      "Category": "compute",
      "ToDate": "2023-06-30T00:00:00.000+0000",
      "Service": "TinaOS-FCU",
      "AccountId": "123456789012",
      "PayingAccountId": "123456789012",
      "Operation": "RunInstances-OD",
      "Type": "BoxUsage:tinav5.c4r8p2"
    }
  ]
}
Result sample: ReadConsumptionAccount with ShowPrice and ShowResourceDetails at true
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Currency": "EUR",
  "ConsumptionEntries": [
    {
      "FromDate": "2023-06-01T00:00:00.000+0000",
      "SubregionName": "eu-west-2a",
      "Value": 720,
      "Title": "Instance - On demand - tinav5.c4r8 high performance - par heure",
      "Category": "compute",
      "ToDate": "2023-06-30T00:00:00.000+0000",
      "Service": "TinaOS-FCU",
      "AccountId": "123456789012",
      "PayingAccountId": "123456789012",
      "Operation": "RunInstances-OD",
      "Type": "BoxUsage:tinav5.c4r8p2",
      "UnitPrice": 0.18,
      "Price": 267.84,
      "ResourceId": "i-12345678"
    },
    {
      "FromDate": "2023-06-01T00:00:00.000+0000",
      "SubregionName": "eu-west-2a",
      "Value": 1488,
      "Title": "Instance - On demand - tinav5.c4r8p2 high performance - par heure",
      "Category": "compute",
      "ToDate": "2023-06-30T00:00:00.000+0000",
      "Service": "TinaOS-FCU",
      "AccountId": "123456789012",
      "PayingAccountId": "123456789012",
      "Operation": "RunInstances-OD",
      "Type": "BoxUsage:tinav5.c4r8p2",
      "UnitPrice": 0.18,
      "Price": 267.84,
      "ResourceId": "i-87654321"
    }
  ]
}

Obtenir des informations sur la consommation de vos ressources avec oapi-cli

À ce jour, cette section est disponible en anglais uniquement.

The ReadConsumptionAccount command gets information about the consumption of your OUTSCALE account for each billable resource within the specified time period.

Request sample
$ oapi-cli --profile "default" ReadConsumptionAccount \
    --FromDate "2023-06-01" \
    --ToDate "2023-07-01" \
    --ShowPrice false \
    --ShowResourceDetails false
Request sample
$ oapi-cli --profile "default" ReadConsumptionAccount \
    --FromDate "2023-06-01" \
    --ToDate "2023-07-01" \
    --ShowPrice true \
    --ShowResourceDetails true

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • FromDate: The beginning of the time period, in ISO 8601 date format (for example, 2020-06-14). The date-time format is also accepted, but only with a time set to midnight (for example, 2020-06-14T00:00:00.000Z). This value is included in the time period.

  • Overall: (optional) 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).
    Default: false.

  • ShowPrice: (optional) If true, the response also includes the unit price of the consumed resource (UnitPrice) and the total price of the consumed resource during the specified time period (Price), in the currency of the Region’s catalog.

  • ShowResourceDetails: (optional) By default or if false, returns the consumption aggregated by resource type. If true, the response returns the consumption per ResourceId.
    Default: false.

  • ToDate: The end of the time period, in ISO 8601 date format (for example, 2020-06-30). The date-time format is also accepted, but only with a time set to midnight (for example, 2020-06-30T00:00:00.000Z). This value is excluded from the time period, and must be set to a later date than FromDate.

The ReadConsumptionAccount command returns the following elements:

  • ConsumptionEntries: Information about the resources consumed during the specified time period.

    • AccountId: The ID of your OUTSCALE account.

    • Category: The category of the resource (for example, network).

    • FromDate: The beginning of the time period (UTC).

    • Operation: The API call that triggered the resource consumption (for example, RunInstances or CreateVolume).

    • PayingAccountId: The ID of the OUTSCALE account which is billed for your consumption. It can be different from your account in the AccountId parameter.

    • Price: The total price of the consumed resource during the specified time period, in the currency of the Region’s catalog.

    • ResourceId: The ID of the consumed resource.

    • Service: The service of the API call (TinaOS-FCU, TinaOS-LBU, TinaOS-DirectLink, TinaOS-OOS, TinaOS-OSU, or OKS).

    • SubregionName: The name of the Subregion.

    • Title: A description of the consumed resource.

    • ToDate: The end of the time period (UTC).

    • Type: The type of resource, depending on the API call.

    • UnitPrice: The unit price of the consumed resource in the currency of your account, in the ISO-4217 format (for example, EUR).

    • Value: The consumed amount for the resource. The unit depends on the resource type. For more information, see the Title element.

  • Currency: The currency of your account for the UnitPrice and Price parameters, in the ISO-4217 format (for example, EUR).

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample: ReadConsumptionAccount with ShowPrice and ShowResourceDetails at false
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ConsumptionEntries": [
    {
      "UnitPrice": 0.18,
      "Type": "BoxUsage:tinav5.c4r8p2"
    },
    {
      "FromDate": "2023-06-01T00:00:00.000+0000",
      "SubregionName": "eu-west-2a",
      "Value": 1488,
      "Title": "Instance - On demand - tinav5.c4r8 high performance - par heure",
      "Category": "compute",
      "ToDate": "2023-06-30T00:00:00.000+0000",
      "Service": "TinaOS-FCU",
      "AccountId": "123456789012",
      "PayingAccountId": "123456789012",
      "Operation": "RunInstances-OD",
      "Type": "BoxUsage:tinav5.c4r8p2"
    }
  ]
}
Result sample: ReadConsumptionAccount with ShowPrice and ShowResourceDetails at true
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "Currency": "EUR",
  "ConsumptionEntries": [
    {
      "FromDate": "2023-06-01T00:00:00.000+0000",
      "SubregionName": "eu-west-2a",
      "Value": 720,
      "Title": "Instance - On demand - tinav5.c4r8 high performance - par heure",
      "Category": "compute",
      "ToDate": "2023-06-30T00:00:00.000+0000",
      "Service": "TinaOS-FCU",
      "AccountId": "123456789012",
      "PayingAccountId": "123456789012",
      "Operation": "RunInstances-OD",
      "Type": "BoxUsage:tinav5.c4r8p2",
      "UnitPrice": 0.18,
      "Price": 267.84,
      "ResourceId": "i-12345678"
    },
    {
      "FromDate": "2023-06-01T00:00:00.000+0000",
      "SubregionName": "eu-west-2a",
      "Value": 1488,
      "Title": "Instance - On demand - tinav5.c4r8p2 high performance - par heure",
      "Category": "compute",
      "ToDate": "2023-06-30T00:00:00.000+0000",
      "Service": "TinaOS-FCU",
      "AccountId": "123456789012",
      "PayingAccountId": "123456789012",
      "Operation": "RunInstances-OD",
      "Type": "BoxUsage:tinav5.c4r8p2",
      "UnitPrice": 0.18,
      "Price": 267.84,
      "ResourceId": "i-87654321"
    }
  ]
}

Pages connexes

Méthode API correspondante