Scheduled Actions - Create Or Update

예약된 프라이빗 작업을 만들거나 업데이트합니다.

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

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
name
path True

string

예약된 작업 이름입니다.

api-version
query True

string

이 작업에 사용할 API 버전입니다.

요청 헤더

Name 필수 형식 Description
If-Match

string

엔터티의 ETag입니다. 엔터티를 만들 때 필요하지 않습니다. 엔터티를 업데이트할 때 선택 사항이며 낙관적 동시성을 달성하기 위해 지정할 수 있습니다.

요청 본문

Name 필수 형식 Description
properties.displayName True

string

예약된 작업 이름입니다.

properties.notification True

NotificationProperties

예약된 작업 종류에 따른 알림 속성입니다.

properties.schedule True

ScheduleProperties

예약된 작업의 일정입니다.

properties.status True

ScheduledActionStatus

예약된 작업의 상태입니다.

properties.viewId True

string

예약된 작업에 사용되는 비용 분석 뷰Id입니다. 예: '/providers/Microsoft.CostManagement/views/swaggerExample'

kind

ScheduledActionKind

예약된 작업의 종류입니다.

properties.fileDestination

FileDestination

뷰 데이터의 대상 형식입니다. 선택 사항입니다.

properties.notificationEmail

string

Email 요청 및 알림 이메일을 수신해야 하는 연락처 지점의 주소입니다.

properties.scope

string

프라이빗 예약 작업(만들기 또는 업데이트)의 경우 scope 비어 있습니다.
공유 예약된 작업(범위별 만들기 또는 업데이트)의 경우 Cost Management scope 구독 scope 'subscriptions/{subscriptionId}', resourceGroup scope 'subscriptions/{subscriptionId}/{resourceGroupName}', 청구 계정의 경우 'providers/Microsoft.Billing/billingAccountS/{billingAccountId}'일 수 scope, 부서 scope 대한 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' EnrollmentAccount scope 대한 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/{enrollmentAccountId}' , BillingProfile scope 대한 'providers/Microsoft.Billing/billingAccountId}/{billingAccountId}', InvoiceSection scope 대한 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' ExternalBillingAccount scope 대한 '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' 및 ExternalSubscription scope 대한 '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}'

응답

Name 형식 Description
200 OK

ScheduledAction

OK. 요청이 성공했습니다.

201 Created

ScheduledAction

만들어졌습니다.

Other Status Codes

ErrorResponseWithNestedDetails

작업이 실패한 이유를 설명하는 오류 응답입니다.

보안

azure_auth

Azure Active Directory OAuth2 Flow.

형식: oauth2
Flow: implicit
권한 부여 URL: https://login.microsoftonline.com/common/oauth2/authorize

범위

Name Description
user_impersonation 사용자 계정 가장

예제

CreateOrUpdatePrivateScheduledAction

샘플 요청

PUT https://management.azure.com/providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource?api-version=2023-11-01


{
  "kind": "Email",
  "properties": {
    "displayName": "Monthly Cost By Resource",
    "notification": {
      "to": [
        "user@gmail.com",
        "team@gmail.com"
      ],
      "subject": "Cost by resource this month"
    },
    "schedule": {
      "frequency": "Monthly",
      "weeksOfMonth": [
        "First",
        "Third"
      ],
      "daysOfWeek": [
        "Monday"
      ],
      "hourOfDay": 10,
      "startDate": "2020-06-19T22:21:51.1287144Z",
      "endDate": "2021-06-19T22:21:51.1287144Z"
    },
    "status": "Enabled",
    "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample"
  }
}

샘플 응답

{
  "id": "providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource",
  "name": "monthlyCostByResource",
  "type": "Microsoft.CostManagement/ScheduledActions",
  "kind": "Email",
  "eTag": "\"1d4ff9fe66f1d10\"",
  "systemData": {
    "createdBy": "testuser",
    "createdByType": "User",
    "createdAt": "2020-06-18T22:21:51.1287144Z",
    "lastModifiedBy": "testuser",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-06-18T22:21:51.1287144Z"
  },
  "properties": {
    "displayName": "Monthly Cost By Resource",
    "notification": {
      "language": "fr",
      "regionalFormat": "fr",
      "to": [
        "user@gmail.com",
        "team@gmail.com"
      ],
      "subject": "Cost by resource this month"
    },
    "schedule": {
      "frequency": "Monthly",
      "weeksOfMonth": [
        "First",
        "Third"
      ],
      "daysOfWeek": [
        "Monday"
      ],
      "hourOfDay": 10,
      "startDate": "2020-06-19T22:21:51.1287144Z",
      "endDate": "2021-06-19T22:21:51.1287144Z"
    },
    "scope": "",
    "status": "Enabled",
    "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample"
  }
}
{
  "id": "providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource",
  "name": "monthlyCostByResource",
  "type": "Microsoft.CostManagement/ScheduledActions",
  "kind": "Email",
  "eTag": "\"1d4ff9fe66f1d10\"",
  "systemData": {
    "createdBy": "testuser",
    "createdByType": "User",
    "createdAt": "2020-06-18T22:21:51.1287144Z",
    "lastModifiedBy": "testuser",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-06-19T22:21:51.1287144Z"
  },
  "properties": {
    "displayName": "Monthly Cost By Resource",
    "notification": {
      "language": "fr",
      "regionalFormat": "fr",
      "to": [
        "user@gmail.com",
        "team@gmail.com"
      ],
      "subject": "Cost by resource this month"
    },
    "scope": "",
    "status": "Enabled",
    "schedule": {
      "frequency": "Monthly",
      "weeksOfMonth": [
        "First",
        "Third"
      ],
      "daysOfWeek": [
        "Monday"
      ],
      "hourOfDay": 10,
      "startDate": "2020-06-19T22:21:51.1287144Z",
      "endDate": "2021-06-19T22:21:51.1287144Z"
    },
    "viewId": "/providers/Microsoft.CostManagement/views/swaggerExample"
  }
}

