Merge pull request #10525 from Only2125/xishan/powerpower

Update to latest sdk version and priovide new api of CalculatePrice and Purchase
This commit is contained in:
Jin Lei 2019-11-26 09:35:43 +08:00 коммит произвёл GitHub
Родитель e20463ce34 3fb981393d
Коммит c9cbaeec1b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
36 изменённых файлов: 1758 добавлений и 519 удалений

Просмотреть файл

@ -1911,7 +1911,9 @@
"Merge-AzReservation": "Merge-AzureRmReservation", "Merge-AzReservation": "Merge-AzureRmReservation",
"Split-AzReservation": "Split-AzureRmReservation", "Split-AzReservation": "Split-AzureRmReservation",
"Get-AzReservationOrderId": "Get-AzureRmReservationOrderId", "Get-AzReservationOrderId": "Get-AzureRmReservationOrderId",
"Get-AzReservationCatalog": "Get-AzureRmReservationCatalog" "Get-AzReservationCatalog": "Get-AzureRmReservationCatalog",
"Get-AzReservationQuote": "Get-AzureRmReservationQuote",
"New-AzReservation": "New-AzureRmReservation"
}, },
"Az.ResourceGraph": { "Az.ResourceGraph": {
"Search-AzGraph": "Search-AzureRmGraph" "Search-AzGraph": "Search-AzureRmGraph"

Просмотреть файл

@ -11,7 +11,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Reservations" Version="1.9.1-preview" /> <PackageReference Include="Microsoft.Azure.Management.Reservations" Version="1.13.0-preview" />
</ItemGroup> </ItemGroup>
</Project> </Project>

Просмотреть файл

@ -22,7 +22,7 @@ function Test-GetReservationOrder
# Please create reservation through portal and use id to run tests # Please create reservation through portal and use id to run tests
# Once reservation is created you will have reservationOrderId to run this test # Once reservation is created you will have reservationOrderId to run this test
$type = "Microsoft.Capacity/reservationOrders" $type = "Microsoft.Capacity/reservationOrders"
$reservationOrderId = "704aee8c-c906-47c7-bd22-781841fb48b5" $reservationOrderId = "154ed3db-262c-40e5-baa3-a0505b6cdfdd"
$reservation = Get-AzReservationOrder -ReservationOrderId $reservationOrderId $reservation = Get-AzReservationOrder -ReservationOrderId $reservationOrderId
Assert-NotNull $reservation Assert-NotNull $reservation

Просмотреть файл

@ -92,5 +92,19 @@ namespace Microsoft.Azure.Commands.Reservations.Test.ScenarioTests
{ {
TestController.NewInstance.RunPowerShellTest(_logger, "Test-GetCatalog"); TestController.NewInstance.RunPowerShellTest(_logger, "Test-GetCatalog");
} }
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestCalculatePrice()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Test-CalculatePrice");
}
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestPurchase()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Test-Purchase");
}
} }
} }

Просмотреть файл

