Show / Hide Table of Contents

Class ProjectsResource.LocationsResource.KeysResource

The "keys" collection of methods.

Inheritance
object
ProjectsResource.LocationsResource.KeysResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.ApiKeysService.v2
Assembly: Google.Apis.ApiKeysService.v2.dll
Syntax
public class ProjectsResource.LocationsResource.KeysResource

Constructors

KeysResource(IClientService)

Constructs a new resource.

Declaration
public KeysResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Create(V2Key, string)

Creates a new API key. NOTE: Key is a global resource; hence the only supported value for location is global.

Declaration
public virtual ProjectsResource.LocationsResource.KeysResource.CreateRequest Create(V2Key body, string parent)
Parameters
Type Name Description
V2Key body

The body of the request.

string parent

Required. The project in which the API key is created.

Returns
Type Description
ProjectsResource.LocationsResource.KeysResource.CreateRequest

Delete(string)

Deletes an API key. Deleted key can be retrieved within 30 days of deletion. Afterward, key will be purged from the project. NOTE: Key is a global resource; hence the only supported value for location is global.

Declaration
public virtual ProjectsResource.LocationsResource.KeysResource.DeleteRequest Delete(string name)
Parameters
Type Name Description
string name

Required. The resource name of the API key to be deleted.

Returns
Type Description
ProjectsResource.LocationsResource.KeysResource.DeleteRequest

Get(string)

Gets the metadata for an API key. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is global.

Declaration
public virtual ProjectsResource.LocationsResource.KeysResource.GetRequest Get(string name)
Parameters
Type Name Description
string name

Required. The resource name of the API key to get.

Returns
Type Description
ProjectsResource.LocationsResource.KeysResource.GetRequest

GetKeyString(string)

Get the key string for an API key. NOTE: Key is a global resource; hence the only supported value for location is global.

Declaration
public virtual ProjectsResource.LocationsResource.KeysResource.GetKeyStringRequest GetKeyString(string name)
Parameters
Type Name Description
string name

Required. The resource name of the API key to be retrieved.

Returns
Type Description
ProjectsResource.LocationsResource.KeysResource.GetKeyStringRequest

List(string)

Lists the API keys owned by a project. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is global.

Declaration
public virtual ProjectsResource.LocationsResource.KeysResource.ListRequest List(string parent)
Parameters
Type Name Description
string parent

Required. Lists all API keys associated with this project.

Returns
Type Description
ProjectsResource.LocationsResource.KeysResource.ListRequest

Patch(V2Key, string)

Patches the modifiable fields of an API key. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is global.

Declaration
public virtual ProjectsResource.LocationsResource.KeysResource.PatchRequest Patch(V2Key body, string name)
Parameters
Type Name Description
V2Key body

The body of the request.

string name

Output only. The resource name of the key. The name has the form: projects//locations/global/keys/. For example: projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2 NOTE: Key is a global resource; hence the only supported value for location is global.

Returns
Type Description
ProjectsResource.LocationsResource.KeysResource.PatchRequest

Undelete(V2UndeleteKeyRequest, string)

Undeletes an API key which was deleted within 30 days. NOTE: Key is a global resource; hence the only supported value for location is global.

Declaration
public virtual ProjectsResource.LocationsResource.KeysResource.UndeleteRequest Undelete(V2UndeleteKeyRequest body, string name)
Parameters
Type Name Description
V2UndeleteKeyRequest body

The body of the request.

string name

Required. The resource name of the API key to be undeleted.

Returns
Type Description
ProjectsResource.LocationsResource.KeysResource.UndeleteRequest
In this article
Back to top Generated by DocFX