Exports - Create Or Update

Dışarı aktarma oluşturma veya güncelleştirme işlemi. Güncelleştirme işlemi, istekte en son eTag'in ayarlanmasını gerektirir. Bir get işlemi gerçekleştirerek en son eTag'i alabilirsiniz. Oluşturma işlemi eTag gerektirmez.

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

URI Parametreleri

Name İçinde Gerekli Tür Description
exportName
path True

string

Dışarı Aktarma Adı.

scope
path True

string

Dışarı aktarma işlemleriyle ilişkili kapsam. Buna abonelik kapsamı için '/subscriptions/{subscriptionId}/' dahildir, ResourceGroup kapsamı için '/subscriptions/{subscriptionId}/resourceGroupname}', Faturalama Hesabı kapsamı için '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' ve Departman kapsamı için '/providers/Microsoft.Billing/billingAccountId}/{billingAccountId}/departments/{departmentId}' Bölüm kapsamı için '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{ EnrollmentAccount kapsamı için enrollmentAccountId}', Yönetim Grubu kapsamı için '/providers/Microsoft.Management/managementGroups/{managementGroupId} billingProfile kapsamı için '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}', invoiceSection kapsamı için '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' ve '/providers/Microsoft. İş ortakları için billing/billingAccounts/{billingAccountId}/customers/{customerId}' özel.

api-version
query True

string

Bu işlem için kullanılacak API sürümü.

İstek Gövdesi

Name Gerekli Tür Description
properties.definition True

ExportDefinition

Dışarı aktarmanın tanımına sahiptir.

properties.deliveryInfo True

ExportDeliveryInfo

Dışarı aktarma için teslim bilgilerine sahiptir.

eTag

string

Kaynağın eTag'i. Eşzamanlı güncelleştirme senaryolarını işlemek için, kullanıcının en son sürümü güncelleştirip güncelleştirmediğini belirlemek için bu alan kullanılır.

identity

SystemAssignedServiceIdentity

Dışarı Aktarma ile ilişkili yönetilen kimlik

location

string

Dışarı Aktarma'nın yönetilen kimliğinin konumu. Yalnızca yönetilen kimlik kullanıldığında gereklidir.

properties.format

FormatType

Teslim edilen dışarı aktarma biçimi. Şu anda yalnızca 'Csv' desteklenmektedir.

properties.partitionData

boolean

True olarak ayarlanırsa, dışarı aktarılan veriler boyuta göre bölümlenir ve bildirim dosyasıyla birlikte bir blob dizinine yerleştirilir. Not: Bu seçenek şu anda yalnızca Microsoft Müşteri Sözleşmesi ticaret kapsamlarında kullanılabilir.

properties.runHistory

ExportExecutionListResult

İstenirse, dışarı aktarma için en son çalıştırma geçmişine sahiptir.

properties.schedule

ExportSchedule

Dışarı aktarma için zamanlama bilgilerine sahiptir.

Yanıtlar

Name Tür Description
200 OK

Export

Tamam ögesini seçin. İstek başarılı oldu.

201 Created

Export

Oluşturulan.

Other Status Codes

ErrorResponse

İşlemin neden başarısız olduğunu açıklayan hata yanıtı.

Güvenlik

azure_auth

Azure Active Directory OAuth2 Flow.

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

Scopes

Name Description
user_impersonation kullanıcı hesabınızın kimliğine bürünme

Örnekler

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

Tanımlar

Name Description
CommonExportProperties

Dışarı aktarmanın ortak özellikleri.

ErrorDetails

Hatanın ayrıntıları.

ErrorResponse

Hata yanıtı, hizmetin gelen isteği işleyemediğini gösterir. Nedeni hata iletisinde verilmiştir.

Bazı Hata yanıtları:

  • 429 TooManyRequests - İstek kısıtlandı. "x-ms-ratelimit-microsoft.consumption-retry-after" üst bilgisinde belirtilen süreyi bekledikten sonra yeniden deneyin.

  • 503 ServiceUnavailable - Hizmet geçici olarak kullanılamıyor. "Retry-After" üst bilgisinde belirtilen süre bekledikten sonra yeniden deneyin.

ExecutionStatus

Dışarı aktarma çalıştırmasının bilinen son durumu.

ExecutionType

Dışarı aktarma çalıştırmasının türü.

Export

Dışarı aktarma kaynağı.

ExportDataset

