Exports - Create Or Update

Operasi untuk membuat atau memperbarui ekspor. Operasi pembaruan memerlukan eTag terbaru untuk diatur dalam permintaan. Anda dapat memperoleh eTag terbaru dengan melakukan operasi get. Operasi buat tidak memerlukan eTag.

PUT https://management.azure.com/{scope}/providers/Microsoft.CostManagement/exports/{exportName}?api-version=2023-11-01

Parameter URI

Nama Dalam Diperlukan Jenis Deskripsi
exportName
path True

string

Nama Ekspor.

scope
path True

string

Cakupan yang terkait dengan operasi ekspor. Ini termasuk '/subscriptions/{subscriptionId}/' untuk cakupan langganan, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' untuk cakupan resourceGroup, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' untuk cakupan Akun Penagihan dan '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' untuk lingkup Departemen, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{ enrollmentAccountId}' untuk cakupan EnrollmentAccount, '/providers/Microsoft.Management/managementGroups/{managementGroupId} untuk cakupan Grup Manajemen, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' untuk cakupan billingProfile, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' untuk cakupan invoiceSection, dan '/providers/Microsoft. Billing/billingAccounts/{billingAccountId}/customers/{customerId}' khusus untuk mitra.

api-version
query True

string

Versi API yang digunakan untuk operasi ini.

Isi Permintaan

Nama Diperlukan Jenis Deskripsi
properties.definition True

ExportDefinition

Memiliki definisi untuk ekspor.

properties.deliveryInfo True

ExportDeliveryInfo

Memiliki informasi pengiriman untuk ekspor.

eTag

string

eTag sumber daya. Untuk menangani skenario pembaruan bersamaan, bidang ini akan digunakan untuk menentukan apakah pengguna memperbarui versi terbaru atau tidak.

identity

SystemAssignedServiceIdentity

Identitas terkelola yang terkait dengan Ekspor

location

string

Lokasi identitas terkelola Ekspor. Hanya diperlukan saat menggunakan identitas terkelola.

properties.format

FormatType

Format ekspor yang dikirimkan. Saat ini hanya 'Csv' yang didukung.

properties.partitionData

boolean

Jika diatur ke true, data yang diekspor akan dipartisi berdasarkan ukuran dan ditempatkan dalam direktori blob bersama dengan file manifes. Catatan: opsi ini saat ini hanya tersedia untuk cakupan perdagangan Perjanjian Pelanggan Microsoft.

properties.runHistory

ExportExecutionListResult

Jika diminta, memiliki riwayat eksekusi terbaru untuk ekspor.

properties.schedule

ExportSchedule

Memiliki informasi jadwal untuk ekspor.

Respons

Nama Jenis Deskripsi
200 OK

Export

OK. Permintaan telah berhasil.

201 Created

Export

Dibuat.

Other Status Codes

ErrorResponse

Respons kesalahan yang menjelaskan mengapa operasi gagal.

Keamanan

azure_auth

Alur OAuth2 Azure Active Directory.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Nama Deskripsi
user_impersonation meniru akun pengguna Anda

Contoh

ExportCreateOrUpdateByBillingAccount
ExportCreateOrUpdateByDepartment
ExportCreateOrUpdateByEnrollmentAccount
ExportCreateOrUpdateByManagementGroup
ExportCreateOrUpdateByResourceGroup
ExportCreateOrUpdateBySubscription

ExportCreateOrUpdateByBillingAccount

Sample Request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

ExportCreateOrUpdateByDepartment

Sample Request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

ExportCreateOrUpdateByEnrollmentAccount

Sample Request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

ExportCreateOrUpdateByManagementGroup

Sample Request

PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

ExportCreateOrUpdateByResourceGroup

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

ExportCreateOrUpdateBySubscription

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport?api-version=2023-11-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Sample Response

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}
{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Weekly",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-10-31T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "columns": [
            "Date",
            "MeterId",
            "ResourceId",
            "ResourceLocation",
            "Quantity"
          ]
        }
      }
    }
  }
}

Definisi

Nama Deskripsi
CommonExportProperties

Properti umum ekspor.

ErrorDetails

Detail kesalahan.

ErrorResponse

