Megosztás a következőn keresztül:


Alerts - Get

Lekéri a hatókörhöz tartozó riasztást a riasztásazonosító alapján.

GET https://management.azure.com/{scope}/providers/Microsoft.CostManagement/alerts/{alertId}?api-version=2023-11-01

URI-paraméterek

Name In Kötelező Típus Description
alertId
path True

string

Riasztás azonosítója

scope
path True

string

A riasztási műveletekhez társított hatókör. Ide tartozik a resourceGroup-hatókör "/subscriptions/{subscriptionId}/" előfizetési hatóköre, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}", "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}" a számlázási fiók hatóköréhez és a "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}" osztály hatóköréhez, "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{ enrollmentAccountId}" a Felügyeleti csoport hatóköréhez tartozó EnrollmentAccount hatókörhöz: "/providers/Microsoft.Management/managementGroups/{managementGroupId} "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}" a billingProfile hatókörhöz, "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}" a invoiceSection scope és a "/providers/Microsoft. Számlázás/billingAccounts/{billingAccountId}/customers/{customerId}' a partnerekre vonatkozóan.

api-version
query True

string

A művelethez használandó API-verzió.

Válaszok

Name Típus Description
200 OK

Alert

OK gombra. A kérés sikeres volt.

Other Status Codes

ErrorResponse

Hibaválasz, amely leírja, hogy a művelet miért hiúsult meg.

Biztonság

azure_auth

Azure Active Directory OAuth2 Flow.

Típus: oauth2
Folyamat: implicit
Engedélyezési URL: https://login.microsoftonline.com/common/oauth2/authorize

Hatókörök

Name Description
user_impersonation felhasználói fiók megszemélyesítése

Példák

SingleResourceGroupAlerts
SingleSubscriptionAlerts

SingleResourceGroupAlerts

Mintakérelem

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222?api-version=2023-11-01

Mintaválasz

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222",
  "name": "22222222-2222-2222-2222-222222222222",
  "type": "Microsoft.CostManagement/alerts",
  "properties": {
    "definition": {
      "type": "Budget",
      "category": "Cost",
      "criteria": "CostThresholdExceeded"
    },
    "description": "",
    "source": "Preset",
    "details": {
      "timeGrainType": "Quarterly",
      "periodStartDate": "2020-03-01T00:00:00Z",
      "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01",
      "resourceGroupFilter": [],
      "resourceFilter": [],
      "meterFilter": [],
      "tagFilter": {},
      "threshold": 0.8,
      "operator": "GreaterThan",
      "amount": 200000,
      "unit": "USD",
      "currentSpend": 161000.12,
      "contactEmails": [
        "1234@contoso.com"
      ],
      "contactGroups": [],
      "contactRoles": [],
      "overridingAlert": null
    },
    "costEntityId": "budget1",
    "status": "Active",
    "creationTime": "2020-04-27T11:07:52.7143901Z",
    "closeTime": "0001-01-01T00:00:00",
    "modificationTime": "2020-04-28T11:06:02.8999373Z",
    "statusModificationUserName": null,
    "statusModificationTime": "0001-01-01T00:00:00"
  }
}

SingleSubscriptionAlerts

Mintakérelem

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222?api-version=2023-11-01

Mintaválasz

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/alerts/22222222-2222-2222-2222-222222222222",
  "name": "22222222-2222-2222-2222-222222222222",
  "type": "Microsoft.CostManagement/alerts",
  "properties": {
    "definition": {
      "type": "Budget",
      "category": "Cost",
      "criteria": "CostThresholdExceeded"
    },
    "description": "",
    "source": "Preset",
    "details": {
      "timeGrainType": "Quarterly",
      "periodStartDate": "2020-03-01T00:00:00Z",
      "triggeredBy": "22222222-2222-2222-2222-222222222222_1_01",
      "resourceGroupFilter": [],
      "resourceFilter": [],
      "meterFilter": [],
      "tagFilter": {},
      "threshold": 0.8,
      "operator": "GreaterThan",
      "amount": 200000,
      "unit": "USD",
      "currentSpend": 161000.12,
      "contactEmails": [
        "1234@contoso.com"
      ],
      "contactGroups": [],
      "contactRoles": [],
      "overridingAlert": null
    },
    "costEntityId": "budget1",
    "status": "Active",
    "creationTime": "2020-04-27T11:07:52.7143901Z",
    "closeTime": "0001-01-01T00:00:00",
    "modificationTime": "2020-04-28T11:06:02.8999373Z",
    "statusModificationUserName": null,
    "statusModificationTime": "0001-01-01T00:00:00"
  }
}

Definíciók

Name Description
Alert

Egyéni riasztás.

AlertCategory

Riasztási kategória

AlertCriteria

Riasztást aktiváló feltételek

AlertOperator

operátor az currentSpend és az összeg összehasonlításához

AlertSource

Riasztás forrása

AlertStatus

riasztás állapota

AlertTimeGrainType

Időtartomány-ütemezés típusa

AlertType

riasztás típusa

Definition

meghatározza a riasztás típusát

Details

Riasztás részletei

ErrorDetails

A hiba részletei.

ErrorResponse

A hibaválasz azt jelzi, hogy a szolgáltatás nem tudja feldolgozni a bejövő kérést. Ennek okát a hibaüzenet adja meg.

Néhány hibaválasz:

  • 429 TooManyRequests – A kérés szabályozva van. Próbálkozzon újra az "x-ms-ratelimit-microsoft.consumption-retry-after" fejlécben megadott időpontra való várakozás után.

  • 503 ServiceUnavailable – A szolgáltatás átmenetileg nem érhető el. Várjon a „Retry-After” fejlécben megadott ideig, majd próbálkozzon újra.

