class CoursesAliases extends Resource (View source)

The "aliases" collection of methods.

Typical usage is:

 $classroomService = new Google\Service\Classroom(...);
 $aliases = $classroomService->courses_aliases;

Methods

create(string $courseId, CourseAlias $postBody, array $optParams = [])

Creates an alias for a course. This method returns the following error codes:

  • PERMISSION_DENIED if the requesting user is not permitted to create the alias or for access errors. NOT_FOUND if the course does not exist. ALREADY_EXISTS if the alias already exists. * FAILED_PRECONDITION if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to access a domain-scoped alias).

delete(string $courseId, string $alias, array $optParams = [])

Deletes an alias of a course. This method returns the following error codes:

  • PERMISSION_DENIED if the requesting user is not permitted to remove the alias or for access errors. NOT_FOUND if the alias does not exist. FAILED_PRECONDITION if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to delete a domain-scoped alias). (aliases.delete)

listCoursesAliases(string $courseId, array $optParams = [])

Returns a list of aliases for a course. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not permitted to access the course or for access errors. NOT_FOUND if the course does not exist. (aliases.listCoursesAliases)

Details

CourseAlias create(string $courseId, CourseAlias $postBody, array $optParams = [])

Creates an alias for a course. This method returns the following error codes:

  • PERMISSION_DENIED if the requesting user is not permitted to create the alias or for access errors. NOT_FOUND if the course does not exist. ALREADY_EXISTS if the alias already exists. * FAILED_PRECONDITION if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to access a domain-scoped alias).

(aliases.create)

Parameters

string $courseId

Identifier of the course to alias. This identifier can be either the Classroom-assigned identifier or an alias.

CourseAlias $postBody
array $optParams

Optional parameters.

Return Value

CourseAlias

Exceptions

Exception

ClassroomEmpty delete(string $courseId, string $alias, array $optParams = [])

Deletes an alias of a course. This method returns the following error codes:

  • PERMISSION_DENIED if the requesting user is not permitted to remove the alias or for access errors. NOT_FOUND if the alias does not exist. FAILED_PRECONDITION if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to delete a domain-scoped alias). (aliases.delete)

Parameters

string $courseId

Identifier of the course whose alias should be deleted. This identifier can be either the Classroom-assigned identifier or an alias.

string $alias

Alias to delete. This may not be the Classroom-assigned identifier.

array $optParams

Optional parameters.

Return Value

ClassroomEmpty

Exceptions

Exception

ListCourseAliasesResponse listCoursesAliases(string $courseId, array $optParams = [])

Returns a list of aliases for a course. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not permitted to access the course or for access errors. NOT_FOUND if the course does not exist. (aliases.listCoursesAliases)

Parameters

string $courseId

The identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

array $optParams

Optional parameters.

Return Value

ListCourseAliasesResponse

Exceptions

Exception