Respons kesalahan menunjukkan bahwa layanan tidak dapat memproses permintaan masuk. Alasannya disediakan dalam pesan kesalahan.

Beberapa respons Kesalahan:

  • 429 TooManyRequests - Permintaan dibatasi. Coba lagi setelah menunggu waktu yang ditentukan di header "x-ms-ratelimit-microsoft.consumption-retry-after".

  • 503 ServiceUnavailable - Layanan sementara tidak tersedia. Coba lagi setelah menunggu selama waktu yang ditentukan di header "Coba Lagi Setelah".

ExecutionStatus

Status terakhir yang diketahui dari eksekusi ekspor.

ExecutionType

Jenis eksekusi ekspor.

Export

Sumber daya ekspor.

ExportDataset

Definisi untuk data dalam ekspor.

ExportDatasetConfiguration

Konfigurasi himpunan data ekspor. Memungkinkan kolom dipilih untuk ekspor. Jika tidak disediakan maka ekspor akan menyertakan semua kolom yang tersedia.

ExportDefinition

Definisi ekspor.

ExportDeliveryDestination

Ini mewakili lokasi akun penyimpanan blob tempat ekspor biaya akan dikirimkan. Ada dua cara untuk mengonfigurasi tujuan. Pendekatan yang direkomendasikan untuk sebagian besar pelanggan adalah menentukan resourceId akun penyimpanan. Ini memerlukan pendaftaran satu kali langganan akun dengan penyedia sumber daya Microsoft.CostManagementExports untuk memberikan akses layanan Cost Management ke penyimpanan. Saat membuat ekspor di portal Azure pendaftaran ini dilakukan secara otomatis tetapi pengguna API mungkin perlu mendaftarkan langganan secara eksplisit (untuk informasi selengkapnya lihat https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ). Cara lain untuk mengonfigurasi tujuan hanya tersedia untuk Mitra dengan paket Perjanjian Mitra Microsoft yang merupakan admin global akun penagihan mereka. Mitra ini, alih-alih menentukan resourceId akun penyimpanan, dapat menentukan nama akun penyimpanan bersama dengan token SAS untuk akun tersebut. Ini memungkinkan ekspor biaya ke akun penyimpanan di penyewa mana pun. Token SAS harus dibuat untuk layanan blob dengan jenis sumber daya Layanan/Kontainer/Objek dan dengan izin Baca/Tulis/Hapus/Daftar/Tambahkan/Buat (untuk informasi selengkapnya lihat https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key ).

ExportDeliveryInfo

Informasi pengiriman yang terkait dengan ekspor.

ExportExecutionListResult

Hasil daftar riwayat eksekusi ekspor.

ExportRecurrencePeriod

Tanggal mulai dan berakhir untuk jadwal pengulangan.

ExportRun

Eksekusi ekspor.

ExportSchedule

Jadwal yang terkait dengan ekspor.

ExportTimePeriod

Rentang tanggal untuk data dalam ekspor. Ini hanya boleh ditentukan dengan timeFrame diatur ke 'Kustom'. Rentang tanggal maksimum adalah 3 bulan.

ExportType

Jenis ekspor. Perhatikan bahwa 'Penggunaan' setara dengan 'ActualCost' dan berlaku untuk ekspor yang belum menyediakan data untuk biaya atau amortisasi untuk reservasi layanan.

FormatType

Format ekspor yang dikirimkan. Saat ini hanya 'Csv' yang didukung.

GranularityType

Granularitas baris dalam ekspor. Saat ini hanya 'Harian' yang didukung.

RecurrenceType

Pengulangan jadwal.

StatusType

Status jadwal ekspor. Jika 'Tidak Aktif', jadwal ekspor dijeda.

SystemAssignedServiceIdentity

Identitas layanan terkelola (baik yang ditetapkan sistem, atau tidak ada)

SystemAssignedServiceIdentityType

Jenis identitas layanan terkelola (baik yang ditetapkan sistem, atau tidak ada).

TimeframeType

Jangka waktu untuk menarik data untuk ekspor. Jika kustom, maka periode waktu tertentu harus disediakan.

CommonExportProperties

Properti umum ekspor.

Nama Jenis Deskripsi
definition

ExportDefinition