TagFilter

címkék, amelyeket szűrni szeretne

Alert

Egyéni riasztás.

Name Típus Description
eTag

string

Az erőforrás eTagje. Az egyidejű frissítési forgatókönyv kezeléséhez ez a mező határozza meg, hogy a felhasználó frissíti-e a legújabb verziót.

id

string

Erőforrás-azonosító.

name

string

Erőforrás neve.

properties.closeTime

string

dateTime, amelyben a riasztás bezárult

properties.costEntityId

string

kapcsolódó költségvetés

properties.creationTime

string

dateTime, amelyben a riasztás létre lett hozva

properties.definition

Definition

meghatározza a riasztás típusát

properties.description

string

Riasztás leírása

properties.details

Details

Riasztás részletei

properties.modificationTime

string

dateTime, amelyben a riasztást legutóbb módosították

properties.source

AlertSource

Riasztás forrása

properties.status

AlertStatus

riasztás állapota

properties.statusModificationTime

string

dateTime, amelyben a riasztás állapotát legutóbb módosították

properties.statusModificationUserName

string

Felhasználó, aki legutóbb módosította a riasztást

type

string

Erőforrástípus.

AlertCategory

Riasztási kategória

Name Típus Description
Billing

string

Cost

string

System

string

Usage

string

AlertCriteria

Riasztást aktiváló feltételek

Name Típus Description
CostThresholdExceeded

string

CreditThresholdApproaching

string

CreditThresholdReached

string

CrossCloudCollectionError

string

CrossCloudNewDataAvailable

string

ForecastCostThresholdExceeded

string

ForecastUsageThresholdExceeded

string

GeneralThresholdError

string

InvoiceDueDateApproaching

string

InvoiceDueDateReached

string

MultiCurrency

string

QuotaThresholdApproaching

string

QuotaThresholdReached

string

UsageThresholdExceeded

string

AlertOperator

operátor az currentSpend és az összeg összehasonlításához

Name Típus Description
EqualTo

string

GreaterThan

string

GreaterThanOrEqualTo

string

LessThan

string

LessThanOrEqualTo

string

None

string

AlertSource

Riasztás forrása

Name Típus Description
Preset

string

User

string

AlertStatus

riasztás állapota

Name Típus Description
Active

string

Dismissed

string

None

string

Overridden

string

Resolved

string

AlertTimeGrainType

Időtartomány-ütemezés típusa

Name Típus Description
Annually

string

BillingAnnual

string

BillingMonth

string

BillingQuarter

string

Monthly

string

None

string

Quarterly

string

AlertType

riasztás típusa

Name Típus Description
Budget

string

BudgetForecast

string

Credit

string

General

string

Invoice

string

Quota

string

xCloud

string

Definition

meghatározza a riasztás típusát

Name Típus Description
category

AlertCategory

Riasztási kategória

criteria

AlertCriteria

Riasztást aktiváló feltételek

type

AlertType

riasztás típusa

Details

Riasztás részletei

Name Típus Description
amount

number

költségvetési küszöbérték összege

companyName

string

cégnév

contactEmails

string[]

a kapcsolattartó e-mailjeinek listája

contactGroups

string[]

azoknak a műveletcsoportoknak a listája,

contactRoles

string[]

partneri szerepkörök listája

currentSpend

number

aktuális kiadások

departmentName

string

részleg neve

enrollmentEndDate

string

a regisztráció dátumidejeEndDate

enrollmentNumber

string

regisztrációs szám

enrollmentStartDate

string

a regisztráció datetimeStartDate

invoicingThreshold

number

számlázási küszöbérték

meterFilter

AlertProperties.details.MeterFilter[]

mérők tömbje a szűréshez

operator

AlertOperator

operátor az currentSpend és az összeg összehasonlításához

overridingAlert

string

felülíró riasztás

periodStartDate

string

periodStartDate datetime

resourceFilter

AlertProperties.details.ResourceFilter[]

a szűrni kívánt erőforrások tömbje

resourceGroupFilter

AlertProperties.details.ResourceGroupFilter[]

resourceGroups tömbje, amely alapján szűrni szeretne

tagFilter

TagFilter

címkék, amelyeket szűrni szeretne

threshold

number

értesítési küszöbérték százalékos értéke tizedes törtként, amely aktiválta ezt a riasztást

timeGrainType

AlertTimeGrainType

Időtartomány-ütemezés típusa

triggeredBy

string

notificationId, amely aktiválta ezt a riasztást

unit

string

használt pénznemegység

ErrorDetails

A hiba részletei.

Name Típus Description
code

string

Hibakód.

message

string

Hibaüzenet jelzi, hogy a művelet miért nem sikerült.

ErrorResponse

A hibaválasz azt jelzi, hogy a szolgáltatás nem tudja feldolgozni a bejövő kérést. Ennek okát a hibaüzenet adja meg.

Néhány hibaválasz:

  • 429 TooManyRequests – A kérés szabályozva van. Próbálkozzon újra az "x-ms-ratelimit-microsoft.consumption-retry-after" fejlécben megadott időpontra való várakozás után.

  • 503 ServiceUnavailable – A szolgáltatás átmenetileg nem érhető el. Várjon a „Retry-After” fejlécben megadott ideig, majd próbálkozzon újra.

Name Típus Description
error

ErrorDetails

A hiba részletei.

TagFilter

címkék, amelyeket szűrni szeretne