Hämta en lista över bidrag som Microsoft har tillhandahållit.
GET https://management.azure.com/providers/Microsoft.Education/grants?api-version=2021-12-01-preview
Med valfria parametrar:
GET https://management.azure.com/providers/Microsoft.Education/grants?includeAllocatedBudget={includeAllocatedBudget}&api-version=2021-12-01-preview
URI-parametrar
Name |
I |
Obligatorisk |
Typ |
Description |
api-version
|
query |
True
|
string
|
Version av API:et som ska användas med klientbegäran. Aktuell version är 2021-12-01-preview
|
includeAllocatedBudget
|
query |
|
boolean
|
Kan användas för att inkludera information om budget som har allokerats.
|
Svar
Säkerhet
azure_auth
Azure Active Directory OAuth2 Flow.
Typ:
oauth2
Flow:
implicit
Auktoriseringswebbadress:
https://login.microsoftonline.com/common/oauth2/authorize
Omfattningar
Name |
Description |
user_impersonation
|
personifiera ditt användarkonto
|
Exempel
GrantList
Exempelbegäran
GET https://management.azure.com/providers/Microsoft.Education/grants?includeAllocatedBudget=False&api-version=2021-12-01-preview
/**
* Samples for Grants ListAll.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/GrantList.json
*/
/**
* Sample code: GrantList.
*
* @param manager Entry point to EducationManager.
*/
public static void grantList(com.azure.resourcemanager.education.EducationManager manager) {
manager.grants().listAll(false, com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.education import EducationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-education
# USAGE
python grant_list.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EducationManagementClient(
credential=DefaultAzureCredential(),
)
response = client.grants.list_all()
for item in response:
print(item)
# x-ms-original-file: specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/GrantList.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeducation_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/education/armeducation"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b9b91929c304f8fb44002267b6c98d9fb9dde014/specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/GrantList.json
func ExampleGrantsClient_NewListAllPager_grantList() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeducation.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGrantsClient().NewListAllPager(&armeducation.GrantsClientListAllOptions{IncludeAllocatedBudget: to.Ptr(false)})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.GrantListResponse = armeducation.GrantListResponse{
// Value: []*armeducation.GrantDetails{
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Education/Grants"),
// ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Education/grants/default"),
// Properties: &armeducation.GrantDetailProperties{
// EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-09T09:08:05.505Z"); return t}()),
// ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-09T09:08:05.505Z"); return t}()),
// OfferCap: &armeducation.Amount{
// Currency: to.Ptr("USD"),
// Value: to.Ptr[float32](1000),
// },
// OfferType: to.Ptr(armeducation.GrantTypeAcademic),
// Status: to.Ptr(armeducation.GrantStatusActive),
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EducationManagementClient } = require("@azure/arm-education");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get a list of grants that Microsoft has provided.
*
* @summary Get a list of grants that Microsoft has provided.
* x-ms-original-file: specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/GrantList.json
*/
async function grantList() {
const includeAllocatedBudget = false;
const options = { includeAllocatedBudget };
const credential = new DefaultAzureCredential();
const client = new EducationManagementClient(credential);
const resArray = new Array();
for await (let item of client.grants.listAll(options)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Exempelsvar
{
"value": [
{
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Education/grants/default",
"name": "default",
"type": "Microsoft.Education/Grants",
"properties": {
"offerCap": {
"currency": "USD",
"value": 1000
},
"effectiveDate": "2021-11-09T09:08:05.505Z",
"offerType": "Academic",
"expirationDate": "2021-11-09T09:08:05.505Z",
"status": "Active"
}
}
]
}
GrantListIncludeAllocatedBudget
Exempelbegäran
GET https://management.azure.com/providers/Microsoft.Education/grants?includeAllocatedBudget=True&api-version=2021-12-01-preview
/**
* Samples for Grants ListAll.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/
* GrantListIncludeAllocatedBudget.json
*/
/**
* Sample code: GrantListIncludeAllocatedBudget.
*
* @param manager Entry point to EducationManager.
*/
public static void grantListIncludeAllocatedBudget(com.azure.resourcemanager.education.EducationManager manager) {
manager.grants().listAll(true, com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.education import EducationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-education
# USAGE
python grant_list_include_allocated_budget.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = EducationManagementClient(
credential=DefaultAzureCredential(),
)
response = client.grants.list_all()
for item in response:
print(item)
# x-ms-original-file: specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/GrantListIncludeAllocatedBudget.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armeducation_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/education/armeducation"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b9b91929c304f8fb44002267b6c98d9fb9dde014/specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/GrantListIncludeAllocatedBudget.json
func ExampleGrantsClient_NewListAllPager_grantListIncludeAllocatedBudget() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armeducation.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGrantsClient().NewListAllPager(&armeducation.GrantsClientListAllOptions{IncludeAllocatedBudget: to.Ptr(true)})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.GrantListResponse = armeducation.GrantListResponse{
// Value: []*armeducation.GrantDetails{
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Education/Grants"),
// ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Education/grants/default"),
// Properties: &armeducation.GrantDetailProperties{
// AllocatedBudget: &armeducation.Amount{
// Currency: to.Ptr("USD"),
// Value: to.Ptr[float32](0),
// },
// EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-09T09:08:05.505Z"); return t}()),
// ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-09T09:08:05.505Z"); return t}()),
// OfferCap: &armeducation.Amount{
// Currency: to.Ptr("USD"),
// Value: to.Ptr[float32](1000),
// },
// OfferType: to.Ptr(armeducation.GrantTypeAcademic),
// Status: to.Ptr(armeducation.GrantStatusActive),
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { EducationManagementClient } = require("@azure/arm-education");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get a list of grants that Microsoft has provided.
*
* @summary Get a list of grants that Microsoft has provided.
* x-ms-original-file: specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/GrantListIncludeAllocatedBudget.json
*/
async function grantListIncludeAllocatedBudget() {
const includeAllocatedBudget = true;
const options = { includeAllocatedBudget };
const credential = new DefaultAzureCredential();
const client = new EducationManagementClient(credential);
const resArray = new Array();
for await (let item of client.grants.listAll(options)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Exempelsvar
{
"value": [
{
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Education/grants/default",
"name": "default",
"type": "Microsoft.Education/Grants",
"properties": {
"offerCap": {
"currency": "USD",
"value": 1000
},
"effectiveDate": "2021-11-09T09:08:05.505Z",
"offerType": "Academic",
"expirationDate": "2021-11-09T09:08:05.505Z",
"status": "Active",
"allocatedBudget": {
"currency": "USD",
"value": 0
}
}
}
]
}
Definitioner
Amount
Beloppet.
Name |
Typ |
Description |
currency
|
string
|
Den typ av valuta som används för värdet.
|
value
|
number
|
Beloppsvärde.
|
createdByType
Den typ av identitet som skapade resursen.
Name |
Typ |
Description |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
ErrorResponse
Beskriver formatet för felsvar.
Name |
Typ |
Description |
code
|
string
|
Felkod
|
message
|
string
|
Felmeddelande som anger varför åtgärden misslyckades.
|
ErrorResponseBody
Felsvaret anger att tjänsten inte kan bearbeta den inkommande begäran. Orsaken anges i felmeddelandet.
Grant status
Bevilja status
Name |
Typ |
Description |
Active
|
string
|
|
Inactive
|
string
|
|
Grant type
Bevilja erbjudandetyp
Name |
Typ |
Description |
Academic
|
string
|
|
Student
|
string
|
|
GrantDetails
Bevilja information.
Name |
Typ |
Description |
id
|
string
|
Fullständigt kvalificerat resurs-ID för resursen. Exempel – /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
name
|
string
|
Namnet på resursen
|
properties.allocatedBudget
|
Amount
|
allokerad budget
|
properties.effectiveDate
|
string
|
Bevilja ikraftträdandedatum
|
properties.expirationDate
|
string
|
Förfallodatum
|
properties.offerCap
|
Amount
|
Erbjudandetak
|
properties.offerType
|
Grant type
|
Bevilja erbjudandetyp
|
properties.status
|
Grant status
|
Bevilja status
|
systemData
|
systemData
|
Azure Resource Manager metadata som innehåller createdBy och modifiedBy-information.
|
type
|
string
|
Resurstypen. Till exempel "Microsoft.Compute/virtualMachines" eller "Microsoft.Storage/storageAccounts"
|
GrantListResponse
Lista över bidragsinformation.
Name |
Typ |
Description |
nextLink
|
string
|
Länken (url) till nästa sida med resultat.
|
value
|
GrantDetails[]
|
Listan över labb.
|
systemData
Metadata som rör skapande och senaste ändring av resursen.
Name |
Typ |
Description |
createdAt
|
string
|
Tidsstämpeln för resursskapande (UTC).
|
createdBy
|
string
|
Identiteten som skapade resursen.
|
createdByType
|
createdByType
|
Den typ av identitet som skapade resursen.
|
lastModifiedAt
|
string
|
Tidsstämpeln för resursens senaste ändring (UTC)
|
lastModifiedBy
|
string
|
Identiteten som senast ändrade resursen.
|
lastModifiedByType
|
createdByType
|
Den typ av identitet som senast ändrade resursen.
|