Memiliki definisi untuk ekspor.

deliveryInfo

ExportDeliveryInfo

Memiliki informasi pengiriman untuk ekspor.

format

FormatType

Format ekspor yang dikirimkan. Saat ini hanya 'Csv' yang didukung.

nextRunTimeEstimate

string

Jika ekspor memiliki jadwal aktif, berikan perkiraan durasi berikutnya.

partitionData

boolean

Jika diatur ke true, data yang diekspor akan dipartisi berdasarkan ukuran dan ditempatkan dalam direktori blob bersama dengan file manifes. Catatan: opsi ini saat ini hanya tersedia untuk cakupan perdagangan Perjanjian Pelanggan Microsoft.

runHistory

ExportExecutionListResult

Jika diminta, memiliki riwayat eksekusi terbaru untuk ekspor.

ErrorDetails

Detail kesalahan.

Nama Jenis Deskripsi
code

string

Kode Kesalahan.

message

string

Pesan kesalahan yang menunjukkan mengapa operasi gagal.

ErrorResponse

Respons kesalahan menunjukkan bahwa layanan tidak dapat memproses permintaan masuk. Alasannya disediakan dalam pesan kesalahan.

Beberapa respons Kesalahan:

  • 429 TooManyRequests - Permintaan dibatasi. Coba lagi setelah menunggu waktu yang ditentukan di header "x-ms-ratelimit-microsoft.consumption-retry-after".

  • 503 ServiceUnavailable - Layanan sementara tidak tersedia. Coba lagi setelah menunggu selama waktu yang ditentukan di header "Coba Lagi Setelah".

Nama Jenis Deskripsi
error

ErrorDetails

Detail kesalahan.

ExecutionStatus

Status terakhir yang diketahui dari eksekusi ekspor.

Nama Jenis Deskripsi
Completed

string

DataNotAvailable

string

Failed

string

InProgress

string

NewDataNotAvailable

string

Queued

string

Timeout

string

ExecutionType

Jenis eksekusi ekspor.

Nama Jenis Deskripsi
OnDemand

string

Scheduled

string

Export

Sumber daya ekspor.

Nama Jenis Deskripsi
eTag

string

eTag sumber daya. Untuk menangani skenario pembaruan bersamaan, bidang ini akan digunakan untuk menentukan apakah pengguna memperbarui versi terbaru atau tidak.

id

string

Id Sumber Daya.

identity

SystemAssignedServiceIdentity

Identitas terkelola yang terkait dengan Ekspor

location

string

Lokasi identitas terkelola Ekspor. Hanya diperlukan saat menggunakan identitas terkelola.

name

string

Nama sumber daya.

properties.definition

ExportDefinition

Memiliki definisi untuk ekspor.

properties.deliveryInfo

ExportDeliveryInfo

Memiliki informasi pengiriman untuk ekspor.

properties.format

FormatType

Format ekspor yang dikirimkan. Saat ini hanya 'Csv' yang didukung.

properties.nextRunTimeEstimate

string

Jika ekspor memiliki jadwal aktif, berikan perkiraan durasi berikutnya.

properties.partitionData

boolean

Jika diatur ke true, data yang diekspor akan dipartisi berdasarkan ukuran dan ditempatkan dalam direktori blob bersama dengan file manifes. Catatan: opsi ini saat ini hanya tersedia untuk cakupan perdagangan Perjanjian Pelanggan Microsoft.

properties.runHistory

ExportExecutionListResult

Jika diminta, memiliki riwayat eksekusi terbaru untuk ekspor.

properties.schedule

ExportSchedule

Memiliki informasi jadwal untuk ekspor.

type

string

Jenis sumber daya

ExportDataset

Definisi untuk data dalam ekspor.

Nama Jenis Deskripsi
configuration

ExportDatasetConfiguration

Konfigurasi himpunan data ekspor.

granularity

GranularityType

Granularitas baris dalam ekspor. Saat ini hanya 'Harian' yang didukung.

ExportDatasetConfiguration

Konfigurasi himpunan data ekspor. Memungkinkan kolom dipilih untuk ekspor. Jika tidak disediakan maka ekspor akan menyertakan semua kolom yang tersedia.

Nama Jenis Deskripsi
columns