정의

Name Description
createdByType

리소스를 만든 ID의 형식입니다.

DaysOfWeek

요일.

ErrorDetailsWithNestedDetails

오류의 세부 정보입니다.

ErrorResponseWithNestedDetails

오류 응답은 서비스가 들어오는 요청을 처리할 수 없음을 나타냅니다. 그 이유는 오류 메시지에 제공됩니다.

일부 오류 응답:

  • 429 TooManyRequests - 요청이 제한됩니다. "x-ms-ratelimit-microsoft.consumption-retry-after" 헤더에 지정된 시간을 기다린 후 다시 시도합니다.

  • 503 ServiceUnavailable - 서비스를 일시적으로 사용할 수 없습니다. "Retry-After" 헤더에 지정된 시간 동안 기다린 후 다시 시도합니다.

FileDestination

뷰 데이터의 대상입니다. 선택 사항입니다. 현재 CSV 형식만 지원됩니다.

FileFormat

뷰 데이터의 대상입니다. 현재 CSV 형식만 지원됩니다.

NotificationProperties

예약된 작업 알림의 속성입니다.

ScheduledAction

예약된 작업 정의입니다.

ScheduledActionKind

예약된 작업의 종류입니다.

ScheduledActionStatus

예약된 작업의 상태입니다.

ScheduleFrequency

일정의 빈도입니다.

ScheduleProperties

일정의 속성입니다.

systemData

리소스 만들기 및 마지막 수정과 관련된 메타데이터입니다.

WeeksOfMonth

월의 주.

createdByType

리소스를 만든 ID의 형식입니다.

Name 형식 Description
Application

string

Key

string

ManagedIdentity

string

User

string

DaysOfWeek

요일.

Name 형식 Description
Friday

string

Monday

string

Saturday

string

Sunday

string

Thursday

string

Tuesday

string

Wednesday

string

ErrorDetailsWithNestedDetails

오류의 세부 정보입니다.

Name 형식 Description
code

string

오류 코드

details

ErrorDetailsWithNestedDetails[]

오류의 추가 세부 정보입니다.

message

string

작업이 실패한 이유를 나타내는 오류 메시지입니다.

ErrorResponseWithNestedDetails

오류 응답은 서비스가 들어오는 요청을 처리할 수 없음을 나타냅니다. 그 이유는 오류 메시지에 제공됩니다.

일부 오류 응답:

  • 429 TooManyRequests - 요청이 제한됩니다. "x-ms-ratelimit-microsoft.consumption-retry-after" 헤더에 지정된 시간을 기다린 후 다시 시도합니다.

  • 503 ServiceUnavailable - 서비스를 일시적으로 사용할 수 없습니다. "Retry-After" 헤더에 지정된 시간 동안 기다린 후 다시 시도합니다.

Name 형식 Description
error

ErrorDetailsWithNestedDetails

오류의 세부 정보입니다.

FileDestination

뷰 데이터의 대상입니다. 선택 사항입니다. 현재 CSV 형식만 지원됩니다.

Name 형식 Description
fileFormats

FileFormat[]

뷰 데이터의 대상입니다. 현재 CSV 형식만 지원됩니다.

FileFormat

뷰 데이터의 대상입니다. 현재 CSV 형식만 지원됩니다.

Name 형식 Description
Csv

string

NotificationProperties

예약된 작업 알림의 속성입니다.

Name 형식 Description
language

string

전자 메일의 로캘입니다.

message

string

전자 메일에 추가할 선택적 메시지입니다. 길이는 250자로 제한됩니다.

regionalFormat

string

전자 메일의 날짜/시간 및 통화 값 서식 지정에 사용되는 국가별 형식입니다.

subject

string

전자 메일의 제목입니다. 길이는 70자로 제한됩니다.

to

string[]

전자 메일 주소의 배열입니다.

ScheduledAction

예약된 작업 정의입니다.

Name 형식 Description
eTag

string

리소스 Etag. 업데이트 호출의 경우 eTag는 선택 사항이며 낙관적 동시성을 달성하기 위해 지정할 수 있습니다. 먼저 'GET' 호출을 수행한 다음, 업데이트를 수행하는 동안 요청 본문 또는 'If-Match' 헤더의 일부로 최신 eTag를 포함하여 리소스의 eTag를 가져옵니다. 호출 만들기의 경우 eTag가 필요하지 않습니다.

