Aprovar o ingresso do aluno no laboratório resgatável
POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Education/labs/default/joinRequests/{joinRequestName}/approve?api-version=2021-12-01-preview
Parâmetros de URI
Nome |
Em |
Obrigatório |
Tipo |
Description |
billingAccountName
|
path |
True
|
string
|
A ID que identifica exclusivamente uma conta de cobrança.
|
billingProfileName
|
path |
True
|
string
|
A ID que identifica exclusivamente um perfil de cobrança.
|
invoiceSectionName
|
path |
True
|
string
|
A ID que identifica exclusivamente uma seção de fatura.
|
joinRequestName
|
path |
True
|
string
|
A ID que identifica exclusivamente uma solicitação de junção.
|
api-version
|
query |
True
|
string
|
Versão da API a ser usada com a solicitação do cliente. A versão atual é 2021-12-01-preview
|
Respostas
Nome |
Tipo |
Description |
200 OK
|
|
Solicitação de ingresso aprovada
|
Other Status Codes
|
ErrorResponseBody
|
Descreve o erro se a operação não for bem-sucedida.
|
Segurança
azure_auth
Fluxo OAuth2 do Azure Active Directory.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nome |
Description |
user_impersonation
|
representar sua conta de usuário
|
Exemplos
JoinRequestApprove
Sample Request
POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Education/labs/default/joinRequests/{joinRequestName}/approve?api-version=2021-12-01-preview
import com.azure.core.util.Context;
/** Samples for JoinRequests Deny. */
public final class Main {
/*
* x-ms-original-file: specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/JoinRequestApproveAndDeny.json
*/
/**
* Sample code: JoinRequestDeny.
*
* @param manager Entry point to EducationManager.
*/
public static void joinRequestDeny(com.azure.resourcemanager.education.EducationManager manager) {
manager
.joinRequests()
.denyWithResponse(
"{billingAccountName}",
"{billingProfileName}",
"{invoiceSectionName}",
"{joinRequestName}",
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 join_request_approve_and_deny.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.join_requests.approve(
billing_account_name="{billingAccountName}",
billing_profile_name="{billingProfileName}",
invoice_section_name="{invoiceSectionName}",
join_request_name="{joinRequestName}",
)
print(response)
# x-ms-original-file: specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/JoinRequestApproveAndDeny.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/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/JoinRequestApproveAndDeny.json
func ExampleJoinRequestsClient_Approve() {
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)
}
_, err = clientFactory.NewJoinRequestsClient().Approve(ctx, "{billingAccountName}", "{billingProfileName}", "{invoiceSectionName}", "{joinRequestName}", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
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 Deny student joining the redeemable lab
*
* @summary Deny student joining the redeemable lab
* x-ms-original-file: specification/education/resource-manager/Microsoft.Education/preview/2021-12-01-preview/examples/JoinRequestApproveAndDeny.json
*/
async function joinRequestDeny() {
const billingAccountName = "{billingAccountName}";
const billingProfileName = "{billingProfileName}";
const invoiceSectionName = "{invoiceSectionName}";
const joinRequestName = "{joinRequestName}";
const credential = new DefaultAzureCredential();
const client = new EducationManagementClient(credential);
const result = await client.joinRequests.deny(
billingAccountName,
billingProfileName,
invoiceSectionName,
joinRequestName
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Definições
Nome |
Description |
ErrorResponse
|
Descreve o formato da resposta de erro.
|
ErrorResponseBody
|
A resposta de erro indica que o serviço não é capaz de processar a solicitação de entrada. O motivo é fornecido na mensagem de erro.
|
ErrorResponse
Descreve o formato da resposta de erro.
Nome |
Tipo |
Description |
code
|
string
|
Código do erro
|
message
|
string
|
Mensagem de erro indicando por que a operação falhou.
|
ErrorResponseBody
A resposta de erro indica que o serviço não é capaz de processar a solicitação de entrada. O motivo é fornecido na mensagem de erro.