string[]

Array nama kolom yang akan disertakan dalam ekspor. Jika tidak disediakan maka ekspor akan menyertakan semua kolom yang tersedia. Kolom yang tersedia dapat bervariasi menurut saluran pelanggan (lihat contoh).

ExportDefinition

Definisi ekspor.

Nama Jenis Deskripsi
dataSet

ExportDataset

Definisi untuk data dalam ekspor.

timePeriod

ExportTimePeriod

Memiliki periode waktu untuk menarik data untuk ekspor.

timeframe

TimeframeType

Jangka waktu untuk menarik data untuk ekspor. Jika kustom, maka periode waktu tertentu harus disediakan.

type

ExportType

Jenis ekspor. Perhatikan bahwa 'Penggunaan' setara dengan 'ActualCost' dan berlaku untuk ekspor yang belum menyediakan data untuk biaya atau amortisasi untuk reservasi layanan.

ExportDeliveryDestination

Ini mewakili lokasi akun penyimpanan blob tempat ekspor biaya akan dikirimkan. Ada dua cara untuk mengonfigurasi tujuan. Pendekatan yang direkomendasikan untuk sebagian besar pelanggan adalah menentukan resourceId akun penyimpanan. Ini memerlukan pendaftaran satu kali langganan akun dengan penyedia sumber daya Microsoft.CostManagementExports untuk memberikan akses layanan Cost Management ke penyimpanan. Saat membuat ekspor di portal Azure pendaftaran ini dilakukan secara otomatis tetapi pengguna API mungkin perlu mendaftarkan langganan secara eksplisit (untuk informasi selengkapnya lihat https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ). Cara lain untuk mengonfigurasi tujuan hanya tersedia untuk Mitra dengan paket Perjanjian Mitra Microsoft yang merupakan admin global akun penagihan mereka. Mitra ini, alih-alih menentukan resourceId akun penyimpanan, dapat menentukan nama akun penyimpanan bersama dengan token SAS untuk akun tersebut. Ini memungkinkan ekspor biaya ke akun penyimpanan di penyewa mana pun. Token SAS harus dibuat untuk layanan blob dengan jenis sumber daya Layanan/Kontainer/Objek dan dengan izin Baca/Tulis/Hapus/Daftar/Tambahkan/Buat (untuk informasi selengkapnya lihat https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key ).

Nama Jenis Deskripsi
container

string

Nama kontainer tempat ekspor akan diunggah. Jika kontainer tidak ada, kontainer akan dibuat.

resourceId

string

Id sumber daya akun penyimpanan tempat ekspor akan dikirimkan. Ini tidak diperlukan jika sasToken dan storageAccount ditentukan.

rootFolderPath

string

Nama direktori tempat ekspor akan diunggah.

sasToken

string

Token SAS untuk akun penyimpanan. Untuk sekumpulan pelanggan Azure terbatas, ini bersama dengan storageAccount dapat ditentukan alih-alih resourceId. Catatan: nilai yang dikembalikan oleh API untuk properti ini akan selalu dikaburkan. Mengembalikan nilai yang dikaburkan yang sama ini tidak akan mengakibatkan token SAS diperbarui. Untuk memperbarui nilai ini, token SAS baru harus ditentukan.

storageAccount

string

Akun penyimpanan tempat ekspor akan diunggah. Untuk sekumpulan pelanggan Azure terbatas, ini bersama dengan sasToken dapat ditentukan alih-alih resourceId.

ExportDeliveryInfo

Informasi pengiriman yang terkait dengan ekspor.

Nama Jenis Deskripsi
destination

ExportDeliveryDestination

Memiliki tujuan untuk ekspor yang dikirimkan.

ExportExecutionListResult

Hasil daftar riwayat eksekusi ekspor.

Nama Jenis Deskripsi
value

ExportRun[]

Daftar eksekusi ekspor.

ExportRecurrencePeriod

Tanggal mulai dan berakhir untuk jadwal pengulangan.

Nama Jenis Deskripsi
from

string

Tanggal mulai pengulangan.

to

string

Tanggal akhir pengulangan.

ExportRun

Eksekusi ekspor.

Nama Jenis Deskripsi
eTag

string