Dışarı aktarmadaki verilerin tanımı.

ExportDatasetConfiguration

Veri kümesini dışarı aktarma yapılandırması. Dışarı aktarma için sütunların seçilmesine izin verir. Sağlanmadıysa dışarı aktarma işlemi tüm kullanılabilir sütunları içerir.

ExportDefinition

Dışarı aktarmanın tanımı.

ExportDeliveryDestination

Bu, maliyetlerin dışarı aktarılmasının teslim edildiği blob depolama hesabı konumunu temsil eder. Hedefi yapılandırmanın iki yolu vardır. Çoğu müşteri için önerilen yaklaşım, depolama hesabının resourceId değerini belirtmektir. Bu, Maliyet Yönetimi hizmetlerine depolama alanı erişimi vermek için hesabın Microsoft.CostManagementExports kaynak sağlayıcısına aboneliğinin tek seferlik kaydedilmesini gerektirir. Azure portal dışarı aktarma oluşturulurken bu kayıt otomatik olarak gerçekleştirilir ancak API kullanıcılarının aboneliği açıkça kaydetmesi gerekebilir (daha fazla bilgi için bkz https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services . ). Hedefi yapılandırmanın bir diğer yolu da YALNIZCA ödeme hesabının genel yöneticisi olan Microsoft İş Ortağı Sözleşmesi planı olan İş Ortakları tarafından kullanılabilir. Bu İş Ortakları, depolama hesabının resourceId değerini belirtmek yerine, depolama hesabı adını ve hesap için bir SAS belirteci belirtebilir. Bu, maliyetlerin herhangi bir kiracıdaki bir depolama hesabına aktarılmasına olanak tanır. SAS belirteci, blob hizmeti için Hizmet/Kapsayıcı/Nesne kaynak türleriyle ve Okuma/Yazma/Silme/Listeleme/Ekleme/Oluşturma izinleriyle oluşturulmalıdır (daha fazla bilgi için bkz https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key . ).

ExportDeliveryInfo

Dışarı aktarmayla ilişkili teslim bilgileri.

ExportExecutionListResult

Dışarı aktarmanın çalıştırma geçmişini listelemenin sonucu.

ExportRecurrencePeriod

Yinelenme zamanlaması için başlangıç ve bitiş tarihi.

ExportRun

Dışarı aktarma çalıştırması.

ExportSchedule

Dışarı aktarma ile ilişkili zamanlama.

ExportTimePeriod

Dışarı aktarmadaki verilerin tarih aralığı. Bu yalnızca timeFrame 'Custom' olarak ayarlanmış olarak belirtilmelidir. En fazla tarih aralığı 3 aydır.

ExportType

Dışarı aktarmanın türü. 'Kullanım'ın 'ActualCost' ile eşdeğer olduğunu ve henüz ücret veya hizmet rezervasyonları için amorti verileri sağlamayan dışarı aktarma işlemleri için geçerli olduğunu unutmayın.

FormatType

Teslim edilen dışarı aktarma biçimi. Şu anda yalnızca 'Csv' desteklenmektedir.

GranularityType

Dışarı aktarmadaki satırların ayrıntı düzeyi. Şu anda yalnızca 'Günlük' desteklenmektedir.

RecurrenceType

Zamanlama yinelenme.

StatusType

Dışarı aktarma zamanlamasının durumu. 'Etkin Değil' ise dışarı aktarmanın zamanlaması duraklatılır.

SystemAssignedServiceIdentity

Yönetilen hizmet kimliği (sistem tarafından atanmış veya yok)

SystemAssignedServiceIdentityType

Yönetilen hizmet kimliğinin türü (sistem tarafından atanmış veya yok).

TimeframeType

Dışarı aktarma için veri çekme zaman çerçevesi. Özelse, belirli bir zaman aralığı sağlanmalıdır.

CommonExportProperties

Dışarı aktarmanın ortak özellikleri.

Name Tür Description
definition

ExportDefinition

Dışarı aktarmanın tanımına sahiptir.

deliveryInfo

ExportDeliveryInfo

Dışarı aktarma için teslim bilgilerine sahiptir.

format

FormatType

Teslim edilen dışarı aktarma biçimi. Şu anda yalnızca 'Csv' desteklenmektedir.

nextRunTimeEstimate

string

Dışarı aktarmanın etkin bir zamanlaması varsa, bir sonraki çalışma zamanına ilişkin bir tahmin sağlar.

