google-native.apikeys/v2.getKey
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
.
Using getKey
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getKey(args: GetKeyArgs, opts?: InvokeOptions): Promise<GetKeyResult>
function getKeyOutput(args: GetKeyOutputArgs, opts?: InvokeOptions): Output<GetKeyResult>
def get_key(key_id: Optional[str] = None,
location: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetKeyResult
def get_key_output(key_id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetKeyResult]
func LookupKey(ctx *Context, args *LookupKeyArgs, opts ...InvokeOption) (*LookupKeyResult, error)
func LookupKeyOutput(ctx *Context, args *LookupKeyOutputArgs, opts ...InvokeOption) LookupKeyResultOutput
> Note: This function is named LookupKey
in the Go SDK.
public static class GetKey
{
public static Task<GetKeyResult> InvokeAsync(GetKeyArgs args, InvokeOptions? opts = null)
public static Output<GetKeyResult> Invoke(GetKeyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKeyResult> getKey(GetKeyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: google-native:apikeys/v2:getKey
arguments:
# arguments dictionary
The following arguments are supported:
getKey Result
The following output properties are available:
- Annotations Dictionary<string, string>
Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
- Create
Time string A timestamp identifying the time this key was originally created.
- Delete
Time string A timestamp when this key was deleted. If the resource is not deleted, this must be empty.
- Display
Name string Human-readable display name of this key that you can modify. The maximum length is 63 characters.
- Etag string
A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. See https://google.aip.dev/154.
- Key
String string An encrypted and signed value held by this key. This field can be accessed only through the
GetKeyString
method.- Name string
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 isglobal
.- Restrictions
Pulumi.
Google Native. APIKeys. V2. Outputs. V2Restrictions Response Key restrictions.
- Uid string
Unique id in UUID4 format.
- Update
Time string A timestamp identifying the time this key was last updated.
- Annotations map[string]string
Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
- Create
Time string A timestamp identifying the time this key was originally created.
- Delete
Time string A timestamp when this key was deleted. If the resource is not deleted, this must be empty.
- Display
Name string Human-readable display name of this key that you can modify. The maximum length is 63 characters.
- Etag string
A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. See https://google.aip.dev/154.
- Key
String string An encrypted and signed value held by this key. This field can be accessed only through the
GetKeyString
method.- Name string
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 isglobal
.- Restrictions
V2Restrictions
Response Key restrictions.
- Uid string
Unique id in UUID4 format.
- Update
Time string A timestamp identifying the time this key was last updated.
- annotations Map<String,String>
Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
- create
Time String A timestamp identifying the time this key was originally created.
- delete
Time String A timestamp when this key was deleted. If the resource is not deleted, this must be empty.
- display
Name String Human-readable display name of this key that you can modify. The maximum length is 63 characters.
- etag String
A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. See https://google.aip.dev/154.
- key
String String An encrypted and signed value held by this key. This field can be accessed only through the
GetKeyString
method.- name String
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 isglobal
.- restrictions
V2Restrictions
Response Key restrictions.
- uid String
Unique id in UUID4 format.
- update
Time String A timestamp identifying the time this key was last updated.
- annotations {[key: string]: string}
Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
- create
Time string A timestamp identifying the time this key was originally created.
- delete
Time string A timestamp when this key was deleted. If the resource is not deleted, this must be empty.
- display
Name string Human-readable display name of this key that you can modify. The maximum length is 63 characters.
- etag string
A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. See https://google.aip.dev/154.
- key
String string An encrypted and signed value held by this key. This field can be accessed only through the
GetKeyString
method.- name string
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 isglobal
.- restrictions
V2Restrictions
Response Key restrictions.
- uid string
Unique id in UUID4 format.
- update
Time string A timestamp identifying the time this key was last updated.
- annotations Mapping[str, str]
Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
- create_
time str A timestamp identifying the time this key was originally created.
- delete_
time str A timestamp when this key was deleted. If the resource is not deleted, this must be empty.
- display_
name str Human-readable display name of this key that you can modify. The maximum length is 63 characters.
- etag str
A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. See https://google.aip.dev/154.
- key_
string str An encrypted and signed value held by this key. This field can be accessed only through the
GetKeyString
method.- name str
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 isglobal
.- restrictions
V2Restrictions
Response Key restrictions.
- uid str
Unique id in UUID4 format.
- update_
time str A timestamp identifying the time this key was last updated.
- annotations Map<String>
Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
- create
Time String A timestamp identifying the time this key was originally created.
- delete
Time String A timestamp when this key was deleted. If the resource is not deleted, this must be empty.
- display
Name String Human-readable display name of this key that you can modify. The maximum length is 63 characters.
- etag String
A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. See https://google.aip.dev/154.
- key
String String An encrypted and signed value held by this key. This field can be accessed only through the
GetKeyString
method.- name String
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 isglobal
.- restrictions Property Map
Key restrictions.
- uid String
Unique id in UUID4 format.
- update
Time String A timestamp identifying the time this key was last updated.
Supporting Types
V2AndroidApplicationResponse
- Package
Name string The package name of the application.
- Sha1Fingerprint string
The SHA1 fingerprint of the application. For example, both sha1 formats are acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or DA39A3EE5E6B4B0D3255BFEF95601890AFD80709. Output format is the latter.
- Package
Name string The package name of the application.
- Sha1Fingerprint string
The SHA1 fingerprint of the application. For example, both sha1 formats are acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or DA39A3EE5E6B4B0D3255BFEF95601890AFD80709. Output format is the latter.
- package
Name String The package name of the application.
- sha1Fingerprint String
The SHA1 fingerprint of the application. For example, both sha1 formats are acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or DA39A3EE5E6B4B0D3255BFEF95601890AFD80709. Output format is the latter.
- package
Name string The package name of the application.
- sha1Fingerprint string
The SHA1 fingerprint of the application. For example, both sha1 formats are acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or DA39A3EE5E6B4B0D3255BFEF95601890AFD80709. Output format is the latter.
- package_
name str The package name of the application.
- sha1_
fingerprint str The SHA1 fingerprint of the application. For example, both sha1 formats are acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or DA39A3EE5E6B4B0D3255BFEF95601890AFD80709. Output format is the latter.
- package
Name String The package name of the application.
- sha1Fingerprint String
The SHA1 fingerprint of the application. For example, both sha1 formats are acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or DA39A3EE5E6B4B0D3255BFEF95601890AFD80709. Output format is the latter.
V2AndroidKeyRestrictionsResponse
- Allowed
Applications List<Pulumi.Google Native. APIKeys. V2. Inputs. V2Android Application Response> A list of Android applications that are allowed to make API calls with this key.
- Allowed
Applications []V2AndroidApplication Response A list of Android applications that are allowed to make API calls with this key.
- allowed
Applications List<V2AndroidApplication Response> A list of Android applications that are allowed to make API calls with this key.
- allowed
Applications V2AndroidApplication Response[] A list of Android applications that are allowed to make API calls with this key.
- allowed_
applications Sequence[V2AndroidApplication Response] A list of Android applications that are allowed to make API calls with this key.
- allowed
Applications List<Property Map> A list of Android applications that are allowed to make API calls with this key.
V2ApiTargetResponse
- Methods List<string>
Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples:
google.cloud.translate.v2.TranslateService.GetSupportedLanguage
TranslateText
Get*
translate.googleapis.com.Get*
- Service string
The service for this restriction. It should be the canonical service name, for example:
translate.googleapis.com
. You can usegcloud services list
to get a list of services that are enabled in the project.
- Methods []string
Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples:
google.cloud.translate.v2.TranslateService.GetSupportedLanguage
TranslateText
Get*
translate.googleapis.com.Get*
- Service string
The service for this restriction. It should be the canonical service name, for example:
translate.googleapis.com
. You can usegcloud services list
to get a list of services that are enabled in the project.
- methods List<String>
Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples:
google.cloud.translate.v2.TranslateService.GetSupportedLanguage
TranslateText
Get*
translate.googleapis.com.Get*
- service String
The service for this restriction. It should be the canonical service name, for example:
translate.googleapis.com
. You can usegcloud services list
to get a list of services that are enabled in the project.
- methods string[]
Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples:
google.cloud.translate.v2.TranslateService.GetSupportedLanguage
TranslateText
Get*
translate.googleapis.com.Get*
- service string
The service for this restriction. It should be the canonical service name, for example:
translate.googleapis.com
. You can usegcloud services list
to get a list of services that are enabled in the project.
- methods Sequence[str]
Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples:
google.cloud.translate.v2.TranslateService.GetSupportedLanguage
TranslateText
Get*
translate.googleapis.com.Get*
- service str
The service for this restriction. It should be the canonical service name, for example:
translate.googleapis.com
. You can usegcloud services list
to get a list of services that are enabled in the project.
- methods List<String>
Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples:
google.cloud.translate.v2.TranslateService.GetSupportedLanguage
TranslateText
Get*
translate.googleapis.com.Get*
- service String
The service for this restriction. It should be the canonical service name, for example:
translate.googleapis.com
. You can usegcloud services list
to get a list of services that are enabled in the project.
V2BrowserKeyRestrictionsResponse
- Allowed
Referrers List<string> A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
- Allowed
Referrers []string A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
- allowed
Referrers List<String> A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
- allowed
Referrers string[] A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
- allowed_
referrers Sequence[str] A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
- allowed
Referrers List<String> A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
V2IosKeyRestrictionsResponse
- Allowed
Bundle List<string>Ids A list of bundle IDs that are allowed when making API calls with this key.
- Allowed
Bundle []stringIds A list of bundle IDs that are allowed when making API calls with this key.
- allowed
Bundle List<String>Ids A list of bundle IDs that are allowed when making API calls with this key.
- allowed
Bundle string[]Ids A list of bundle IDs that are allowed when making API calls with this key.
- allowed_
bundle_ Sequence[str]ids A list of bundle IDs that are allowed when making API calls with this key.
- allowed
Bundle List<String>Ids A list of bundle IDs that are allowed when making API calls with this key.
V2RestrictionsResponse
- Android
Key Pulumi.Restrictions Google Native. APIKeys. V2. Inputs. V2Android Key Restrictions Response The Android apps that are allowed to use the key.
- Api
Targets List<Pulumi.Google Native. APIKeys. V2. Inputs. V2Api Target Response> A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
- Browser
Key Pulumi.Restrictions Google Native. APIKeys. V2. Inputs. V2Browser Key Restrictions Response The HTTP referrers (websites) that are allowed to use the key.
- Ios
Key Pulumi.Restrictions Google Native. APIKeys. V2. Inputs. V2Ios Key Restrictions Response The iOS apps that are allowed to use the key.
- Server
Key Pulumi.Restrictions Google Native. APIKeys. V2. Inputs. V2Server Key Restrictions Response The IP addresses of callers that are allowed to use the key.
- Android
Key V2AndroidRestrictions Key Restrictions Response The Android apps that are allowed to use the key.
- Api
Targets []V2ApiTarget Response A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
- Browser
Key V2BrowserRestrictions Key Restrictions Response The HTTP referrers (websites) that are allowed to use the key.
- Ios
Key V2IosRestrictions Key Restrictions Response The iOS apps that are allowed to use the key.
- Server
Key V2ServerRestrictions Key Restrictions Response The IP addresses of callers that are allowed to use the key.
- android
Key V2AndroidRestrictions Key Restrictions Response The Android apps that are allowed to use the key.
- api
Targets List<V2ApiTarget Response> A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
- browser
Key V2BrowserRestrictions Key Restrictions Response The HTTP referrers (websites) that are allowed to use the key.
- ios
Key V2IosRestrictions Key Restrictions Response The iOS apps that are allowed to use the key.
- server
Key V2ServerRestrictions Key Restrictions Response The IP addresses of callers that are allowed to use the key.
- android
Key V2AndroidRestrictions Key Restrictions Response The Android apps that are allowed to use the key.
- api
Targets V2ApiTarget Response[] A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
- browser
Key V2BrowserRestrictions Key Restrictions Response The HTTP referrers (websites) that are allowed to use the key.
- ios
Key V2IosRestrictions Key Restrictions Response The iOS apps that are allowed to use the key.
- server
Key V2ServerRestrictions Key Restrictions Response The IP addresses of callers that are allowed to use the key.
- android_
key_ V2Androidrestrictions Key Restrictions Response The Android apps that are allowed to use the key.
- api_
targets Sequence[V2ApiTarget Response] A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
- browser_
key_ V2Browserrestrictions Key Restrictions Response The HTTP referrers (websites) that are allowed to use the key.
- ios_
key_ V2Iosrestrictions Key Restrictions Response The iOS apps that are allowed to use the key.
- server_
key_ V2Serverrestrictions Key Restrictions Response The IP addresses of callers that are allowed to use the key.
- android
Key Property MapRestrictions The Android apps that are allowed to use the key.
- api
Targets List<Property Map> A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
- browser
Key Property MapRestrictions The HTTP referrers (websites) that are allowed to use the key.
- ios
Key Property MapRestrictions The iOS apps that are allowed to use the key.
- server
Key Property MapRestrictions The IP addresses of callers that are allowed to use the key.
V2ServerKeyRestrictionsResponse
- Allowed
Ips List<string> A list of the caller IP addresses that are allowed to make API calls with this key.
- Allowed
Ips []string A list of the caller IP addresses that are allowed to make API calls with this key.
- allowed
Ips List<String> A list of the caller IP addresses that are allowed to make API calls with this key.
- allowed
Ips string[] A list of the caller IP addresses that are allowed to make API calls with this key.
- allowed_
ips Sequence[str] A list of the caller IP addresses that are allowed to make API calls with this key.
- allowed
Ips List<String> A list of the caller IP addresses that are allowed to make API calls with this key.
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0