eTag sumber daya. Untuk menangani skenario pembaruan bersamaan, bidang ini akan digunakan untuk menentukan apakah pengguna memperbarui versi terbaru atau tidak.

id

string

Id Sumber Daya.

name

string

Nama sumber daya.

properties.error

ErrorDetails

Detail kesalahan apa pun.

properties.executionType

ExecutionType

Jenis eksekusi ekspor.

properties.fileName

string

Nama file yang diekspor.

properties.processingEndTime

string

Waktu ketika eksekusi ekspor selesai.

properties.processingStartTime

string

Waktu ketika ekspor diambil untuk dijalankan.

properties.runSettings

CommonExportProperties

Pengaturan ekspor yang berlaku untuk eksekusi ini.

properties.status

ExecutionStatus

Status terakhir yang diketahui dari eksekusi ekspor.

properties.submittedBy

string

Pengidentifikasi untuk entitas yang memicu ekspor. Untuk eksekusi sesuai permintaan, ini adalah email pengguna. Untuk eksekusi terjadwal, ini adalah 'Sistem'.

properties.submittedTime

string

Waktu ketika ekspor diantrekan untuk dijalankan.

type

string

Jenis sumber daya

ExportSchedule

Jadwal yang terkait dengan ekspor.

Nama Jenis Deskripsi
recurrence

RecurrenceType

Pengulangan jadwal.

recurrencePeriod

ExportRecurrencePeriod

Memiliki tanggal mulai dan berakhirnya pengulangan. Tanggal mulai harus di masa mendatang. Jika ada, tanggal selesai harus lebih besar dari tanggal mulai.

status

StatusType

Status jadwal ekspor. Jika 'Tidak Aktif', jadwal ekspor dijeda.

ExportTimePeriod

Rentang tanggal untuk data dalam ekspor. Ini hanya boleh ditentukan dengan timeFrame diatur ke 'Kustom'. Rentang tanggal maksimum adalah 3 bulan.

Nama Jenis Deskripsi
from

string

Tanggal mulai untuk mengekspor data.

to

string

Tanggal selesai untuk mengekspor data.

ExportType

Jenis ekspor. Perhatikan bahwa 'Penggunaan' setara dengan 'ActualCost' dan berlaku untuk ekspor yang belum menyediakan data untuk biaya atau amortisasi untuk reservasi layanan.

Nama Jenis Deskripsi
ActualCost

string

AmortizedCost

string

Usage

string

FormatType

Format ekspor yang dikirimkan. Saat ini hanya 'Csv' yang didukung.

Nama Jenis Deskripsi
Csv

string

GranularityType

Granularitas baris dalam ekspor. Saat ini hanya 'Harian' yang didukung.

Nama Jenis Deskripsi
Daily

string

RecurrenceType

Pengulangan jadwal.

Nama Jenis Deskripsi
Annually

string

Daily

string

Monthly

string

Weekly

string

StatusType

Status jadwal ekspor. Jika 'Tidak Aktif', jadwal ekspor dijeda.

Nama Jenis Deskripsi
Active

string

Inactive

string

SystemAssignedServiceIdentity

Identitas layanan terkelola (baik yang ditetapkan sistem, atau tidak ada)

Nama Jenis Deskripsi
principalId

string

ID perwakilan layanan dari identitas yang ditetapkan sistem. Properti ini hanya akan disediakan untuk identitas yang ditetapkan sistem.

tenantId

string

ID penyewa dari identitas yang ditetapkan sistem. Properti ini hanya akan disediakan untuk identitas yang ditetapkan sistem.

type

SystemAssignedServiceIdentityType

Jenis identitas layanan terkelola (baik yang ditetapkan sistem, atau tidak ada).

SystemAssignedServiceIdentityType

Jenis identitas layanan terkelola (baik yang ditetapkan sistem, atau tidak ada).

Nama Jenis Deskripsi
None

string

SystemAssigned

string

TimeframeType

Jangka waktu untuk menarik data untuk ekspor. Jika kustom, maka periode waktu tertentu harus disediakan.

Nama Jenis Deskripsi
BillingMonthToDate

string

Custom

string

MonthToDate

string

TheLastBillingMonth

string

TheLastMonth

string

WeekToDate

string