partitionData

boolean

True olarak ayarlanırsa, dışarı aktarılan veriler boyuta göre bölümlenir ve bildirim dosyasıyla birlikte bir blob dizinine yerleştirilir. Not: Bu seçenek şu anda yalnızca Microsoft Müşteri Sözleşmesi ticaret kapsamlarında kullanılabilir.

runHistory

ExportExecutionListResult

İstenirse, dışarı aktarma için en son çalıştırma geçmişine sahiptir.

ErrorDetails

Hatanın ayrıntıları.

Name Tür Description
code

string

Hata kodu.

message

string

İşlemin neden başarısız olduğunu belirten hata iletisi.

ErrorResponse

Hata yanıtı, hizmetin gelen isteği işleyemediğini gösterir. Nedeni hata iletisinde verilmiştir.

Bazı Hata yanıtları:

  • 429 TooManyRequests - İstek kısıtlandı. "x-ms-ratelimit-microsoft.consumption-retry-after" üst bilgisinde belirtilen süreyi bekledikten sonra yeniden deneyin.

  • 503 ServiceUnavailable - Hizmet geçici olarak kullanılamıyor. "Retry-After" üst bilgisinde belirtilen süre bekledikten sonra yeniden deneyin.

Name Tür Description
error

ErrorDetails

Hatanın ayrıntıları.

ExecutionStatus

Dışarı aktarma çalıştırmasının bilinen son durumu.

Name Tür Description
Completed

string

DataNotAvailable

string

Failed

string

InProgress

string

NewDataNotAvailable

string

Queued

string

Timeout

string

ExecutionType

Dışarı aktarma çalıştırmasının türü.

Name Tür Description
OnDemand

string

Scheduled

string

Export

Dışarı aktarma kaynağı.

Name Tür Description
eTag

string

Kaynağın eTag'i. Eşzamanlı güncelleştirme senaryolarını işlemek için bu alan, kullanıcının en son sürümü güncelleştirip güncelleştirmediğini belirlemek için kullanılır.

id

string

Kaynak Kimliği.

identity

SystemAssignedServiceIdentity

Dışarı Aktarma ile ilişkili yönetilen kimlik

location

string

Dışarı aktarmanın yönetilen kimliğinin konumu. Yalnızca yönetilen kimlik kullanıldığında gereklidir.

name

string

Kaynak adı.

properties.definition

ExportDefinition

Dışarı aktarmanın tanımına sahiptir.

properties.deliveryInfo

ExportDeliveryInfo

Dışarı aktarma için teslimat bilgilerine sahiptir.

properties.format

FormatType

Teslim edilen dışarı aktarmanın biçimi. Şu anda yalnızca 'Csv' desteklenmektedir.

properties.nextRunTimeEstimate

string

Dışarı aktarmanın etkin bir zamanlaması varsa, sonraki çalışma zamanına ilişkin bir tahmin sağlar.

properties.partitionData

boolean

True olarak ayarlanırsa, dışarı aktarılan veriler boyuta göre bölümlenir ve bildirim dosyasıyla birlikte bir blob dizinine yerleştirilir. Not: Bu seçenek şu anda yalnızca Microsoft Müşteri Sözleşmesi ticaret kapsamlarında kullanılabilir.

properties.runHistory

ExportExecutionListResult

İstenirse, dışarı aktarma için en son çalıştırma geçmişine sahiptir.

properties.schedule

ExportSchedule

Dışarı aktarma için zamanlama bilgilerine sahiptir.

type

string

Kaynak türü.

ExportDataset

Dışarı aktarmadaki verilerin tanımı.

Name Tür Description
configuration

ExportDatasetConfiguration

Veri kümesi dışarı aktarma yapılandırması.

granularity

GranularityType

Dışarı aktarmadaki satırların ayrıntı düzeyi. Şu anda yalnızca 'Günlük' desteklenmektedir.

ExportDatasetConfiguration

Veri kümesini dışarı aktarma yapılandırması. Dışarı aktarma için sütunların seçilmesine izin verir. Sağlanmadıysa dışarı aktarma işlemi tüm kullanılabilir sütunları içerir.

Name Tür Description
columns

string[]

Dışarı aktarmaya eklenecek sütun adları dizisi. Sağlanmadıysa dışarı aktarma işlemi tüm kullanılabilir sütunları içerir. Kullanılabilir sütunlar müşteri kanalına göre farklılık gösterebilir (örneklere bakın).

