Skip to content

Set GClassroomGuardianInvitation

Spencer Varney edited this page Dec 27, 2016 · 3 revisions

Set-GClassroomGuardianInvitation

SYNOPSIS

Modifies a guardian invitation. Currently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other access errors.

  • `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.
  • `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`.
  • `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom.

SYNTAX

Set-GClassroomGuardianInvitation [-StudentId] <String> [-InvitationId] <String>
 [[-GuardianInvitationBody] <GuardianInvitation>] [[-UpdateMask] <String>]
 [-StandardQueryParams <StandardQueryParameters>] [-GAuthId <String>] [-WhatIf] [-Confirm]

DESCRIPTION

Modifies a guardian invitation. Currently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other access errors.

  • `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.
  • `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`.
  • `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom.

EXAMPLES

---------- EXAMPLE 1 ----------

PS C:\> Set-GClassroomGuardianInvitation -StudentId $SomeStudentIdString -InvitationId $SomeInvitationIdString -GuardianInvitationBody $SomeGuardianInvitationObj

This automatically generated example serves to show the bare minimum required to call this Cmdlet.

Additional examples may be added, viewed and edited by users on the community wiki at the URL found in the related links.

PARAMETERS

-StudentId

The ID of the student whose guardian invitation is to be modified.

Type: String
Parameter Sets: (All)
Aliases: 

Required: True
Position: 0
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InvitationId

The `id` field of the `GuardianInvitation` to be modified.

Type: String
Parameter Sets: (All)
Aliases: 

Required: True
Position: 1
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GuardianInvitationBody

An invitation to become the guardian of a specified user, sent to a specified email address.

Type: GuardianInvitation
Parameter Sets: (All)
Aliases: 

Required: False
Position: 2
Default value: 
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-UpdateMask

Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `state` When set in a query parameter, this field should be specified as `updateMask=,,...`

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 3
Default value: 
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StandardQueryParams

A Standard Query Parameters Object.

Type: StandardQueryParameters
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

-GAuthId

The GAuthId representing the gShell auth credentials this cmdlet should use to run.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: 
Accept pipeline input: False
Accept wildcard characters: False

INPUTS

System.String

The ID of the student whose guardian invitation is to be modified.

System.String

The `id` field of the `GuardianInvitation` to be modified.

Google.Apis.Classroom.v1.Data.GuardianInvitation

An invitation to become the guardian of a specified user, sent to a specified email address.

System.String

Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `state` When set in a query parameter, this field should be specified as `updateMask=,,...`

OUTPUTS

NOTES

Part of the gShell Project, relating to the Google Classroom API; see Related Links or use the -Online parameter.

RELATED LINKS

[Wiki page for this Cmdlet]

[Getting started with gShell]

Clone this wiki locally