Class ProjectsResource.LocationsResource.KeysResource
The "keys" collection of methods.
Inherited Members
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. The key string of the API key is included in the response and can afterward
only be retrieved through the GetKeyString method. 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. The parent field must be in format of "projects//locations/global". |
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. The key string of the API key isn't included in the response and can only
be retrieved through the GetKeyString method. 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. The parent field must be in format of "projects//locations/global". |
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 and can only be retrieved through the GetKeyString method. 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 | Identifier. The resource name of the key. The |
Returns
| Type | Description |
|---|---|
| ProjectsResource.LocationsResource.KeysResource.PatchRequest |
Undelete(V2UndeleteKeyRequest, string)
Undeletes an API key which was deleted within 30 days. The key string of the API key isn't included
in the response and can only be retrieved through the GetKeyString method. 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 |