ExportDefinition

Dışarı aktarmanın tanımı.

Name Tür Description
dataSet

ExportDataset

Dışarı aktarmadaki verilerin tanımı.

timePeriod

ExportTimePeriod

Dışarı aktarma için verileri çekmek için zaman aralığına sahiptir.

timeframe

TimeframeType

Dışarı aktarma için veri çekme zaman çerçevesi. Özelse, belirli bir zaman aralığı sağlanmalıdır.

type

ExportType

Dışarı aktarmanın türü. 'Kullanım'ın 'ActualCost' ile eşdeğer olduğunu ve henüz ücret veya hizmet rezervasyonları için amorti verileri sağlamayan dışarı aktarma işlemleri için geçerli olduğunu unutmayın.

ExportDeliveryDestination

Bu, maliyetlerin dışarı aktarılmasının teslim edildiği blob depolama hesabı konumunu temsil eder. Hedefi yapılandırmanın iki yolu vardır. Çoğu müşteri için önerilen yaklaşım, depolama hesabının resourceId değerini belirtmektir. Bu, Maliyet Yönetimi hizmetlerine depolama alanı erişimi vermek için hesabın Microsoft.CostManagementExports kaynak sağlayıcısına aboneliğinin tek seferlik kaydedilmesini gerektirir. Azure portal dışarı aktarma oluşturulurken bu kayıt otomatik olarak gerçekleştirilir ancak API kullanıcılarının aboneliği açıkça kaydetmesi gerekebilir (daha fazla bilgi için bkz https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services . ). Hedefi yapılandırmanın bir diğer yolu da YALNIZCA ödeme hesabının genel yöneticisi olan Microsoft İş Ortağı Sözleşmesi planı olan İş Ortakları tarafından kullanılabilir. Bu İş Ortakları, depolama hesabının resourceId değerini belirtmek yerine, depolama hesabı adını ve hesap için bir SAS belirteci belirtebilir. Bu, maliyetlerin herhangi bir kiracıdaki bir depolama hesabına aktarılmasına olanak tanır. SAS belirteci, blob hizmeti için Hizmet/Kapsayıcı/Nesne kaynak türleriyle ve Okuma/Yazma/Silme/Listeleme/Ekleme/Oluşturma izinleriyle oluşturulmalıdır (daha fazla bilgi için bkz https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key . ).

Name Tür Description
container

string

Dışarı aktarmaların karşıya yüklendiği kapsayıcının adı. Kapsayıcı yoksa oluşturulur.

resourceId

string

Dışarı aktarmaların teslim edildiği depolama hesabının kaynak kimliği. SasToken ve storageAccount belirtilirse bu gerekli değildir.

rootFolderPath

string

Dışarı aktarmaların karşıya yüklendiği dizinin adı.

sasToken

string

Depolama hesabı için bir SAS belirteci. Kısıtlı bir Azure müşterisi kümesi için resourceId yerine storageAccount ile birlikte belirtilebilir. Not: Bu özellik için API tarafından döndürülen değer her zaman karartılır. Aynı karartılmış değerin döndürülmesi SAS belirtecinin güncelleştirilmesiyle sonuçlanmaz. Bu değeri güncelleştirmek için yeni bir SAS belirteci belirtilmelidir.

storageAccount

string

Dışarı aktarmaların karşıya yüklendiği depolama hesabı. Kısıtlanmış bir Azure müşterileri kümesi için bu, resourceId yerine sasToken ile birlikte belirtilebilir.

ExportDeliveryInfo

Dışarı aktarmayla ilişkili teslim bilgileri.

Name Tür Description
destination

ExportDeliveryDestination

Teslim edilen dışarı aktarma için hedefe sahiptir.

ExportExecutionListResult

Dışarı aktarmanın çalıştırma geçmişini listelemenin sonucu.

Name Tür Description
value

ExportRun[]

Dışarı aktarma çalıştırmalarının listesi.

ExportRecurrencePeriod

Yinelenme zamanlaması için başlangıç ve bitiş tarihi.

Name Tür Description
from

string

Yinelenmenin başlangıç tarihi.

to

string

Yinelenme bitiş tarihi.

ExportRun

Dışarı aktarma çalıştırması.

Name Tür Description
eTag

string

Kaynağın eTag'i. Eşzamanlı güncelleştirme senaryolarını işlemek için, kullanıcının en son sürümü güncelleştirip güncelleştirmediğini belirlemek için bu alan kullanılır.