id

string

리소스에 대한 정규화된 리소스 ID입니다. 예 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

kind

ScheduledActionKind

예약된 작업의 종류입니다.

name

string

리소스의 이름입니다.

properties.displayName

string

예약된 작업 이름입니다.

properties.fileDestination

FileDestination

뷰 데이터의 대상 형식입니다. 선택 사항입니다.

properties.notification

NotificationProperties

예약된 작업 종류에 따른 알림 속성입니다.

properties.notificationEmail

string

Email 요청 및 알림 이메일을 수신해야 하는 연락처 지점의 주소입니다.

properties.schedule

ScheduleProperties

예약된 작업의 일정입니다.

properties.scope

string

프라이빗 예약 작업(만들기 또는 업데이트)의 경우 scope 비어 있습니다.
공유 예약된 작업(범위별 만들기 또는 업데이트)의 경우 Cost Management scope 구독 scope 'subscriptions/{subscriptionId}', resourceGroup scope 'subscriptions/{subscriptionId}/{resourceGroupName}', 청구 계정의 경우 'providers/Microsoft.Billing/billingAccountS/{billingAccountId}'일 수 scope, 부서 scope 대한 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' EnrollmentAccount scope 대한 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/{enrollmentAccountId}' , BillingProfile scope 대한 'providers/Microsoft.Billing/billingAccountId}/{billingAccountId}', InvoiceSection scope 대한 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' ExternalBillingAccount scope 대한 '/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' 및 ExternalSubscription scope 대한 '/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}'

properties.status

ScheduledActionStatus

예약된 작업의 상태입니다.

properties.viewId

string

예약된 작업에 사용되는 비용 분석 뷰Id입니다. 예: '/providers/Microsoft.CostManagement/views/swaggerExample'

systemData

systemData

예약된 작업의 종류입니다.

type

string

리소스 형식입니다. 예: "Microsoft.Compute/virtualMachines" 또는 "Microsoft.Storage/storageAccounts"

ScheduledActionKind

예약된 작업의 종류입니다.

Name 형식 Description
Email

string

비용 분석 데이터가 이메일로 전송됩니다.

InsightAlert

string

비용 변칙 정보가 이메일로 전달됩니다. 구독 scope 매일 빈도로만 사용할 수 있습니다. 리소스에서 변칙이 검색되지 않으면 전자 메일이 전송되지 않습니다.

ScheduledActionStatus

예약된 작업의 상태입니다.

Name 형식 Description
Disabled

string

예약된 작업은 저장되지만 실행되지 않습니다.

Enabled

string

예약된 작업이 저장되고 실행됩니다.

Expired

string

예약된 작업이 만료되었습니다.

ScheduleFrequency

일정의 빈도입니다.

Name 형식 Description
Daily

string

비용 분석 데이터는 매일 이메일로 전송됩니다.

Monthly

string

비용 분석 데이터는 매달 이메일로 전송됩니다.

Weekly

string

비용 분석 데이터는 매주 이메일로 전송됩니다.

ScheduleProperties

일정의 속성입니다.

Name 형식 Description
dayOfMonth

integer

비용 분석 데이터가 이메일로 전송되는 UTC 일입니다. 1에서 31 사이여야 합니다. 이 속성은 frequency가 Monthly이고 weeksOfMonth 또는 daysOfWeek를 재정의하는 경우에 적용됩니다.

daysOfWeek

DaysOfWeek[]

비용 분석 데이터가 이메일로 전송되는 영어로 된 일 이름입니다. 빈도가 매주 또는 매월인 경우 이 속성이 적용됩니다.

endDate

string

예약된 작업의 종료 날짜 및 시간(UTC)입니다.

frequency

ScheduleFrequency

일정의 빈도입니다.

hourOfDay

integer

비용 분석 데이터가 이메일로 전송되는 UTC 시간입니다.

startDate

string

예약된 작업의 시작 날짜 및 시간(UTC)입니다.

weeksOfMonth

WeeksOfMonth[]

비용 분석 데이터가 이메일로 전송되는 주입니다. 이 속성은 frequency가 Monthly이고 daysOfWeek과 함께 사용되는 경우에 적용됩니다.

systemData

리소스 만들기 및 마지막 수정과 관련된 메타데이터입니다.

Name 형식 Description
createdAt

string

UTC(리소스 만들기)의 타임스탬프입니다.

createdBy

string

리소스를 만든 ID입니다.

createdByType

createdByType

리소스를 만든 ID의 형식입니다.

lastModifiedAt

string

리소스 마지막 수정의 타임스탬프(UTC)

lastModifiedBy

string

리소스를 마지막으로 수정한 ID입니다.

lastModifiedByType

createdByType

리소스를 마지막으로 수정한 ID 유형입니다.

WeeksOfMonth

월의 주.

Name 형식 Description
First

string

Fourth

string

Last

string

Second

string

Third

string