Invoke-AzRestMethod -Path "/subscriptions/{subscription}/resourcegroups/{resourcegroup}/providers/microsoft.operationalinsights/workspaces/{workspace}?api-version={API}" -Method GET
Spring 클라우드 서비스 "test-spring-service"에서 앱 "데모" 가져오기
예제 5
# Replace *** with real values
$payload = @{principalId="***"; resourceId="***"; appRoleId="***"} | ConvertTo-Json -Depth 3
Invoke-AzRestMethod -Method POST -Uri https://graph.microsoft.com/v1.0/servicePrincipals/***/appRoleAssignedTo -Payload $payload
Microsoft Graph API를 호출하여 해시 테이블을 생성하고, JSON 문자열로 변환하고, 페이로드를 전달하여 앱 역할을 할당합니다 Invoke-AzRestMethod.
예제 5
# This example demonstrates creating or updating a resource with a long-running PUT request.
Invoke-AzRestMethod -Method PUT -Uri "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.KeyVault/managedHSMs/{hsm-name}?api-version=2023-07-01" `
-Payload (@{
___location = "eastus";
properties = @{
softDeleteRetentionDays = 7;
tenantId = "{tenant-id}";
initialAdminObjectIds = @("{admin-object-id}")
};
sku = @{
name = "Standard_B1";
family = "B"
}
} | ConvertTo-Json -Depth 10) `
-WaitForCompletion
StatusCode : 200
Content : {
"sku": {
"family": "B",
"name": "Standard_B1"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.KeyVault/managedHSMs/{hsm-name}",
"name": "{hsm-name}",
"type": "Microsoft.KeyVault/managedHSMs",
"___location": "{region}",
"tags": {},
"systemData": {
"createdBy": "{user-email}",
"createdByType": "User",
"createdAt": "2024-10-29T05:05:49.229Z",
"lastModifiedBy": "{user-email}",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-10-29T05:05:49.229Z"
},
"properties": {
"tenantId": "{tenant-id}",
"hsmUri": "https://{hsm-name}.managedhsm.azure.net/",
"initialAdminObjectIds": [
"{admin-object-id}"
],
"enableSoftDelete": true,
"softDeleteRetentionInDays": 90,
"enablePurgeProtection": false,
"provisioningState": "Succeeded",
"statusMessage": "The Managed HSM is provisioned and ready to use.",
"networkAcls": {
"bypass": "AzureServices",
"defaultAction": "Allow",
"ipRules": [],
"virtualNetworkRules": []
},
"publicNetworkAccess": "Enabled",
"regions": [],
"securityDomainProperties": {
"activationStatus": "NotActivated",
"activationStatusMessage": "Your HSM has been provisioned, but cannot be used for cryptographic operations until it is activated. To activate the HSM, download the security ___domain."
}
}
}
Headers : {
"Cache-Control": "no-cache",
"Pragma": "no-cache",
"x-ms-client-request-id": "{client-request-id}",
"x-ms-keyvault-service-version": "1.5.1361.0",
"x-ms-request-id": "{request-id}",
"x-ms-ratelimit-remaining-subscription-reads": "249",
"x-ms-ratelimit-remaining-subscription-global-reads": "3749",
"x-ms-correlation-request-id": "{correlation-request-id}",
"x-ms-routing-request-id": "{routing-request-id}",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Date": "Tue, 29 Oct 2024 05:18:44 GMT"
}
Method : GET
RequestUri : https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.KeyVault/managedHSMs/{hsm-name}?api-version=2023-07-01
Version : 1.1
장기 실행 PUT 요청을 전송하여 Azure에서 관리형 HSM 리소스를 만들거나 업데이트하고 작업이 필요한 경우 완료될 때까지 폴링합니다.
이 예제에서는 사용자가 특정 값으로 바꿔야 하는 자리 표시자({subscription-id}, {resource-group}, {hsm-name}, {tenant-id} 및 {admin-object-id})를 사용합니다.
Azure 리소스의 균일한 리소스 식별자입니다. 대상 리소스는 Azure AD 인증을 지원해야 하며 액세스 토큰은 리소스 ID에 따라 파생됩니다. 리소스 ID가 설정되지 않은 경우 해당 값은 현재 Azure Environment의 기본 제공 서비스 접미사에 따라 파생됩니다.
이 cmdlet은 일반적인 매개 변수인 -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction 및 -WarningVariable 매개 변수를 지원합니다. 자세한 내용은 about_CommonParameters를 참조하세요.