id

string

Kaynak Kimliği.

name

string

Kaynak adı.

properties.error

ErrorDetails

Herhangi bir hatanın ayrıntıları.

properties.executionType

ExecutionType

Dışarı aktarma çalıştırmasının türü.

properties.fileName

string

Dışarı aktarılan dosyanın adı.

properties.processingEndTime

string

Dışarı aktarma işleminin bittiği saat.

properties.processingStartTime

string

Dışarı aktarmanın çalıştırılacak şekilde alındığı saat.

properties.runSettings

CommonExportProperties

Bu çalıştırma için geçerli olan dışarı aktarma ayarları.

properties.status

ExecutionStatus

Dışarı aktarma çalıştırmasının bilinen son durumu.

properties.submittedBy

string

Dışarı aktarmayı tetikleyen varlığın tanımlayıcısı. İsteğe bağlı çalıştırmalar için bu, kullanıcı e-postasıdır. Zamanlanmış çalıştırmalar için 'Sistem'dir.

properties.submittedTime

string

Dışarı aktarmanın çalıştırılmaya kuyruğa alındığı saat.

type

string

Kaynak türü.

ExportSchedule

Dışarı aktarma ile ilişkili zamanlama.

Name Tür Description
recurrence

RecurrenceType

Zamanlama yinelenme.

recurrencePeriod

ExportRecurrencePeriod

Yinelenmenin başlangıç ve bitiş tarihidir. Başlangıç tarihi gelecekte olmalıdır. Varsa, bitiş tarihi başlangıç tarihinden büyük olmalıdır.

status

StatusType

Dışarı aktarma zamanlamasının durumu. 'Etkin Değil' ise dışarı aktarmanın zamanlaması duraklatılır.

ExportTimePeriod

Dışarı aktarmadaki verilerin tarih aralığı. Bu yalnızca timeFrame 'Custom' olarak ayarlanmış olarak belirtilmelidir. En fazla tarih aralığı 3 aydır.

Name Tür Description
from

string

Verileri dışarı aktarmanın başlangıç tarihi.

to

string

Verileri dışarı aktarmanın bitiş tarihi.

ExportType

Dışarı aktarmanın türü. 'Kullanım'ın 'ActualCost' ile eşdeğer olduğunu ve henüz ücret veya hizmet rezervasyonları için amorti verileri sağlamayan dışarı aktarma işlemleri için geçerli olduğunu unutmayın.

Name Tür Description
ActualCost

string

AmortizedCost

string

Usage

string

FormatType

Teslim edilen dışarı aktarma biçimi. Şu anda yalnızca 'Csv' desteklenmektedir.

Name Tür Description
Csv

string

GranularityType

Dışarı aktarmadaki satırların ayrıntı düzeyi. Şu anda yalnızca 'Günlük' desteklenmektedir.

Name Tür Description
Daily

string

RecurrenceType

Zamanlama yinelenme.

Name Tür Description
Annually

string

Daily

string

Monthly

string

Weekly

string

StatusType

Dışarı aktarma zamanlamasının durumu. 'Etkin Değil' ise dışarı aktarmanın zamanlaması duraklatılır.

Name Tür Description
Active

string

Inactive

string

SystemAssignedServiceIdentity

Yönetilen hizmet kimliği (sistem tarafından atanmış veya yok)

Name Tür Description
principalId

string

Sistem tarafından atanan kimliğin hizmet sorumlusu kimliği. Bu özellik yalnızca sistem tarafından atanan kimlik için sağlanacaktır.

tenantId

string

Sistem tarafından atanan kimliğin kiracı kimliği. Bu özellik yalnızca sistem tarafından atanan kimlik için sağlanacaktır.

type

SystemAssignedServiceIdentityType

Yönetilen hizmet kimliğinin türü (sistem tarafından atanmış veya yok).

SystemAssignedServiceIdentityType

Yönetilen hizmet kimliğinin türü (sistem tarafından atanmış veya yok).

Name Tür Description
None

string

SystemAssigned

string

TimeframeType

Dışarı aktarma için veri çekme zaman çerçevesi. Özelse, belirli bir zaman aralığı sağlanmalıdır.

Name Tür Description
BillingMonthToDate

string

Custom

string

MonthToDate

string

TheLastBillingMonth

string

TheLastMonth

string

WeekToDate

string