students
Creates, updates, deletes, gets or lists a students resource.
Overview
| Name | students |
| Type | Resource |
| Id | azure_extras.education.students |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
budget | object | Student Budget. Required. |
effectiveDate | string (date-time) | Date student was added to the lab. |
email | string | Student Email. Required. |
expirationDate | string (date-time) | Date this student is set to expire from the lab. Required. |
firstName | string | First Name. Required. |
lastName | string | Last Name. Required. |
role | string | Student Role. Required. Known values are: "Student" and "Admin". (Student, Admin) |
status | string | Student Lab Status. Known values are: "Active", "Disabled", "Expired", "Pending", and "Deleted". (Active, Disabled, Expired, Pending, Deleted) |
subscriptionAlias | string | Subscription alias. |
subscriptionId | string | Subscription Id. |
subscriptionInviteLastSentDate | string (date-time) | subscription invite last sent date. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
budget | object | Student Budget. Required. |
effectiveDate | string (date-time) | Date student was added to the lab. |
email | string | Student Email. Required. |
expirationDate | string (date-time) | Date this student is set to expire from the lab. Required. |
firstName | string | First Name. Required. |
lastName | string | Last Name. Required. |
role | string | Student Role. Required. Known values are: "Student" and "Admin". (Student, Admin) |
status | string | Student Lab Status. Known values are: "Active", "Disabled", "Expired", "Pending", and "Deleted". (Active, Disabled, Expired, Pending, Deleted) |
subscriptionAlias | string | Subscription alias. |
subscriptionId | string | Subscription Id. |
subscriptionInviteLastSentDate | string (date-time) | subscription invite last sent date. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account_name, billing_profile_name, invoice_section_name, student_alias | Get the details for a specific student in the specified lab by student alias. | |
list | select | billing_account_name, billing_profile_name, invoice_section_name | includeDeleted | Get a list of details about students that are associated with the specified lab. |
create_or_update | insert | billing_account_name, billing_profile_name, invoice_section_name, student_alias | Create and add a new student to the specified lab or update the details of an existing student in a lab. Note the student must have a valid tenant to accept the lab after they have been added to lab. | |
create_or_update | replace | billing_account_name, billing_profile_name, invoice_section_name, student_alias | Create and add a new student to the specified lab or update the details of an existing student in a lab. Note the student must have a valid tenant to accept the lab after they have been added to lab. | |
delete | delete | billing_account_name, billing_profile_name, invoice_section_name, student_alias | Delete the specified student based on the student alias. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
billing_account_name | string | The name of the billing account. Required. |
billing_profile_name | string | The name of the billing profile. Required. |
invoice_section_name | string | The name of the invoice section. Required. |
student_alias | string | The student alias. Required. |
includeDeleted | boolean | May be used to show deleted items. Default value is None. |
SELECT examples
- get
- list
Get the details for a specific student in the specified lab by student alias.
SELECT
id,
name,
budget,
effectiveDate,
email,
expirationDate,
firstName,
lastName,
role,
status,
subscriptionAlias,
subscriptionId,
subscriptionInviteLastSentDate,
systemData,
type
FROM azure_extras.education.students
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_name }}' -- required
AND invoice_section_name = '{{ invoice_section_name }}' -- required
AND student_alias = '{{ student_alias }}' -- required
;
Get a list of details about students that are associated with the specified lab.
SELECT
id,
name,
budget,
effectiveDate,
email,
expirationDate,
firstName,
lastName,
role,
status,
subscriptionAlias,
subscriptionId,
subscriptionInviteLastSentDate,
systemData,
type
FROM azure_extras.education.students
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_name }}' -- required
AND invoice_section_name = '{{ invoice_section_name }}' -- required
AND includeDeleted = '{{ includeDeleted }}'
;
INSERT examples
- create_or_update
- Manifest
Create and add a new student to the specified lab or update the details of an existing student in a lab. Note the student must have a valid tenant to accept the lab after they have been added to lab.
INSERT INTO azure_extras.education.students (
properties,
billing_account_name,
billing_profile_name,
invoice_section_name,
student_alias
)
SELECT
'{{ properties }}',
'{{ billing_account_name }}',
'{{ billing_profile_name }}',
'{{ invoice_section_name }}',
'{{ student_alias }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: students
props:
- name: billing_account_name
value: "{{ billing_account_name }}"
description: Required parameter for the students resource.
- name: billing_profile_name
value: "{{ billing_profile_name }}"
description: Required parameter for the students resource.
- name: invoice_section_name
value: "{{ invoice_section_name }}"
description: Required parameter for the students resource.
- name: student_alias
value: "{{ student_alias }}"
description: Required parameter for the students resource.
- name: properties
description: |
Get student response properties.
value:
firstName: "{{ firstName }}"
lastName: "{{ lastName }}"
email: "{{ email }}"
role: "{{ role }}"
budget:
currency: "{{ currency }}"
value: {{ value }}
subscriptionId: "{{ subscriptionId }}"
expirationDate: "{{ expirationDate }}"
status: "{{ status }}"
effectiveDate: "{{ effectiveDate }}"
subscriptionAlias: "{{ subscriptionAlias }}"
subscriptionInviteLastSentDate: "{{ subscriptionInviteLastSentDate }}"
REPLACE examples
- create_or_update
Create and add a new student to the specified lab or update the details of an existing student in a lab. Note the student must have a valid tenant to accept the lab after they have been added to lab.
REPLACE azure_extras.education.students
SET
properties = '{{ properties }}'
WHERE
billing_account_name = '{{ billing_account_name }}' --required
AND billing_profile_name = '{{ billing_profile_name }}' --required
AND invoice_section_name = '{{ invoice_section_name }}' --required
AND student_alias = '{{ student_alias }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Delete the specified student based on the student alias.
DELETE FROM azure_extras.education.students
WHERE billing_account_name = '{{ billing_account_name }}' --required
AND billing_profile_name = '{{ billing_profile_name }}' --required
AND invoice_section_name = '{{ invoice_section_name }}' --required
AND student_alias = '{{ student_alias }}' --required
;