class Service extends AbstractService implements IdentityService

Represents the Keystone v3 service.

Traits

Methods

factory (ClientInterface $client) static 

No description

authenticate (array $options) : array

Authenticates and retrieves back a token and catalog.

generateToken (array $options) : Token

Generates a new authentication token

getToken (string $id) : Token

Retrieves a token object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

validateToken (string $id) : bool

Validates a token, identified by its ID, and returns TRUE if its valid, FALSE if not.

revokeToken (string $id)

Revokes a token, identified by its ID. After this operation completes, users will not be able to use this token again for authentication.

createService (array $options) : Service

Creates a new service according to the provided options.

listServices (array $options = array()) : Generator

Returns a generator which will yield a collection of service objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

getService (string $id) : Service

Retrieves a service object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

createEndpoint (array $options) : Endpoint

Creates a new endpoint according to the provided options.

getEndpoint (string $id) : Endpoint

Retrieves an endpoint object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

listEndpoints (array $options = array()) : Generator

Returns a generator which will yield a collection of endpoint objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

createDomain (array $options) : Domain

Creates a new domain according to the provided options.

listDomains (array $options = array()) : Generator

Returns a generator which will yield a collection of domain objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

getDomain (string $id) : Domain

Retrieves a domain object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

createProject (array $options) : Project

Creates a new project according to the provided options.

listProjects (array $options = array()) : Generator

Returns a generator which will yield a collection of project objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

getProject (string $id) : Project

Retrieves a project object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

createUser (array $options) : User

Creates a new user according to the provided options.

listUsers (array $options = array()) : Generator

Returns a generator which will yield a collection of user objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

getUser (string $id) : User

Retrieves a user object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

createGroup (array $options) : Group

Creates a new group according to the provided options.

listGroups (array $options = array()) : Generator

Returns a generator which will yield a collection of group objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

getGroup (string $id) : Group

Retrieves a group object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

createCredential (array $options) : Credential

Creates a new credential according to the provided options.

Returns a generator which will yield a collection of credential objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

getCredential (string $id) : Credential

Retrieves a credential object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

createRole (array $options) : Role

Creates a new role according to the provided options.

listRoles (array $options = array()) : Generator

Returns a generator which will yield a collection of role objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

listRoleAssignments (array $options = array()) : Generator

Returns a generator which will yield a collection of role assignment objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

createPolicy (array $options) : Policy

Creates a new policy according to the provided options.

listPolicies (array $options = array()) : Generator

Returns a generator which will yield a collection of policy objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

getPolicy (string $id) : Policy

Retrieves a policy object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

Details

static factory(ClientInterface $client)

Parameters

$client ClientInterface

Example code

$service->factory($client);

authenticate(array $options)

Authenticates and retrieves back a token and catalog.

Parameters

$options array {see \OpenStack\Identity\v3\Api::postTokens}

Return value

array Returns a {see Models\Token} as the first element, a string base URL as the second

Example code

$array = $service->authenticate($options);

generateToken(array $options)

Generates a new authentication token

Parameters

$options array {see \OpenStack\Identity\v3\Api::postTokens}

Return value

Token

Example code

$token = $service->generateToken($options);

getToken(string $id)

Retrieves a token object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

Parameters

$id string The unique ID of the token to retrieve

Return value

Token

Example code

$token = $service->getToken($id);

validateToken(string $id)

Validates a token, identified by its ID, and returns TRUE if its valid, FALSE if not.

Parameters

$id string The unique ID of the token

Return value

bool

Example code

$bool = $service->validateToken($id);

revokeToken(string $id)

Revokes a token, identified by its ID. After this operation completes, users will not be able to use this token again for authentication.

Parameters

$id string The unique ID of the token

Example code

$service->revokeToken($id);

createService(array $options)

Creates a new service according to the provided options.

Parameters

$options array {see \OpenStack\Identity\v3\Api::postServices}

Return value

Service

Example code

$service = $service->createService($options);

listServices(array $options = array())

Returns a generator which will yield a collection of service objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

Parameters

$options array {see \OpenStack\Identity\v3\Api::getServices}

Return value

Generator

Example code

$generator = $service->listServices($options);

getService(string $id)

Retrieves a service object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

Parameters

$id string The unique ID of the service

Return value

Service

Example code

$service = $service->getService($id);

createEndpoint(array $options)

Creates a new endpoint according to the provided options.

Parameters

$options array {see \OpenStack\Identity\v3\Api::postEndpoints}

Return value

Endpoint

Example code

$endpoint = $service->createEndpoint($options);

getEndpoint(string $id)

Retrieves an endpoint object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

Parameters

$id string The unique ID of the service

Return value

Endpoint

Example code

$endpoint = $service->getEndpoint($id);