@ -16,9 +16,9 @@
# Please create reservation through portal and use id to run tests # Please create reservation through portal and use id to run tests
# Once reservation is created you will have reservationOrderId (which is container for reservation), # Once reservation is created you will have reservationOrderId (which is container for reservation),
# reservationId, subscriptionId to run this test # reservationId, subscriptionId to run this test
$subscriptionId ="302110e3-cd4e-4244-9874-07c91853c809" $subscriptionId ="d3ae48e5-dbb2-4618-afd4-fb1b8559cb80"
$reservationOrderId = "704aee8c-c906-47c7-bd22-781841fb48b5" $reservationOrderId = "b9fbc5c6-fa93-4c1d-b7dc-81a786af5813"
$reservationId = "ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e" $reservationId = "d42d1cd5-9ea9-4a93-b3ca-c50a2ab0c0b9"
<# <#
.SYNOPSIS .SYNOPSIS
@ -67,6 +67,48 @@ function Test-GetCatalog
} }
} }
<#
.SYNOPSIS
Calculate price
#>
function Test-CalculatePrice
{
$reservedResourceType = "VirtualMachines"
$location = "westus"
$term = "P1Y"
$quantity = 1
$billingPlan = "Upfront"
$applyScopeType = "Shared"
$renew = $false
$sku = "standard_b1ls"
$disPlayName = "test"
$calculateP = Get-AzReservationQuote -ReservedResourceType $reservedResourceType -Location $location -BillingScopeId $subscriptionId -Term $term -Quantity $quantity -BillingPlan $billingPlan -AppliedScopeType $applyScopeType -Sku $sku -DisplayName $disPlayName
Assert-NotNull $calculateP
Assert-NotNull $calculateP.ReservationOrderId
}
<#
.SYNOPSIS
Purchase
#>
function Test-Purchase
{
$roId = "53f2a7dd-04ba-4354-afa8-68301b2d3d28"
$reservedResourceType = "VirtualMachines"
$location = "westus"
$term = "P1Y"
$quantity = 1
$billingPlan = "Upfront"
$applyScopeType = "Shared"
$renew = $false
$sku = "standard_b1ls"
$disPlayName = "test"
$purcahseResult = New-AzReservation -ReservationOrderId $roId -ReservedResourceType $reservedResourceType -Location $location -BillingScopeId $subscriptionId -Term $term -Quantity $quantity -BillingPlan $billingPlan -AppliedScopeType $applyScopeType -Sku $sku -DisplayName $disPlayName
Assert-NotNull $purcahseResult
}
<# <#
.SYNOPSIS .SYNOPSIS
Get applied reservation list Get applied reservation list
@ -90,9 +132,11 @@ Split reservation
#> #>
function Test-SplitReservation function Test-SplitReservation
{ {
$reservationOrderIdSplit = "0c0e972c-a418-497c-8fc9-96b5d43fcb1d"
$reservationIdSplit = "5d941ba9-22d0-46f5-8194-ca00001bb180"
$type = "Microsoft.Capacity/reservationOrders/reservations" $type = "Microsoft.Capacity/reservationOrders/reservations"
$splitResult = Split-AzReservation -ReservationOrderId $reservationOrderId -ReservationId $reservationId -Quantity 1,1 $splitResult = Split-AzReservation -ReservationOrderId $reservationOrderIdSplit -ReservationId $reservationIdSplit -Quantity 1,2
Foreach ($splitItem in $splitResult) Foreach ($splitItem in $splitResult)
{ {
Assert-NotNull $splitItem Assert-NotNull $splitItem
@ -110,10 +154,11 @@ Merge reservations
#> #>
function Test-MergeReservation function Test-MergeReservation
{ {
$reservationId1 = "efcd2077-baa6-4be3-8190-2b9ba939c8bc" $reservationId1 = "5ae9e6f9-6193-4d0b-9c49-d59d5b19fe53"
$reservationId2 = "0281e256-5b31-424a-8df8-e67f6531113a" $reservationId2 = "4a60de37-8be3-4c67-ba15-1c7722f6a008"
$reservationOrderIdMerge = "0c0e972c-a418-497c-8fc9-96b5d43fcb1d"
$type = "Microsoft.Capacity/reservationOrders/reservations" $type = "Microsoft.Capacity/reservationOrders/reservations"
$mergeResult = Merge-AzReservation -ReservationOrderId $reservationOrderId -ReservationId $reservationId1,$reservationId2 $mergeResult = Merge-AzReservation -ReservationOrderId $reservationOrderIdMerge -ReservationId $reservationId1,$reservationId2
Foreach ($mergeItem in $mergeResult) Foreach ($mergeItem in $mergeResult)
{ {
Assert-NotNull $mergeItem Assert-NotNull $mergeItem
@ -151,17 +196,20 @@ function Test-GetReservation
.SYNOPSIS .SYNOPSIS
Update reservation Update reservation
#> #>
$ReservationOrderIdTestScope = "11e0f3cb-d8d2-42d4-8b24-b460cab90b67"
$ReservationIdTestScope = "153f4fea-dde4-4656-949a-50e3191840c9"
function Test-UpdateReservationToShared function Test-UpdateReservationToShared
{ {
$type = "Microsoft.Capacity/reservationOrders/reservations" $type = "Microsoft.Capacity/reservationOrders/reservations"
$reservationItem = Update-AzReservation -ReservationOrderId $reservationOrderId -ReservationId $reservationId -appliedscopetype Shared -InstanceFlexibility On $reservationItem = Update-AzReservation -ReservationOrderId $ReservationOrderIdTestScope -ReservationId $ReservationIdTestScope -appliedscopetype Shared -InstanceFlexibility On
Assert-NotNull $reservationItem Assert-NotNull $reservationItem
Assert-NotNull $reservationItem.Etag Assert-NotNull $reservationItem.Etag
$name = $reservationOrderId + '/' + $reservationId $name = $ReservationOrderIdTestScope + '/' + $ReservationIdTestScope
$id = "/providers/microsoft.capacity/reservationOrders/" + $reservationOrderId + "/reservations/" + $reservationId $id = "/providers/microsoft.capacity/reservationOrders/" + $ReservationOrderIdTestScope + "/reservations/" + $ReservationIdTestScope
Assert-AreEqual $reservationItem.Id $id Assert-AreEqual $reservationItem.Id $id
Assert-AreEqual $reservationItem.Name $name Assert-AreEqual $reservationItem.Name $name
@ -176,15 +224,15 @@ Update reservation
function Test-UpdateReservationToSingle function Test-UpdateReservationToSingle
{ {
$type = "Microsoft.Capacity/reservationOrders/reservations" $type = "Microsoft.Capacity/reservationOrders/reservations"
$subscription = "/subscriptions/302110e3-cd4e-4244-9874-07c91853c809" $subscription = "/subscriptions/d3ae48e5-dbb2-4618-afd4-fb1b8559cb80"
$reservationItem = Update-AzReservation -ReservationOrderId $reservationOrderId -ReservationId $reservationId -appliedscopetype Single -appliedscope $subscription -InstanceFlexibility On $reservationItem = Update-AzReservation -ReservationOrderId $ReservationOrderIdTestScope -ReservationId $ReservationIdTestScope -appliedscopetype Single -appliedscope $subscription -InstanceFlexibility On
Assert-NotNull $reservationItem Assert-NotNull $reservationItem
Assert-NotNull $reservationItem.Etag Assert-NotNull $reservationItem.Etag
$name = $reservationOrderId + '/' + $reservationId $name = $ReservationOrderIdTestScope + '/' + $ReservationIdTestScope
$id = "/providers/microsoft.capacity/reservationOrders/" + $reservationOrderId + "/reservations/" + $reservationId $id = "/providers/microsoft.capacity/reservationOrders/" + $ReservationOrderIdTestScope + "/reservations/" + $ReservationIdTestScope
Assert-AreEqual $reservationItem.Id $id Assert-AreEqual $reservationItem.Id $id
Assert-AreEqual $reservationItem.Name $name Assert-AreEqual $reservationItem.Name $name

Просмотреть файл

@ -1,34 +1,27 @@
{ {
"Entries": [ "Entries": [
{ {
"RequestUri": "/providers/Microsoft.Capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5?api-version=2018-06-01", "RequestUri": "/providers/Microsoft.Capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd?api-version=2019-04-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvNzA0YWVlOGMtYzkwNi00N2M3LWJkMjItNzgxODQxZmI0OGI1P2FwaS12ZXJzaW9uPTIwMTgtMDYtMDE=", "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvMTU0ZWQzZGItMjYyYy00MGU1LWJhYTMtYTA1MDViNmNkZmRkP2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=",
"RequestMethod": "GET", "RequestMethod": "GET",
"RequestBody": "", "RequestBody": "",
"RequestHeaders": { "RequestHeaders": {
"x-ms-client-request-id": [ "x-ms-client-request-id": [
"43a914ff-665c-4702-9fee-2ac3232fd2ef" "587d5e9e-2ffa-4f09-98bc-e9c6dd331a48"
], ],
"accept-language": [ "Accept-Language": [
"en-US" "en-US"
], ],
"User-Agent": [ "User-Agent": [
"FxVersion/4.7.3056.0", "FxVersion/4.6.28008.01",
"OSName/Windows10Enterprise", "OSName/Windows",
"OSVersion/6.3.17134", "OSVersion/Microsoft.Windows.10.0.18363.",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.8.0.0" "Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.13.0.0"
] ]
}, },
"ResponseBody": "{\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders\",\r\n \"name\": \"704aee8c-c906-47c7-bd22-781841fb48b5\",\r\n \"etag\": 7,\r\n \"properties\": {\r\n \"displayName\": \"Powershell_Test\",\r\n \"requestDateTime\": \"2018-06-15T21:31:16.0556902Z\",\r\n \"createdDateTime\": \"2018-06-15T21:33:26.9606767Z\",\r\n \"expiryDate\": \"2019-06-15\",\r\n \"term\": \"P1Y\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"reservations\": [\r\n {\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\"\r\n }\r\n ],\r\n \"originalQuantity\": 2\r\n }\r\n}",
"ResponseHeaders": { "ResponseHeaders": {
"Content-Length": [ "Cache-Control": [
"592" "no-cache"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
], ],
"Pragma": [ "Pragma": [
"no-cache" "no-cache"
@ -37,38 +30,45 @@
"Accept-Encoding" "Accept-Encoding"
], ],
"x-ms-ratelimit-remaining-tenant-reads": [ "x-ms-ratelimit-remaining-tenant-reads": [
"14998" "11998"
], ],
"x-ms-request-id": [ "x-ms-request-id": [
"westus:ebefe513-99b6-46fe-a03d-5fb1a915b0ca" "westcentralus:3ddf5057-6fd1-4595-926e-2dfd8e1649e8"
], ],
"X-Content-Type-Options": [ "X-Content-Type-Options": [
"nosniff" "nosniff"
], ],
"Server": [
"Microsoft-IIS/10.0"
],
"x-ms-correlation-request-id": [ "x-ms-correlation-request-id": [
"040e3bb3-b829-4376-befe-8805d274df0a" "c9735a25-7b16-4b21-bd16-4137003cce8c"
], ],
"x-ms-routing-request-id": [ "x-ms-routing-request-id": [
"WESTUS2:20180615T215528Z:040e3bb3-b829-4376-befe-8805d274df0a" "WESTUS2:20191110T233648Z:c9735a25-7b16-4b21-bd16-4137003cce8c"
], ],
"Strict-Transport-Security": [ "Strict-Transport-Security": [
"max-age=31536000; includeSubDomains" "max-age=31536000; includeSubDomains"
], ],
"Cache-Control": [
"no-cache"
],
"Date": [ "Date": [
"Fri, 15 Jun 2018 21:55:27 GMT" "Sun, 10 Nov 2019 23:36:48 GMT"
], ],
"Server": [ "Content-Length": [
"Microsoft-IIS/8.5" "1057"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
] ]
}, },
"ResponseBody": "{\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders\",\r\n \"name\": \"154ed3db-262c-40e5-baa3-a0505b6cdfdd\",\r\n \"etag\": 11,\r\n \"properties\": {\r\n \"displayName\": \"TestPurchaseReservation\",\r\n \"requestDateTime\": \"2019-09-12T01:06:51.4409141Z\",\r\n \"createdDateTime\": \"2019-09-12T01:09:55.7425829Z\",\r\n \"expiryDate\": \"2020-09-12\",\r\n \"term\": \"P1Y\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"reservations\": [\r\n {\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd/reservations/4bcb5164-bda0-43d6-82b2-31b97c9e1e45\"\r\n },\r\n {\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd/reservations/77826aff-df48-48e9-a1a9-193e491c2fe4\"\r\n },\r\n {\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd/reservations/a5a08bd1-ae00-424f-a6f3-27e3c7a59139\"\r\n },\r\n {\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/154ed3db-262c-40e5-baa3-a0505b6cdfdd/reservations/dc69bacc-87ba-496b-aa2f-40fa168192e0\"\r\n }\r\n ],\r\n \"originalQuantity\": 3,\r\n \"billingPlan\": \"Upfront\"\r\n }\r\n}",
"StatusCode": 200 "StatusCode": 200
} }
], ],
"Names": {}, "Names": {},
"Variables": { "Variables": {
"SubscriptionId": "302110e3-cd4e-4244-9874-07c91853c809" "SubscriptionId": "d3ae48e5-dbb2-4618-afd4-fb1b8559cb80"
} }
} }

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1,83 @@
{
"Entries": [
{
"RequestUri": "/providers/Microsoft.Capacity/calculatePrice?api-version=2019-04-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvY2FsY3VsYXRlUHJpY2U/YXBpLXZlcnNpb249MjAxOS0wNC0wMQ==",
"RequestMethod": "POST",
"RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"standard_b1ls\"\r\n },\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"billingScopeId\": \"d3ae48e5-dbb2-4618-afd4-fb1b8559cb80\",\r\n \"term\": \"P1Y\",\r\n \"billingPlan\": \"Upfront\",\r\n \"quantity\": 1,\r\n \"displayName\": \"test\",\r\n \"appliedScopeType\": \"Shared\"\r\n }\r\n}",
"RequestHeaders": {
"x-ms-client-request-id": [
"f08b85c7-63f1-4834-b4fd-4a1d6b390682"
],
"Accept-Language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.6.28008.01",
"OSName/Windows",
"OSVersion/Microsoft.Windows.10.0.18363.",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.13.0.0"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Content-Length": [
"344"
]
},
"ResponseHeaders": {
"Cache-Control": [
"no-cache"
],
"Pragma": [
"no-cache"
],
"Vary": [
"Accept-Encoding"
],
"x-ms-ratelimit-remaining-tenant-writes": [
"1199"
],
"x-ms-test": [
"{\"contact\":\"kgautam\",\"scenarios\":\"v6-recurrence-test,time-scale:35040,AcceleratedPayment\",\"retention\":\"2/12/2020 8:35:54 PM\"}"
],
"x-ms-request-id": [
"westus:5f1e7e07-d633-4840-afe9-be465ff3faf7"
],
"X-Content-Type-Options": [
"nosniff"
],
"Server": [
"Microsoft-IIS/10.0"
],
"x-ms-correlation-request-id": [
"cd4c77d0-1409-4e98-b5bd-50f94df48f62"
],
"x-ms-routing-request-id": [
"WESTUS:20191114T203556Z:cd4c77d0-1409-4e98-b5bd-50f94df48f62"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"Date": [
"Thu, 14 Nov 2019 20:35:56 GMT"
],
"Content-Length": [
"344"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
]
},
"ResponseBody": "{\r\n \"properties\": {\r\n \"billingCurrencyTotal\": {\r\n \"currencyCode\": \"USD\",\r\n \"amount\": 32.0\r\n },\r\n \"netTotal\": 0.0,\r\n \"taxTotal\": 0.0,\r\n \"grandTotal\": 0.0,\r\n \"reservationOrderId\": \"53f2a7dd-04ba-4354-afa8-68301b2d3d28\",\r\n \"skuTitle\": \"Reserved VM Instance, Standard_B1ls, US West, 1 Year\",\r\n \"skuDescription\": \"standard_b1ls\",\r\n \"pricingCurrencyTotal\": {\r\n \"currencyCode\": \"USD\",\r\n \"amount\": 32.0\r\n }\r\n }\r\n}",
"StatusCode": 200
}
],
"Names": {},
"Variables": {
"SubscriptionId": "d3ae48e5-dbb2-4618-afd4-fb1b8559cb80"
}
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,34 +1,27 @@
{ {
"Entries": [ "Entries": [
{ {
"RequestUri": "/providers/Microsoft.Capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e?api-version=2018-06-01", "RequestUri": "/providers/Microsoft.Capacity/reservationOrders/b9fbc5c6-fa93-4c1d-b7dc-81a786af5813/reservations/d42d1cd5-9ea9-4a93-b3ca-c50a2ab0c0b9?api-version=2019-04-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvNzA0YWVlOGMtYzkwNi00N2M3LWJkMjItNzgxODQxZmI0OGI1L3Jlc2VydmF0aW9ucy9hYzdmNmIwNC1mZjQ1LTRkYTEtODNmMy1iMGYyZjZjODEyOGU/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvYjlmYmM1YzYtZmE5My00YzFkLWI3ZGMtODFhNzg2YWY1ODEzL3Jlc2VydmF0aW9ucy9kNDJkMWNkNS05ZWE5LTRhOTMtYjNjYS1jNTBhMmFiMGMwYjk/YXBpLXZlcnNpb249MjAxOS0wNC0wMQ==",
"RequestMethod": "GET", "RequestMethod": "GET",
"RequestBody": "", "RequestBody": "",
"RequestHeaders": { "RequestHeaders": {
"x-ms-client-request-id": [ "x-ms-client-request-id": [
"bdb23e54-5a88-459e-9c97-d8396e762c26" "07a1f914-3c48-4074-bbb5-3f2532b45852"
], ],
"accept-language": [ "Accept-Language": [
"en-US" "en-US"
], ],
"User-Agent": [ "User-Agent": [
"FxVersion/4.7.3056.0", "FxVersion/4.6.28008.01",
"OSName/Windows10Enterprise", "OSName/Windows",
"OSVersion/6.3.17134", "OSVersion/Microsoft.Windows.10.0.18363.",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.8.0.0" "Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.13.0.0"
] ]
}, },
"ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_B1ms\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"704aee8c-c906-47c7-bd22-781841fb48b5/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\",\r\n \"etag\": 7,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"quantity\": 2,\r\n \"provisioningState\": \"Succeeded\",\r\n \"expiryDate\": \"2019-06-15\",\r\n \"displayName\": \"Powershell_Test\",\r\n \"effectiveDateTime\": \"2018-06-15T21:33:26.9606767Z\",\r\n \"lastUpdatedDateTime\": \"2018-06-15T21:33:26.9606767Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"Off\",\r\n \"skuDescription\": \"Standard_B1ms\"\r\n }\r\n}",
"ResponseHeaders": { "ResponseHeaders": {
"Content-Length": [ "Cache-Control": [
"736" "no-cache"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
], ],
"Pragma": [ "Pragma": [
"no-cache" "no-cache"
@ -37,38 +30,45 @@
"Accept-Encoding" "Accept-Encoding"
], ],
"x-ms-ratelimit-remaining-tenant-reads": [ "x-ms-ratelimit-remaining-tenant-reads": [
"14997" "11996"
], ],
"x-ms-request-id": [ "x-ms-request-id": [
"westus:7b9de6eb-1cea-406f-acd4-ebc22869831e" "westus:e1feccca-02be-4109-9130-bd9bda25724a"
], ],
"X-Content-Type-Options": [ "X-Content-Type-Options": [
"nosniff" "nosniff"
], ],
"Server": [
"Microsoft-IIS/10.0"
],
"x-ms-correlation-request-id": [ "x-ms-correlation-request-id": [
"42ac28b6-330f-468b-9875-76f3499fcef0" "262a4a2f-ce77-4f7a-aca4-3378f273431f"
], ],
"x-ms-routing-request-id": [ "x-ms-routing-request-id": [
"WESTUS2:20180615T215822Z:42ac28b6-330f-468b-9875-76f3499fcef0" "WESTUS2:20191110T233657Z:262a4a2f-ce77-4f7a-aca4-3378f273431f"
], ],
"Strict-Transport-Security": [ "Strict-Transport-Security": [
"max-age=31536000; includeSubDomains" "max-age=31536000; includeSubDomains"
], ],
"Cache-Control": [
"no-cache"
],
"Date": [ "Date": [
"Fri, 15 Jun 2018 21:58:21 GMT" "Sun, 10 Nov 2019 23:36:57 GMT"
], ],
"Server": [ "Content-Length": [
"Microsoft-IIS/8.5" "972"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
] ]
}, },
"ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_B1ls\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/b9fbc5c6-fa93-4c1d-b7dc-81a786af5813/reservations/d42d1cd5-9ea9-4a93-b3ca-c50a2ab0c0b9\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"b9fbc5c6-fa93-4c1d-b7dc-81a786af5813/d42d1cd5-9ea9-4a93-b3ca-c50a2ab0c0b9\",\r\n \"etag\": 18,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"quantity\": 2,\r\n \"provisioningState\": \"Cancelled\",\r\n \"expiryDate\": \"2022-11-08\",\r\n \"displayName\": \"powershellTest\",\r\n \"effectiveDateTime\": \"2019-11-08T23:51:43.389684Z\",\r\n \"extendedStatusInfo\": {\r\n \"statusCode\": \"Expired\",\r\n \"message\": \"This reservation was expired and is no longer active.\"\r\n },\r\n \"lastUpdatedDateTime\": \"2019-11-08T23:51:43.389684Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Reserved VM Instance, Standard_B1ls, EU West, 3 Years\",\r\n \"renew\": false,\r\n \"term\": \"P3Y\",\r\n \"billingScopeId\": \"/subscriptions/d3ae48e5-dbb2-4618-afd4-fb1b8559cb80\",\r\n \"billingPlan\": \"Upfront\"\r\n }\r\n}",
"StatusCode": 200 "StatusCode": 200
} }
], ],
"Names": {}, "Names": {},
"Variables": { "Variables": {
"SubscriptionId": "302110e3-cd4e-4244-9874-07c91853c809" "SubscriptionId": "d3ae48e5-dbb2-4618-afd4-fb1b8559cb80"
} }
} }

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,28 +1,48 @@
{ {
"Entries": [ "Entries": [
{ {
"RequestUri": "/providers/Microsoft.Capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations?api-version=2018-06-01", "RequestUri": "/providers/Microsoft.Capacity/reservationOrders/b9fbc5c6-fa93-4c1d-b7dc-81a786af5813/reservations?api-version=2019-04-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvNzA0YWVlOGMtYzkwNi00N2M3LWJkMjItNzgxODQxZmI0OGI1L3Jlc2VydmF0aW9ucz9hcGktdmVyc2lvbj0yMDE4LTA2LTAx", "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvYjlmYmM1YzYtZmE5My00YzFkLWI3ZGMtODFhNzg2YWY1ODEzL3Jlc2VydmF0aW9ucz9hcGktdmVyc2lvbj0yMDE5LTA0LTAx",
"RequestMethod": "GET", "RequestMethod": "GET",
"RequestBody": "", "RequestBody": "",
"RequestHeaders": { "RequestHeaders": {
"x-ms-client-request-id": [ "x-ms-client-request-id": [
"a110e391-a669-4478-9bfe-a9f818940969" "87aca870-7299-49b5-afe2-47723b0a08fe"
], ],
"accept-language": [ "Accept-Language": [
"en-US" "en-US"
], ],
"User-Agent": [ "User-Agent": [
"FxVersion/4.7.3056.0", "FxVersion/4.6.28008.01",
"OSName/Windows10Enterprise", "OSName/Windows",
"OSVersion/6.3.17134", "OSVersion/Microsoft.Windows.10.0.18363.",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.8.0.0" "Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.13.0.0"
] ]
}, },
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"sku\": {\r\n \"name\": \"Standard_B1ms\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"704aee8c-c906-47c7-bd22-781841fb48b5/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\",\r\n \"etag\": 7,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"quantity\": 2,\r\n \"provisioningState\": \"Succeeded\",\r\n \"expiryDate\": \"2019-06-15\",\r\n \"displayName\": \"Powershell_Test\",\r\n \"effectiveDateTime\": \"2018-06-15T21:33:26.9606767Z\",\r\n \"lastUpdatedDateTime\": \"2018-06-15T21:33:26.9606767Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"Off\",\r\n \"skuDescription\": \"Standard_B1ms\"\r\n }\r\n }\r\n ]\r\n}",
"ResponseHeaders": { "ResponseHeaders": {
"Content-Length": [ "Cache-Control": [
"748" "no-cache"
],
"Pragma": [
"no-cache"
],
"x-ms-request-id": [
"b4768c97-fdd8-411d-8987-ebf7fefd21cc"
],
"x-ms-correlation-request-id": [
"b4768c97-fdd8-411d-8987-ebf7fefd21cc"
],
"x-ms-routing-request-id": [
"WESTUS2:20191110T233651Z:b4768c97-fdd8-411d-8987-ebf7fefd21cc"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"X-Content-Type-Options": [
"nosniff"
],
"Date": [
"Sun, 10 Nov 2019 23:36:50 GMT"
], ],
"Content-Type": [ "Content-Type": [
"application/json; charset=utf-8" "application/json; charset=utf-8"
@ -30,45 +50,16 @@
"Expires": [ "Expires": [
"-1" "-1"
], ],
"Pragma": [ "Content-Length": [
"no-cache" "984"
],
"Vary": [
"Accept-Encoding"
],
"x-ms-ratelimit-remaining-tenant-reads": [
"14998"
],
"x-ms-request-id": [
"westus:22af8177-a4b7-48d2-af45-af20fd6e74dc"
],
"X-Content-Type-Options": [
"nosniff"
],
"x-ms-correlation-request-id": [
"8ba95ee7-1d7c-4c37-8a32-f958e1f95e75"
],
"x-ms-routing-request-id": [
"WESTUS2:20180615T215856Z:8ba95ee7-1d7c-4c37-8a32-f958e1f95e75"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Fri, 15 Jun 2018 21:58:55 GMT"
],
"Server": [
"Microsoft-IIS/8.5"
] ]
}, },
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"sku\": {\r\n \"name\": \"Standard_B1ls\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/b9fbc5c6-fa93-4c1d-b7dc-81a786af5813/reservations/d42d1cd5-9ea9-4a93-b3ca-c50a2ab0c0b9\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"b9fbc5c6-fa93-4c1d-b7dc-81a786af5813/d42d1cd5-9ea9-4a93-b3ca-c50a2ab0c0b9\",\r\n \"etag\": 18,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"quantity\": 2,\r\n \"provisioningState\": \"Cancelled\",\r\n \"expiryDate\": \"2022-11-08\",\r\n \"displayName\": \"powershellTest\",\r\n \"effectiveDateTime\": \"2019-11-08T23:51:43.389684Z\",\r\n \"extendedStatusInfo\": {\r\n \"statusCode\": \"Expired\",\r\n \"message\": \"This reservation was expired and is no longer active.\"\r\n },\r\n \"lastUpdatedDateTime\": \"2019-11-08T23:51:43.389684Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Reserved VM Instance, Standard_B1ls, EU West, 3 Years\",\r\n \"renew\": false,\r\n \"term\": \"P3Y\",\r\n \"billingScopeId\": \"/subscriptions/d3ae48e5-dbb2-4618-afd4-fb1b8559cb80\",\r\n \"billingPlan\": \"Upfront\"\r\n }\r\n }\r\n ]\r\n}",
"StatusCode": 200 "StatusCode": 200
} }
], ],
"Names": {}, "Names": {},
"Variables": { "Variables": {
"SubscriptionId": "302110e3-cd4e-4244-9874-07c91853c809" "SubscriptionId": "d3ae48e5-dbb2-4618-afd4-fb1b8559cb80"
} }
} }

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1,206 @@
{
"Entries": [
{
"RequestUri": "/providers/Microsoft.Capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28?api-version=2019-04-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvNTNmMmE3ZGQtMDRiYS00MzU0LWFmYTgtNjgzMDFiMmQzZDI4P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"standard_b1ls\"\r\n },\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"billingScopeId\": \"d3ae48e5-dbb2-4618-afd4-fb1b8559cb80\",\r\n \"term\": \"P1Y\",\r\n \"billingPlan\": \"Upfront\",\r\n \"quantity\": 1,\r\n \"displayName\": \"test\",\r\n \"appliedScopeType\": \"Shared\"\r\n }\r\n}",
"RequestHeaders": {
"x-ms-client-request-id": [
"d7a6b076-6902-430e-bb2c-6ae18243e876"
],
"Accept-Language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.6.28008.01",
"OSName/Windows",
"OSVersion/Microsoft.Windows.10.0.18363.",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.13.0.0"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Content-Length": [
"344"
]
},
"ResponseHeaders": {
"Cache-Control": [
"no-cache"
],
"Pragma": [
"no-cache"
],
"Location": [
"https://management.azure.com/providers/Microsoft.Capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28?api-version=2019-04-01"
],
"Retry-After": [
"120"
],
"x-ms-test": [
"{\"contact\":\"kgautam\",\"scenarios\":\"v6-recurrence-test,time-scale:35040,AcceleratedPayment\",\"retention\":\"2/12/2020 8:37:45 PM\"}"
],
"x-ms-request-id": [
"westus:4e57fc56-3124-4bb5-869a-79c759f9d2fe"
],
"X-Content-Type-Options": [
"nosniff"
],
"Server": [
"Microsoft-IIS/10.0"
],
"x-ms-ratelimit-remaining-tenant-writes": [
"1199"
],
"x-ms-correlation-request-id": [
"581ef1b2-daaf-47f1-901f-9edb454618e9"
],
"x-ms-routing-request-id": [
"WESTUS:20191114T203801Z:581ef1b2-daaf-47f1-901f-9edb454618e9"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"Date": [
"Thu, 14 Nov 2019 20:38:01 GMT"
],
"Content-Length": [
"1097"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
]
},
"ResponseBody": "{\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders\",\r\n \"name\": \"53f2a7dd-04ba-4354-afa8-68301b2d3d28\",\r\n \"etag\": 1,\r\n \"properties\": {\r\n \"displayName\": \"test\",\r\n \"requestDateTime\": \"2019-11-14T20:37:59.4701894Z\",\r\n \"term\": \"P1Y\",\r\n \"provisioningState\": \"Creating\",\r\n \"reservations\": [\r\n {\r\n \"sku\": {\r\n \"name\": \"standard_b1ls\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28/reservations/0b45da26-4443-418e-a273-5b9eba12a416\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"53f2a7dd-04ba-4354-afa8-68301b2d3d28/0b45da26-4443-418e-a273-5b9eba12a416\",\r\n \"etag\": 1,\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"quantity\": 1,\r\n \"provisioningState\": \"Creating\",\r\n \"displayName\": \"test\",\r\n \"effectiveDateTime\": \"2019-11-14T20:37:59.4701894Z\",\r\n \"lastUpdatedDateTime\": \"2019-11-14T20:37:59.4701894Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Reserved VM Instance, Standard_B1ls, US West, 1 Year\",\r\n \"renew\": false\r\n }\r\n }\r\n ],\r\n \"originalQuantity\": 1,\r\n \"billingPlan\": \"Upfront\"\r\n }\r\n}",
"StatusCode": 202
},
{
"RequestUri": "/providers/Microsoft.Capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28?api-version=2019-04-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvNTNmMmE3ZGQtMDRiYS00MzU0LWFmYTgtNjgzMDFiMmQzZDI4P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"FxVersion/4.6.28008.01",
"OSName/Windows",
"OSVersion/Microsoft.Windows.10.0.18363.",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.13.0.0"
]
},
"ResponseHeaders": {
"Cache-Control": [
"no-cache"
],
"Pragma": [
"no-cache"
],
"Vary": [
"Accept-Encoding"
],
"x-ms-ratelimit-remaining-tenant-reads": [
"11998"
],
"x-ms-request-id": [
"westus:52cbdb89-7931-45ca-8b8d-a5c88930c22d"
],
"X-Content-Type-Options": [
"nosniff"
],
"Server": [
"Microsoft-IIS/10.0"
],
"x-ms-correlation-request-id": [
"c68b5e40-01f3-42d1-ae6f-6f1f4fdfbe0d"
],
"x-ms-routing-request-id": [
"WESTUS:20191114T204002Z:c68b5e40-01f3-42d1-ae6f-6f1f4fdfbe0d"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"Date": [
"Thu, 14 Nov 2019 20:40:01 GMT"
],
"Content-Length": [
"529"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
]
},
"ResponseBody": "{\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders\",\r\n \"name\": \"53f2a7dd-04ba-4354-afa8-68301b2d3d28\",\r\n \"etag\": 4,\r\n \"properties\": {\r\n \"displayName\": \"test\",\r\n \"requestDateTime\": \"2019-11-14T20:37:59.4701894Z\",\r\n \"term\": \"P1Y\",\r\n \"provisioningState\": \"Creating\",\r\n \"reservations\": [\r\n {\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28/reservations/0b45da26-4443-418e-a273-5b9eba12a416\"\r\n }\r\n ],\r\n \"originalQuantity\": 1,\r\n \"billingPlan\": \"Upfront\"\r\n }\r\n}",
"StatusCode": 200
},
{
"RequestUri": "/providers/Microsoft.Capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28?api-version=2019-04-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvNTNmMmE3ZGQtMDRiYS00MzU0LWFmYTgtNjgzMDFiMmQzZDI4P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"User-Agent": [
"FxVersion/4.6.28008.01",
"OSName/Windows",
"OSVersion/Microsoft.Windows.10.0.18363.",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.13.0.0"
]
},
"ResponseHeaders": {
"Cache-Control": [
"no-cache"
],
"Pragma": [
"no-cache"
],
"Vary": [
"Accept-Encoding"
],
"x-ms-ratelimit-remaining-tenant-reads": [
"11999"
],
"x-ms-request-id": [
"westus:77b33f04-e06e-4e3e-8a84-8fadf9357d1f"
],
"X-Content-Type-Options": [
"nosniff"
],
"Server": [
"Microsoft-IIS/10.0"
],
"x-ms-correlation-request-id": [
"7af02308-361d-4c6c-96e3-b94de21278f1"
],
"x-ms-routing-request-id": [
"WESTUS:20191114T204202Z:7af02308-361d-4c6c-96e3-b94de21278f1"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"Date": [
"Thu, 14 Nov 2019 20:42:02 GMT"
],
"Content-Length": [
"605"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
]
},
"ResponseBody": "{\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders\",\r\n \"name\": \"53f2a7dd-04ba-4354-afa8-68301b2d3d28\",\r\n \"etag\": 9,\r\n \"properties\": {\r\n \"displayName\": \"test\",\r\n \"requestDateTime\": \"2019-11-14T20:37:59.4701894Z\",\r\n \"createdDateTime\": \"2019-11-14T20:41:32.0872378Z\",\r\n \"expiryDate\": \"2020-11-14\",\r\n \"term\": \"P1Y\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"reservations\": [\r\n {\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/53f2a7dd-04ba-4354-afa8-68301b2d3d28/reservations/0b45da26-4443-418e-a273-5b9eba12a416\"\r\n }\r\n ],\r\n \"originalQuantity\": 1,\r\n \"billingPlan\": \"Upfront\"\r\n }\r\n}",
"StatusCode": 200
}
],
"Names": {},
"Variables": {
"SubscriptionId": "d3ae48e5-dbb2-4618-afd4-fb1b8559cb80"
}
}

Просмотреть файл

@ -1,44 +1,40 @@
{ {
"Entries": [ "Entries": [
{ {
"RequestUri": "/providers/Microsoft.Capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/split?api-version=2018-06-01", "RequestUri": "/providers/Microsoft.Capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/split?api-version=2019-04-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvNzA0YWVlOGMtYzkwNi00N2M3LWJkMjItNzgxODQxZmI0OGI1L3NwbGl0P2FwaS12ZXJzaW9uPTIwMTgtMDYtMDE=", "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvMGMwZTk3MmMtYTQxOC00OTdjLThmYzktOTZiNWQ0M2ZjYjFkL3NwbGl0P2FwaS12ZXJzaW9uPTIwMTktMDQtMDE=",
"RequestMethod": "POST", "RequestMethod": "POST",
"RequestBody": "{\r\n \"properties\": {\r\n \"quantities\": [\r\n 1,\r\n 1\r\n ],\r\n \"reservationId\": \"/providers/Microsoft.Capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\"\r\n }\r\n}", "RequestBody": "{\r\n \"properties\": {\r\n \"quantities\": [\r\n 1,\r\n 2\r\n ],\r\n \"reservationId\": \"/providers/Microsoft.Capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/5d941ba9-22d0-46f5-8194-ca00001bb180\"\r\n }\r\n}",
"RequestHeaders": { "RequestHeaders": {
"x-ms-client-request-id": [
"34ec2937-e6e8-4d58-aeed-3a1ed3196fba"
],
"Accept-Language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.6.28008.01",
"OSName/Windows",
"OSVersion/Microsoft.Windows.10.0.18363.",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.13.0.0"
],
"Content-Type": [ "Content-Type": [
"application/json; charset=utf-8" "application/json; charset=utf-8"
], ],
"Content-Length": [ "Content-Length": [
"235" "235"
],
"x-ms-client-request-id": [
"19aca3a3-17e1-4f13-9345-058266416f58"
],
"accept-language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.7.3056.0",
"OSName/Windows10Enterprise",
"OSVersion/6.3.17134",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.8.0.0"
] ]
}, },
"ResponseBody": "[\r\n {\r\n \"sku\": {\r\n \"name\": \"Standard_B1ms\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/efcd2077-baa6-4be3-8190-2b9ba939c8bc\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"704aee8c-c906-47c7-bd22-781841fb48b5/efcd2077-baa6-4be3-8190-2b9ba939c8bc\",\r\n \"etag\": 2,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"quantity\": 1,\r\n \"provisioningState\": \"Succeeded\",\r\n \"expiryDate\": \"2019-06-15\",\r\n \"displayName\": \"Powershell_Test\",\r\n \"effectiveDateTime\": \"2018-06-15T22:22:46.669627Z\",\r\n \"lastUpdatedDateTime\": \"2018-06-15T22:22:53.5650117Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Standard_B1ms\",\r\n \"splitProperties\": {\r\n \"splitSource\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\"\r\n }\r\n }\r\n },\r\n {\r\n \"sku\": {\r\n \"name\": \"Standard_B1ms\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/0281e256-5b31-424a-8df8-e67f6531113a\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"704aee8c-c906-47c7-bd22-781841fb48b5/0281e256-5b31-424a-8df8-e67f6531113a\",\r\n \"etag\": 2,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"quantity\": 1,\r\n \"provisioningState\": \"Succeeded\",\r\n \"expiryDate\": \"2019-06-15\",\r\n \"displayName\": \"Powershell_Test\",\r\n \"effectiveDateTime\": \"2018-06-15T22:22:46.669627Z\",\r\n \"lastUpdatedDateTime\": \"2018-06-15T22:22:53.5650117Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Standard_B1ms\",\r\n \"splitProperties\": {\r\n \"splitSource\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\"\r\n }\r\n }\r\n },\r\n {\r\n \"sku\": {\r\n \"name\": \"Standard_B1ms\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"704aee8c-c906-47c7-bd22-781841fb48b5/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\",\r\n \"etag\": 14,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"quantity\": 2,\r\n \"provisioningState\": \"Cancelled\",\r\n \"expiryDate\": \"2019-06-15\",\r\n \"displayName\": \"Powershell_Test\",\r\n \"effectiveDateTime\": \"2018-06-15T22:22:46.669627Z\",\r\n \"extendedStatusInfo\": {\r\n \"statusCode\": \"Split\",\r\n \"message\": \"This reservation was split and is no longer active.\"\r\n },\r\n \"lastUpdatedDateTime\": \"2018-06-15T22:22:53.5650117Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Standard_B1ms\",\r\n \"splitProperties\": {\r\n \"splitDestinations\": [\r\n \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/efcd2077-baa6-4be3-8190-2b9ba939c8bc\",\r\n \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/0281e256-5b31-424a-8df8-e67f6531113a\"\r\n ]\r\n }\r\n }\r\n }\r\n]",
"ResponseHeaders": { "ResponseHeaders": {
"Content-Length": [ "Cache-Control": [
"2973" "no-cache"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
], ],
"Pragma": [ "Pragma": [
"no-cache" "no-cache"
], ],
"Location": [
"https://management.azure.com/providers/Microsoft.Capacity/reservationorders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/splitoperationresults/5d941ba9-22d0-46f5-8194-ca00001bb180_3?api-version=2019-04-01"
],
"Retry-After": [ "Retry-After": [
"10" "10"
], ],
@ -49,41 +45,45 @@
"1199" "1199"
], ],
"x-ms-test": [ "x-ms-test": [
"{\"contact\":\"kgautam\",\"scenarios\":\"SqlSusePurchase\",\"retention\":\"6/25/2018 9:30:59 PM\"}" "{\"contact\":\"kgautam\",\"scenarios\":\"RITesting\",\"retention\":\"12/30/2019 7:02:08 PM\"}"
], ],
"x-ms-request-id": [ "x-ms-request-id": [
"westus:e1b4df12-d7eb-453f-8e7a-7a93497f36bc" "westus:09ed0542-2906-4edd-b41c-5a1ea692da8d"
], ],
"X-Content-Type-Options": [ "X-Content-Type-Options": [
"nosniff" "nosniff"
], ],
"Server": [
"Microsoft-IIS/10.0"
],
"x-ms-correlation-request-id": [ "x-ms-correlation-request-id": [
"d48dbedf-ac3b-4a7d-ae18-63630ee0e327" "5509155b-eb06-4e8d-a4bc-28b4aef68357"
], ],
"x-ms-routing-request-id": [ "x-ms-routing-request-id": [
"WESTUS2:20180615T222254Z:d48dbedf-ac3b-4a7d-ae18-63630ee0e327" "WESTUS2:20191110T235618Z:5509155b-eb06-4e8d-a4bc-28b4aef68357"
], ],
"Strict-Transport-Security": [ "Strict-Transport-Security": [
"max-age=31536000; includeSubDomains" "max-age=31536000; includeSubDomains"
], ],
"Cache-Control": [
"no-cache"
],
"Date": [ "Date": [
"Fri, 15 Jun 2018 22:22:54 GMT" "Sun, 10 Nov 2019 23:56:18 GMT"
], ],
"Location": [ "Content-Length": [
"https://management.azure.com/providers/Microsoft.Capacity/reservationorders/704aee8c-c906-47c7-bd22-781841fb48b5/split/operationresults/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e_12?api-version=2018-06-01" "3555"
], ],
"Server": [ "Content-Type": [
"Microsoft-IIS/8.5" "application/json; charset=utf-8"
],
"Expires": [
"-1"
] ]
}, },
"ResponseBody": "[\r\n {\r\n \"sku\": {\r\n \"name\": \"Standard_D1\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/5ae9e6f9-6193-4d0b-9c49-d59d5b19fe53\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"0c0e972c-a418-497c-8fc9-96b5d43fcb1d/5ae9e6f9-6193-4d0b-9c49-d59d5b19fe53\",\r\n \"etag\": 2,\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"appliedScopes\": [\r\n \"/subscriptions/d3ae48e5-dbb2-4618-afd4-fb1b8559cb80\"\r\n ],\r\n \"appliedScopeType\": \"Single\",\r\n \"quantity\": 1,\r\n \"provisioningState\": \"Succeeded\",\r\n \"expiryDate\": \"2020-10-01\",\r\n \"displayName\": \"TestPurchaseReservation\",\r\n \"effectiveDateTime\": \"2019-11-10T23:56:15.2470323Z\",\r\n \"lastUpdatedDateTime\": \"2019-11-10T23:56:17.9190356Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Reserved VM Instance, Standard_D1, US West, 1 Year\",\r\n \"splitProperties\": {\r\n \"splitSource\": \"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/5d941ba9-22d0-46f5-8194-ca00001bb180\"\r\n },\r\n \"renew\": false\r\n }\r\n },\r\n {\r\n \"sku\": {\r\n \"name\": \"Standard_D1\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/4a60de37-8be3-4c67-ba15-1c7722f6a008\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"0c0e972c-a418-497c-8fc9-96b5d43fcb1d/4a60de37-8be3-4c67-ba15-1c7722f6a008\",\r\n \"etag\": 2,\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"appliedScopes\": [\r\n \"/subscriptions/d3ae48e5-dbb2-4618-afd4-fb1b8559cb80\"\r\n ],\r\n \"appliedScopeType\": \"Single\",\r\n \"quantity\": 2,\r\n \"provisioningState\": \"Succeeded\",\r\n \"expiryDate\": \"2020-10-01\",\r\n \"displayName\": \"TestPurchaseReservation\",\r\n \"effectiveDateTime\": \"2019-11-10T23:56:15.2470323Z\",\r\n \"lastUpdatedDateTime\": \"2019-11-10T23:56:17.9190356Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Reserved VM Instance, Standard_D1, US West, 1 Year\",\r\n \"splitProperties\": {\r\n \"splitSource\": \"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/5d941ba9-22d0-46f5-8194-ca00001bb180\"\r\n },\r\n \"renew\": false\r\n }\r\n },\r\n {\r\n \"sku\": {\r\n \"name\": \"Standard_D1\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/5d941ba9-22d0-46f5-8194-ca00001bb180\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"0c0e972c-a418-497c-8fc9-96b5d43fcb1d/5d941ba9-22d0-46f5-8194-ca00001bb180\",\r\n \"etag\": 5,\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"appliedScopes\": [\r\n \"/subscriptions/d3ae48e5-dbb2-4618-afd4-fb1b8559cb80\"\r\n ],\r\n \"appliedScopeType\": \"Single\",\r\n \"quantity\": 3,\r\n \"provisioningState\": \"Cancelled\",\r\n \"expiryDate\": \"2020-10-01\",\r\n \"displayName\": \"TestPurchaseReservation\",\r\n \"effectiveDateTime\": \"2019-11-10T23:56:15.2470323Z\",\r\n \"extendedStatusInfo\": {\r\n \"statusCode\": \"Split\",\r\n \"message\": \"This reservation was split and is no longer active\"\r\n },\r\n \"lastUpdatedDateTime\": \"2019-11-10T23:56:17.9190356Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Reserved VM Instance, Standard_D1, US West, 1 Year\",\r\n \"splitProperties\": {\r\n \"splitDestinations\": [\r\n \"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/5ae9e6f9-6193-4d0b-9c49-d59d5b19fe53\",\r\n \"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/4a60de37-8be3-4c67-ba15-1c7722f6a008\"\r\n ]\r\n },\r\n \"mergeProperties\": {\r\n \"mergeSources\": [\r\n \"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/edde0097-21bd-46e4-a495-1bda7e7f9aba\",\r\n \"/providers/microsoft.capacity/reservationOrders/0c0e972c-a418-497c-8fc9-96b5d43fcb1d/reservations/77ade667-6d1e-49ed-8aa1-341b6009b3a0\"\r\n ]\r\n },\r\n \"renew\": false\r\n }\r\n }\r\n]",
"StatusCode": 200 "StatusCode": 200
} }
], ],
"Names": {}, "Names": {},
"Variables": { "Variables": {
"SubscriptionId": "302110e3-cd4e-4244-9874-07c91853c809" "SubscriptionId": "d3ae48e5-dbb2-4618-afd4-fb1b8559cb80"
} }
} }

Просмотреть файл

@ -1,40 +1,33 @@
{ {
"Entries": [ "Entries": [
{ {
"RequestUri": "/providers/Microsoft.Capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e?api-version=2018-06-01", "RequestUri": "/providers/Microsoft.Capacity/reservationOrders/11e0f3cb-d8d2-42d4-8b24-b460cab90b67/reservations/153f4fea-dde4-4656-949a-50e3191840c9?api-version=2019-04-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvNzA0YWVlOGMtYzkwNi00N2M3LWJkMjItNzgxODQxZmI0OGI1L3Jlc2VydmF0aW9ucy9hYzdmNmIwNC1mZjQ1LTRkYTEtODNmMy1iMGYyZjZjODEyOGU/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvMTFlMGYzY2ItZDhkMi00MmQ0LThiMjQtYjQ2MGNhYjkwYjY3L3Jlc2VydmF0aW9ucy8xNTNmNGZlYS1kZGU0LTQ2NTYtOTQ5YS01MGUzMTkxODQwYzk/YXBpLXZlcnNpb249MjAxOS0wNC0wMQ==",
"RequestMethod": "PATCH", "RequestMethod": "PATCH",
"RequestBody": "{\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"instanceFlexibility\": \"On\"\r\n }\r\n}", "RequestBody": "{\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"instanceFlexibility\": \"On\"\r\n }\r\n}",
"RequestHeaders": { "RequestHeaders": {
"x-ms-client-request-id": [
"f0094d94-96ec-474d-a2c5-f4ff2306bf0a"
],
"Accept-Language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.6.28008.01",
"OSName/Windows",
"OSVersion/Microsoft.Windows.10.0.18363.",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.13.0.0"
],
"Content-Type": [ "Content-Type": [
"application/json; charset=utf-8" "application/json; charset=utf-8"
], ],
"Content-Length": [ "Content-Length": [
"96" "96"
],
"x-ms-client-request-id": [
"8f017451-4840-4fce-82a2-251ecc0a1694"
],
"accept-language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.7.3056.0",
"OSName/Windows10Enterprise",
"OSVersion/6.3.17134",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.8.0.0"
] ]
}, },
"ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_B1ms\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"704aee8c-c906-47c7-bd22-781841fb48b5/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\",\r\n \"etag\": 11,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"quantity\": 2,\r\n \"provisioningState\": \"Succeeded\",\r\n \"expiryDate\": \"2019-06-15\",\r\n \"displayName\": \"Powershell_Test\",\r\n \"effectiveDateTime\": \"2018-06-15T22:18:16.1504397Z\",\r\n \"lastUpdatedDateTime\": \"2018-06-15T22:18:21.5510168Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Standard_B1ms\"\r\n }\r\n}",
"ResponseHeaders": { "ResponseHeaders": {
"Content-Length": [ "Cache-Control": [
"736" "no-cache"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
], ],
"Pragma": [ "Pragma": [
"no-cache" "no-cache"
@ -46,38 +39,45 @@
"1199" "1199"
], ],
"x-ms-test": [ "x-ms-test": [
"{\"contact\":\"kgautam\",\"scenarios\":\"SqlSusePurchase\",\"retention\":\"6/25/2018 9:30:59 PM\"}" "{\"contact\":\"kgautam\",\"scenarios\":\"NewRiTesting\",\"retention\":\"1/23/2020 3:02:14 PM\"}"
], ],
"x-ms-request-id": [ "x-ms-request-id": [
"westus:9fa83c1f-9a16-4f0d-b89c-83dde0301295" "westus:5e4c94f8-14ea-48e4-9442-f8fe98af2b42"
], ],
"X-Content-Type-Options": [ "X-Content-Type-Options": [
"nosniff" "nosniff"
], ],
"Server": [
"Microsoft-IIS/10.0"
],
"x-ms-correlation-request-id": [ "x-ms-correlation-request-id": [
"faaff7bf-b94b-45a4-959d-f50ccbe55e78" "ed487f79-12d7-4361-ac35-9e5143dcce5c"
], ],
"x-ms-routing-request-id": [ "x-ms-routing-request-id": [
"WESTUS2:20180615T221823Z:faaff7bf-b94b-45a4-959d-f50ccbe55e78" "WESTUS2:20191110T233735Z:ed487f79-12d7-4361-ac35-9e5143dcce5c"
], ],
"Strict-Transport-Security": [ "Strict-Transport-Security": [
"max-age=31536000; includeSubDomains" "max-age=31536000; includeSubDomains"
], ],
"Cache-Control": [
"no-cache"
],
"Date": [ "Date": [
"Fri, 15 Jun 2018 22:18:23 GMT" "Sun, 10 Nov 2019 23:37:35 GMT"
], ],
"Server": [ "Content-Length": [
"Microsoft-IIS/8.5" "760"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Expires": [
"-1"
] ]
}, },
"ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_B1ls\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/11e0f3cb-d8d2-42d4-8b24-b460cab90b67/reservations/153f4fea-dde4-4656-949a-50e3191840c9\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"11e0f3cb-d8d2-42d4-8b24-b460cab90b67/153f4fea-dde4-4656-949a-50e3191840c9\",\r\n \"etag\": 54,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopeType\": \"Shared\",\r\n \"quantity\": 5,\r\n \"provisioningState\": \"Succeeded\",\r\n \"expiryDate\": \"2020-10-25\",\r\n \"displayName\": \"VM_RI_10-25-2019_08-10\",\r\n \"effectiveDateTime\": \"2019-11-10T23:37:30.5963441Z\",\r\n \"lastUpdatedDateTime\": \"2019-11-10T23:37:34.289193Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Reserved VM Instance, Standard_B1ls, EU West, 1 Year\",\r\n \"renew\": false\r\n }\r\n}",
"StatusCode": 200 "StatusCode": 200
} }
], ],
"Names": {}, "Names": {},
"Variables": { "Variables": {
"SubscriptionId": "302110e3-cd4e-4244-9874-07c91853c809" "SubscriptionId": "d3ae48e5-dbb2-4618-afd4-fb1b8559cb80"
} }
} }

Просмотреть файл

@ -1,83 +1,83 @@
{ {
"Entries": [ "Entries": [
{ {
"RequestUri": "/providers/Microsoft.Capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e?api-version=2018-06-01", "RequestUri": "/providers/Microsoft.Capacity/reservationOrders/11e0f3cb-d8d2-42d4-8b24-b460cab90b67/reservations/153f4fea-dde4-4656-949a-50e3191840c9?api-version=2019-04-01",
"EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvNzA0YWVlOGMtYzkwNi00N2M3LWJkMjItNzgxODQxZmI0OGI1L3Jlc2VydmF0aW9ucy9hYzdmNmIwNC1mZjQ1LTRkYTEtODNmMy1iMGYyZjZjODEyOGU/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FwYWNpdHkvcmVzZXJ2YXRpb25PcmRlcnMvMTFlMGYzY2ItZDhkMi00MmQ0LThiMjQtYjQ2MGNhYjkwYjY3L3Jlc2VydmF0aW9ucy8xNTNmNGZlYS1kZGU0LTQ2NTYtOTQ5YS01MGUzMTkxODQwYzk/YXBpLXZlcnNpb249MjAxOS0wNC0wMQ==",
"RequestMethod": "PATCH", "RequestMethod": "PATCH",
"RequestBody": "{\r\n \"properties\": {\r\n \"appliedScopeType\": \"Single\",\r\n \"appliedScopes\": [\r\n \"/subscriptions/302110e3-cd4e-4244-9874-07c91853c809\"\r\n ],\r\n \"instanceFlexibility\": \"On\"\r\n }\r\n}", "RequestBody": "{\r\n \"properties\": {\r\n \"appliedScopeType\": \"Single\",\r\n \"appliedScopes\": [\r\n \"/subscriptions/d3ae48e5-dbb2-4618-afd4-fb1b8559cb80\"\r\n ],\r\n \"instanceFlexibility\": \"On\"\r\n }\r\n}",
"RequestHeaders": { "RequestHeaders": {
"x-ms-client-request-id": [
"accd4d7d-8444-4fd9-a4d2-e4c2305de5c4"
],
"Accept-Language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.6.28008.01",
"OSName/Windows",
"OSVersion/Microsoft.Windows.10.0.18363.",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.13.0.0"
],
"Content-Type": [ "Content-Type": [
"application/json; charset=utf-8" "application/json; charset=utf-8"
], ],
"Content-Length": [ "Content-Length": [
"189" "189"
],
"x-ms-client-request-id": [
"5afb7fce-0443-4f39-aab0-9ecd452a809e"
],
"accept-language": [
"en-US"
],
"User-Agent": [
"FxVersion/4.7.3056.0",
"OSName/Windows10Enterprise",
"OSVersion/6.3.17134",
"Microsoft.Azure.Management.Reservations.AzureReservationAPIClient/1.8.0.0"
] ]
}, },
"ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_B1ms\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/704aee8c-c906-47c7-bd22-781841fb48b5/reservations/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"704aee8c-c906-47c7-bd22-781841fb48b5/ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e\",\r\n \"etag\": 9,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopes\": [\r\n \"/subscriptions/302110e3-cd4e-4244-9874-07c91853c809\"\r\n ],\r\n \"appliedScopeType\": \"Single\",\r\n \"quantity\": 2,\r\n \"provisioningState\": \"Succeeded\",\r\n \"expiryDate\": \"2019-06-15\",\r\n \"displayName\": \"Powershell_Test\",\r\n \"effectiveDateTime\": \"2018-06-15T22:05:05.4324928Z\",\r\n \"lastUpdatedDateTime\": \"2018-06-15T22:05:15.5422039Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"Off\",\r\n \"skuDescription\": \"Standard_B1ms\",\r\n }\r\n}",
"ResponseHeaders": { "ResponseHeaders": {
"Cache-Control": [
"no-cache"
],
"Pragma": [
"no-cache"
],
"Vary": [
"Accept-Encoding"
],
"x-ms-ratelimit-remaining-tenant-writes": [
"1199"
],
"x-ms-test": [
"{\"contact\":\"kgautam\",\"scenarios\":\"NewRiTesting\",\"retention\":\"1/23/2020 3:02:14 PM\"}"
],
"x-ms-request-id": [
"westus:3c51129f-c687-44e8-b4f4-6e5710f70614"
],
"X-Content-Type-Options": [
"nosniff"
],
"Server": [
"Microsoft-IIS/10.0"
],
"x-ms-correlation-request-id": [
"ce3ffef4-77c2-483d-a78a-9cace175c789"
],
"x-ms-routing-request-id": [
"WESTUS2:20191110T233705Z:ce3ffef4-77c2-483d-a78a-9cace175c789"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"Date": [
"Sun, 10 Nov 2019 23:37:04 GMT"
],
"Content-Length": [ "Content-Length": [
"1120" "833"
], ],
"Content-Type": [ "Content-Type": [
"application/json; charset=utf-8" "application/json; charset=utf-8"
], ],
"Expires": [ "Expires": [
"-1" "-1"
],
"Pragma": [
"no-cache"
],
"x-ms-request-id": [
"westus:47f62299-6ae7-4d56-8ceb-dcf34a16b4cf"
],
"X-Content-Type-Options": [
"nosniff"
],
"x-ms-failure-cause": [
"service"
],
"x-ms-ratelimit-remaining-tenant-writes": [
"1199"
],
"x-ms-correlation-request-id": [
"6319c017-d0f0-4c2e-a898-ef5e9ccd88eb"
],
"x-ms-routing-request-id": [
"WESTUS2:20180615T220106Z:6319c017-d0f0-4c2e-a898-ef5e9ccd88eb"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"Connection": [
"close"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Fri, 15 Jun 2018 22:01:05 GMT"
],
"Server": [
"Microsoft-IIS/8.5"
] ]
}, },
"ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_B1ls\"\r\n },\r\n \"id\": \"/providers/microsoft.capacity/reservationOrders/11e0f3cb-d8d2-42d4-8b24-b460cab90b67/reservations/153f4fea-dde4-4656-949a-50e3191840c9\",\r\n \"type\": \"Microsoft.Capacity/reservationOrders/reservations\",\r\n \"name\": \"11e0f3cb-d8d2-42d4-8b24-b460cab90b67/153f4fea-dde4-4656-949a-50e3191840c9\",\r\n \"etag\": 52,\r\n \"location\": \"westeurope\",\r\n \"properties\": {\r\n \"appliedScopes\": [\r\n \"/subscriptions/d3ae48e5-dbb2-4618-afd4-fb1b8559cb80\"\r\n ],\r\n \"appliedScopeType\": \"Single\",\r\n \"quantity\": 5,\r\n \"provisioningState\": \"Succeeded\",\r\n \"expiryDate\": \"2020-10-25\",\r\n \"displayName\": \"VM_RI_10-25-2019_08-10\",\r\n \"effectiveDateTime\": \"2019-11-10T23:37:01.5279416Z\",\r\n \"lastUpdatedDateTime\": \"2019-11-10T23:37:04.4973856Z\",\r\n \"reservedResourceType\": \"VirtualMachines\",\r\n \"instanceFlexibility\": \"On\",\r\n \"skuDescription\": \"Reserved VM Instance, Standard_B1ls, EU West, 1 Year\",\r\n \"renew\": false\r\n }\r\n}",
"StatusCode": 200 "StatusCode": 200
} }
], ],
"Names": {}, "Names": {},
"Variables": { "Variables": {
"SubscriptionId": "302110e3-cd4e-4244-9874-07c91853c809" "SubscriptionId": "d3ae48e5-dbb2-4618-afd4-fb1b8559cb80"
} }
} }

Просмотреть файл

@ -77,7 +77,8 @@ FunctionsToExport = @()
CmdletsToExport = 'Get-AzReservationOrder', 'Get-AzReservation', CmdletsToExport = 'Get-AzReservationOrder', 'Get-AzReservation',
'Get-AzReservationHistory', 'Update-AzReservation', 'Get-AzReservationHistory', 'Update-AzReservation',
'Merge-AzReservation', 'Split-AzReservation', 'Merge-AzReservation', 'Split-AzReservation',
'Get-AzReservationOrderId', 'Get-AzReservationCatalog' 'Get-AzReservationOrderId', 'Get-AzReservationCatalog',
'Get-AzReservationQuote', 'New-AzReservation'
# Variables to export from this module # Variables to export from this module
# VariablesToExport = @() # VariablesToExport = @()

Просмотреть файл

@ -18,4 +18,10 @@
* Overview of change #1 * Overview of change #1
- Additional information about change #1 - Additional information about change #1
--> -->
## Upcoming Release ## Upcoming Release
* Add billing plan details in getCatalog
- new object in the response of get-Catalog
* Add new Api CalculatePrice
- new Api for calculate ReservationOrder price
* Add new Api Purchase
- new Api for Purchase ReservationOrder in powershell

Просмотреть файл

@ -0,0 +1,93 @@
using Microsoft.Azure.Commands.Reservations.Common;
using System.Management.Automation;
using Microsoft.Azure.Management.Reservations;
using Microsoft.Azure.Management.Reservations.Models;
using System.Collections.Generic;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.Reservations.Custom;
namespace Microsoft.Azure.Commands.Reservations.Cmdlets
{
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ReservationQuote"), OutputType(typeof(CalculatePriceResponse))]
public class Calculate : AzureReservationsCmdletBase
{
[Parameter(Mandatory = true)]
[PSArgumentCompleter("VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", "VMwareCloudSimple", "RedHatOsa")]
[ValidateNotNullOrEmpty]
public string ReservedResourceType { get; set; }
[Parameter(Mandatory = true)]
[ValidateNotNullOrEmpty]
public string Sku { get; set; }
[Parameter(Mandatory = false)]
[LocationCompleter("Microsoft.Capacity/catalogs")]
[ValidateNotNullOrEmpty]
public string Location { get; set; }
[Parameter(Mandatory = true)]
[ValidateNotNullOrEmpty]
public string BillingScopeId { get; set; }
[Parameter(Mandatory = true)]
[PSArgumentCompleter("P1Y", "P3Y")]
[ValidateNotNullOrEmpty]
public string Term { get; set; }
[Parameter(Mandatory = false)]
[PSArgumentCompleter("Upfront", "Monthly")]
[ValidateNotNullOrEmpty]
public string BillingPlan { get; set; }
[Parameter(Mandatory = true)]
[ValidateNotNull]
public int? Quantity { get; set; }
[Parameter(Mandatory = true)]
[ValidateNotNull]
public string DisplayName { get; set; }
[Parameter(Mandatory = true)]
[PSArgumentCompleter("Single", "Shared")]
[ValidateNotNullOrEmpty]
public string AppliedScopeType { get; set; }
[Parameter(Mandatory = false)]
[ValidateNotNull]
public string AppliedScope { get; set; }
[Parameter(Mandatory = false)]
public bool? Renew { get; set; }
[Parameter(Mandatory = false)]
public string InstanceFlexibility { get; set; }
public override void ExecuteCmdlet()
{
var skuN = new SkuName(Sku);
PurchaseRequestPropertiesReservedResourceProperties resourceProperties = new PurchaseRequestPropertiesReservedResourceProperties(InstanceFlexibility);
PurchaseRequest PurchaseRequest = new PurchaseRequest();
PurchaseRequest.Location = Location;
PurchaseRequest.Quantity = Quantity;
PurchaseRequest.Renew = Renew;
PurchaseRequest.Term = Term;
PurchaseRequest.AppliedScopeType = AppliedScopeType;
if (AppliedScope != null)
{
PurchaseRequest.AppliedScopes = new List<string>() { AppliedScope };
}
PurchaseRequest.BillingScopeId = BillingScopeId;
PurchaseRequest.BillingPlan = BillingPlan;
PurchaseRequest.DisplayName = DisplayName;
PurchaseRequest.Sku = skuN;
PurchaseRequest.ReservedResourceProperties = resourceProperties;
PurchaseRequest.ReservedResourceType = ReservedResourceType;
var response = AzureReservationAPIClient.ReservationOrder.Calculate(PurchaseRequest);
var prop = new PSCalculatePriceResponseProperties(response.Properties);
WriteObject(prop);
}
}
}

Просмотреть файл

@ -0,0 +1,100 @@
using System;
using Microsoft.Azure.Commands.Reservations.Common;
using System.Management.Automation;
using Microsoft.Azure.Management.Reservations;
using Microsoft.Azure.Commands.Reservations.Models;
using Microsoft.Azure.Management.Reservations.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using System.Collections.Generic;
namespace Microsoft.Azure.Commands.Reservations.Cmdlets
{
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Reservation", SupportsShouldProcess = true), OutputType(typeof(ReservationOrderResponse))]
public class Purchase : AzureReservationsCmdletBase
{
[Parameter(Mandatory = true)]
[ValidateNotNull]
public string ReservationOrderId { get; set; }
[Parameter(Mandatory = true)]
[PSArgumentCompleter("VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", "VMwareCloudSimple", "RedHatOsa")]
[ValidateNotNullOrEmpty]
public string ReservedResourceType { get; set; }
[Parameter(Mandatory = true)]
[ValidateNotNullOrEmpty]
public string Sku { get; set; }
[Parameter(Mandatory = false)]
[LocationCompleter("Microsoft.Capacity/catalogs")]
[ValidateNotNullOrEmpty]
public string Location { get; set; }
[Parameter(Mandatory = true)]
[ValidateNotNullOrEmpty]
public string BillingScopeId { get; set; }
[Parameter(Mandatory = true)]
[PSArgumentCompleter("P1Y", "P3Y")]
[ValidateNotNullOrEmpty]
public string Term { get; set; }
[Parameter(Mandatory = false)]
[PSArgumentCompleter("Upfront", "Monthly")]
[ValidateNotNullOrEmpty]
public string BillingPlan { get; set; }
[Parameter(Mandatory = true)]
[ValidateNotNull]
public int? Quantity { get; set; }
[Parameter(Mandatory = true)]
[ValidateNotNull]
public string DisplayName { get; set; }
[Parameter(Mandatory = true)]
[PSArgumentCompleter("Single", "Shared")]
[ValidateNotNullOrEmpty]
public string AppliedScopeType { get; set; }
[Parameter(Mandatory = false)]
[ValidateNotNull]
public string AppliedScope { get; set; }
[Parameter(Mandatory = false)]
public bool? Renew { get; set; }
[Parameter(Mandatory = false)]
public string InstanceFlexibility { get; set; }
public override void ExecuteCmdlet()
{
var skuN = new SkuName(Sku);
PurchaseRequest PurchaseRequest = new PurchaseRequest();
PurchaseRequestPropertiesReservedResourceProperties resourceProperties = new PurchaseRequestPropertiesReservedResourceProperties(InstanceFlexibility);
PurchaseRequest.Location = Location;
PurchaseRequest.Quantity = Quantity;
PurchaseRequest.Renew = Renew;
PurchaseRequest.Term = Term;
PurchaseRequest.AppliedScopeType = AppliedScopeType;
if (AppliedScope != null)
{
PurchaseRequest.AppliedScopes = new List<string>() { AppliedScope };
}
PurchaseRequest.BillingScopeId = BillingScopeId;
PurchaseRequest.BillingPlan = BillingPlan;
PurchaseRequest.DisplayName = DisplayName;
PurchaseRequest.Sku = skuN;
PurchaseRequest.ReservedResourceProperties = resourceProperties;
PurchaseRequest.ReservedResourceType = ReservedResourceType;
var resourceInfo = $"Reservation order {ReservationOrderId}";
if (ShouldProcess(resourceInfo, "Purchase"))
{
var response = AzureReservationAPIClient.ReservationOrder.Purchase(ReservationOrderId, PurchaseRequest);
WriteObject(response);
}
}
}
}

Просмотреть файл

@ -0,0 +1,97 @@
using System.Collections.Generic;
using Microsoft.Azure.Management.Reservations.Models;
namespace Microsoft.Azure.Commands.Reservations.Custom
{
public class PSCalculatePriceResponseProperties
{
public string BillingCurrencyTotal { get; set; }
public bool? IsBillingPartnerManaged { get; set; }
public string ReservationOrderId { get; set; }
public string SkuTitle { get; set; }
public string SkuDescription { get; set; }
public string PricingCurrencyTotal { get; set; }
public string PaymentSchedule { get; set; }
public PSCalculatePriceResponseProperties()
{
}
public PSCalculatePriceResponseProperties(CalculatePriceResponseProperties properties)
{
if (properties != null)
{
BillingCurrencyTotal = PrintBillingCurrencyTotal(properties.BillingCurrencyTotal);
IsBillingPartnerManaged = properties.IsBillingPartnerManaged;
SkuTitle = properties.SkuTitle;
SkuDescription = properties.SkuDescription;
PricingCurrencyTotal = PrintPricingCurrencyTotal(properties.PricingCurrencyTotal);
PaymentSchedule = PrintPaymentSchedule(properties.PaymentSchedule);
ReservationOrderId = properties.ReservationOrderId;
}
}
public string PrintBillingCurrencyTotal(CalculatePriceResponsePropertiesBillingCurrencyTotal billingCurrencyTotal)
{
string builder = "";
if (billingCurrencyTotal != null)
{
builder += "CurrencyCode: " + billingCurrencyTotal.CurrencyCode;
builder += "\n" + "Amount: " + billingCurrencyTotal.Amount;
}
return builder;
}
public string PrintPricingCurrencyTotal(CalculatePriceResponsePropertiesPricingCurrencyTotal pricingCurrencyTotal)
{
string builder = "";
if (pricingCurrencyTotal != null)
{
builder += "CurrencyCode: " + pricingCurrencyTotal.CurrencyCode;
builder += "\n" + "Amount: " + pricingCurrencyTotal.Amount;
}
return builder;
}
public string PrintPaymentSchedule(IList<PaymentDetail> details)
{
string builder = "";
string billingPlanSpace = " ";
if (details != null)
{
foreach (PaymentDetail detail in details)
{
string PriceTotal = PrintPrice(detail.PricingCurrencyTotal);
string BillingTotal = PrintPrice(detail.BillingCurrencyTotal);
builder += "\n" + billingPlanSpace;
builder += "\n" + "DueDate: " + detail.DueDate;
builder += "\n" + "PaymentDate: " + detail.PaymentDate;
builder += "\n" + "PricingCurrencyTotal: " + PriceTotal;
builder += "\n" + "BillingCurrencyTotal: " + BillingTotal;
builder += "\n" + "BillingAccount: " + detail.BillingAccount;
builder += "\n" + "Status: " + detail.Status;
builder += "\n" + "ExtendedStatusInfo: " + detail.ExtendedStatusInfo;
}
}
return builder;
}
private string PrintPrice(Price price)
{
string builder = "";
string currencyTotalSpaces = " ";
if (price != null)
{
builder += "CurrencyCode: " + price.CurrencyCode;
builder += "\n" + currencyTotalSpaces + "Amount: " + price.Amount;
}
return builder;
}
}
}

Просмотреть файл

@ -33,11 +33,6 @@ namespace Microsoft.Azure.Commands.Reservations.Models
public IList<ReservationResponse> Reservations{ get; set; } public IList<ReservationResponse> Reservations{ get; set; }
public PSReservationOrder()
{
}
public string PrintItems() public string PrintItems()
{ {
string builder = ""; string builder = "";

Просмотреть файл

@ -11,7 +11,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Reservations" Version="1.9.1-preview" /> <PackageReference Include="Microsoft.Azure.Management.Reservations" Version="1.13.0-preview" />
</ItemGroup> </ItemGroup>
</Project> </Project>

Просмотреть файл

@ -1,4 +1,4 @@
--- ---
Module Name: Az.Reservations Module Name: Az.Reservations
Module Guid: 43d3b085-6323-4ac4-a7c3-81d75ea036e5 Module Guid: 43d3b085-6323-4ac4-a7c3-81d75ea036e5
Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.reservations Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.reservations
@ -26,9 +26,18 @@ Get `ReservationOrder`
### [Get-AzReservationOrderId](Get-AzReservationOrderId.md) ### [Get-AzReservationOrderId](Get-AzReservationOrderId.md)
Get list of applicable `ReservationOrder` Ids. Get list of applicable `ReservationOrder` Ids.
### [Get-AzReservationQuote](Get-AzReservationQuote.md)
{{ Fill in the Synopsis }}
### [Merge-AzReservation](Merge-AzReservation.md) ### [Merge-AzReservation](Merge-AzReservation.md)
Merges two `Reservation`s. Merges two `Reservation`s.
### [New-AzReservation](New-AzReservation.md)
Purcahse a reservation
### [Get-AzReservationQuote](Get-AzReservationQuote.md)
Calculate price for reservation order
### [Split-AzReservation](Split-AzReservation.md) ### [Split-AzReservation](Split-AzReservation.md)
Split a `Reservation`. Split a `Reservation`.

Просмотреть файл

@ -1,4 +1,4 @@
--- ---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml
Module Name: Az.Reservations Module Name: Az.Reservations
online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservation online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservation
@ -127,7 +127,7 @@ Accept wildcard characters: False
``` ```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS ## INPUTS

Просмотреть файл

@ -1,4 +1,4 @@
--- ---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml
Module Name: Az.Reservations Module Name: Az.Reservations
online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservationcatalog online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservationcatalog
@ -99,7 +99,7 @@ Accept wildcard characters: False
``` ```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS ## INPUTS

Просмотреть файл

@ -1,4 +1,4 @@
--- ---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml
Module Name: Az.Reservations Module Name: Az.Reservations
online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservationhistory online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservationhistory
@ -99,7 +99,7 @@ Accept wildcard characters: False
``` ```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS ## INPUTS

Просмотреть файл

@ -1,4 +1,4 @@
--- ---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml
Module Name: Az.Reservations Module Name: Az.Reservations
online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservationorder online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservationorder
@ -69,7 +69,7 @@ Accept wildcard characters: False
``` ```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS ## INPUTS

Просмотреть файл

@ -1,4 +1,4 @@
--- ---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml
Module Name: Az.Reservations Module Name: Az.Reservations
online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservationorderid online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservationorderid
@ -69,7 +69,7 @@ Accept wildcard characters: False
``` ```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS ## INPUTS

Просмотреть файл

@ -0,0 +1,245 @@
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml
Module Name: Az.Reservations
online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/get-azreservationquote
schema: 2.0.0
---
# Get-AzReservationQuote
## SYNOPSIS
{{ Fill in the Synopsis }}
## SYNTAX
```
Get-AzReservationQuote -ReservedResourceType <String> -Sku <String> [-Location <String>]
-BillingScopeId <String> -Term <String> [-BillingPlan <String>] -Quantity <Int32> -DisplayName <String>
-AppliedScopeType <String> [-AppliedScope <String>] [-Renew <Boolean>] [-InstanceFlexibility <String>]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```
## DESCRIPTION
Calculate price for placing a reservation order.
## EXAMPLES
### Example 1
```powershell
PS C:\> Get-AzReservationQuote -ReservedResourceType "VirtualMachines" [-Sku "standard b1"] -Location "centralus"
-BillingScopeId "/subscriptions/79c182d9-9af7-4fd5-b136-b71f0a69a1d0" -Term "P1Y" [-BillingPlan "Monthly"] -Quantity 2 [-DisplayName "demo"] -AppliedScopeType "Shared" [-AppliedScopes ""]
```
After get catalog, customer can get the differe product based on location. By using those infomation, check the price properly
## PARAMETERS
### -AppliedScope
Subscription that the benefit will be applied. Required if --applied-scope-type is Single. Do not specify if --applied-scope-type is Shared.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AppliedScopeType
Type of the Applied Scope to update the reservation with "Single" or "Shared"
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -BillingPlan
The billing plan options available for this SKU. "Monthly" or "Upfront"
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -BillingScopeId
Subscription that will be charged for purchasing Reservation.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
```yaml
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DisplayName
Friendly name for user to easily identified the reservation.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -InstanceFlexibility
Type of the Instance Flexibility to update the reservation with.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Location
Location that the SKU is available.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Quantity
Quantity of product for calculating price or purchasing.
```yaml
Type: System.Nullable`1[System.Int32]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Renew
Set this to true will automatically purchase a new reservation on the expiration date time.
```yaml
Type: System.Nullable`1[System.Boolean]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ReservedResourceType
Type of the resource for which the skus should be provided.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Sku
Sku name, get the sku list by using command az reservations catalog show
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Term
Available reservation terms for this resource.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### Microsoft.Azure.Management.Reservations.Models.CalculatePriceResponse
## NOTES
## RELATED LINKS

Просмотреть файл

@ -1,4 +1,4 @@
--- ---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml
Module Name: Az.Reservations Module Name: Az.Reservations
online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/merge-azreservation online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/merge-azreservation
@ -129,7 +129,7 @@ Accept wildcard characters: False
``` ```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS ## INPUTS

Просмотреть файл

@ -0,0 +1,292 @@
---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml
Module Name: Az.Reservations
online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/new-azreservation
schema: 2.0.0
---
# New-AzReservation
## SYNOPSIS
Purcahse a reservation
## SYNTAX
```
New-AzReservation -ReservationOrderId <String> -ReservedResourceType <String> -Sku <String>
[-Location <String>] -BillingScopeId <String> -Term <String> [-BillingPlan <String>] -Quantity <Int32>
-DisplayName <String> -AppliedScopeType <String> [-AppliedScope <String>] [-Renew <Boolean>]
[-InstanceFlexibility <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
## DESCRIPTION
Purchase a reservation Instance and get benefit
## EXAMPLES
### Example 1
```powershell
PS C:\> New-AzReservation -ReservationOrderId "112382d9-9af7-4fd5-b136-b71f0a69a1d0" -ReservedResourceType "VirtualMachines" [-Sku "standard b1"] -Location "centralus"
-BillingScopeId "/subscriptions/79c182d9-9af7-4fd5-b136-b71f0a69a1d0" -Term "P1Y" [-BillingPlan "Monthly"] -Quantity 2 [-DisplayName "demo"] -AppliedScopeType "Shared" [-AppliedScopes ""]
```
After calculate price, customer could purcahse that RI provide by calculatePrice
## PARAMETERS
### -AppliedScope
Subscription that the benefit will be applied. Required if --applied-scope-type is Single. Do not specify if --applied-scope-type is Shared.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AppliedScopeType
Type of the Applied Scope to update the reservation with "Single" or "Shared"
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -BillingPlan
The billing plan options available for this SKU. "Monthly" or "Upfront"
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -BillingScopeId
Subscription that will be charged for purchasing Reservation.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
```yaml
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DisplayName
Friendly name for user to easily identified the reservation.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -InstanceFlexibility
{{ Fill InstanceFlexibility Description }}
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Location
Location that the SKU is available.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Quantity
Quantity of product for calculating price or purchasing.
```yaml
Type: System.Nullable`1[System.Int32]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Renew
Set this to true will automatically purchase a new reservation on the expiration date time.
```yaml
Type: System.Nullable`1[System.Boolean]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ReservationOrderId
Id of reservation order to purchase, generate by az reservations reservation-order calculate.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ReservedResourceType
Type of the resource for which the skus should be provided.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Sku
Sku name
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Term
Available reservation terms for this resource.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### Microsoft.Azure.Management.Reservations.Models.ReservationOrderResponse
## NOTES
## RELATED LINKS

Просмотреть файл

@ -1,4 +1,4 @@
--- ---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml
Module Name: Az.Reservations Module Name: Az.Reservations
online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/split-azreservation online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/split-azreservation
@ -144,7 +144,7 @@ Accept wildcard characters: False
``` ```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS ## INPUTS

Просмотреть файл

@ -1,4 +1,4 @@
--- ---
external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml external help file: Microsoft.Azure.PowerShell.Cmdlets.Reservations.dll-Help.xml
Module Name: Az.Reservations Module Name: Az.Reservations
online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/update-azreservation online version: https://docs.microsoft.com/en-us/powershell/module/az.reservations/update-azreservation
@ -198,7 +198,7 @@ Accept wildcard characters: False
``` ```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS ## INPUTS