listEndpoints(array $options = array())

Returns a generator which will yield a collection of endpoint objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

Parameters

$options array {see \OpenStack\Identity\v3\Api::getEndpoints}

Return value

Generator

Example code

$generator = $service->listEndpoints($options);

createDomain(array $options)

Creates a new domain according to the provided options.

Parameters

$options array {see \OpenStack\Identity\v3\Api::postDomains}

Return value

Domain

Example code

$domain = $service->createDomain($options);

listDomains(array $options = array())

Returns a generator which will yield a collection of domain objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

Parameters

$options array {see \OpenStack\Identity\v3\Api::getDomains}

Return value

Generator

Example code

$generator = $service->listDomains($options);

getDomain(string $id)

Retrieves a domain object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

Parameters

$id string The unique ID of the domain

Return value

Domain

Example code

$domain = $service->getDomain($id);

createProject(array $options)

Creates a new project according to the provided options.

Parameters

$options array {see \OpenStack\Identity\v3\Api::postProjects}

Return value

Project

Example code

$project = $service->createProject($options);

listProjects(array $options = array())

Returns a generator which will yield a collection of project objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

Parameters

$options array {see \OpenStack\Identity\v3\Api::getProjects}

Return value

Generator

Example code

$generator = $service->listProjects($options);

getProject(string $id)

Retrieves a project object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

Parameters

$id string The unique ID of the project

Return value

Project

Example code

$project = $service->getProject($id);

createUser(array $options)

Creates a new user according to the provided options.

Parameters

$options array {see \OpenStack\Identity\v3\Api::postUsers}

Return value

User

Example code

$user = $service->createUser($options);

listUsers(array $options = array())

Returns a generator which will yield a collection of user objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

Parameters

$options array {see \OpenStack\Identity\v3\Api::getUsers}

Return value

Generator

Example code

$generator = $service->listUsers($options);

getUser(string $id)

Retrieves a user object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

Parameters

$id string The unique ID of the user

Return value

User

Example code

$user = $service->getUser($id);

createGroup(array $options)

Creates a new group according to the provided options.

Parameters

$options array {see \OpenStack\Identity\v3\Api::postGroups}

Return value

Group

Example code

$group = $service->createGroup($options);

listGroups(array $options = array())

Returns a generator which will yield a collection of group objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

Parameters

$options array {see \OpenStack\Identity\v3\Api::getGroups}

Return value

Generator

Example code

$generator = $service->listGroups($options);

getGroup(string $id)

Retrieves a group object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

Parameters

$id string The unique ID of the group

Return value

Group

Example code

$group = $service->getGroup($id);

createCredential(array $options)

Creates a new credential according to the provided options.

Parameters

$options array {see \OpenStack\Identity\v3\Api::postCredentials}

Return value

Credential

Example code

$credential = $service->createCredential($options);

listCredentials()

Returns a generator which will yield a collection of credential objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

Return value

Generator

Example code

$generator = $service->listCredentials();

getCredential(string $id)

Retrieves a credential object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

Parameters

$id string The unique ID of the credential

Return value

Credential

Example code

$credential = $service->getCredential($id);

createRole(array $options)

Creates a new role according to the provided options.

Parameters

$options array {see \OpenStack\Identity\v3\Api::postRoles}

Return value

Role

Example code

$role = $service->createRole($options);

listRoles(array $options = array())

Returns a generator which will yield a collection of role objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

Parameters

$options array {see \OpenStack\Identity\v3\Api::getRoles}

Return value

Generator

Example code

$generator = $service->listRoles($options);

listRoleAssignments(array $options = array())

Returns a generator which will yield a collection of role assignment objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

Parameters

$options array {see \OpenStack\Identity\v3\Api::getRoleAssignments}

Return value

Generator

Example code

$generator = $service->listRoleAssignments($options);

createPolicy(array $options)

Creates a new policy according to the provided options.

Parameters

$options array {see \OpenStack\Identity\v3\Api::postPolicies}

Return value

Policy

Example code

$policy = $service->createPolicy($options);

listPolicies(array $options = array())

Returns a generator which will yield a collection of policy objects. The elements which generators yield can be accessed using a foreach loop. Often the API will not return the full state of the resource in collections; you will need to use retrieve() to pull in the full state of the remote resource from the API.

Parameters

$options array {see \OpenStack\Identity\v3\Api::getPolicies}

Return value

Generator

Example code

$generator = $service->listPolicies($options);

getPolicy(string $id)

Retrieves a policy object and populates its unique identifier object. This operation will not perform a GET or HEAD request by default; you will need to call retrieve() if you want to pull in remote state from the API.

Parameters

$id string The unique ID of the policy

Return value

Policy

Example code

$policy = $service->getPolicy($id);