We recommend new projects start with resources from the AWS provider.
aws-native.location.getApiKey
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Definition of AWS::Location::APIKey Resource Type
Using getApiKey
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 getApiKey(args: GetApiKeyArgs, opts?: InvokeOptions): Promise<GetApiKeyResult>
function getApiKeyOutput(args: GetApiKeyOutputArgs, opts?: InvokeOptions): Output<GetApiKeyResult>
def get_api_key(key_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApiKeyResult
def get_api_key_output(key_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApiKeyResult]
func LookupApiKey(ctx *Context, args *LookupApiKeyArgs, opts ...InvokeOption) (*LookupApiKeyResult, error)
func LookupApiKeyOutput(ctx *Context, args *LookupApiKeyOutputArgs, opts ...InvokeOption) LookupApiKeyResultOutput
> Note: This function is named LookupApiKey
in the Go SDK.
public static class GetApiKey
{
public static Task<GetApiKeyResult> InvokeAsync(GetApiKeyArgs args, InvokeOptions? opts = null)
public static Output<GetApiKeyResult> Invoke(GetApiKeyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws-native:location:getApiKey
arguments:
# arguments dictionary
The following arguments are supported:
- Key
Name string A custom name for the API key resource.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
- Must be a unique API key name.
- No spaces allowed. For example,
ExampleAPIKey
.
- Key
Name string A custom name for the API key resource.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
- Must be a unique API key name.
- No spaces allowed. For example,
ExampleAPIKey
.
- key
Name String A custom name for the API key resource.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
- Must be a unique API key name.
- No spaces allowed. For example,
ExampleAPIKey
.
- key
Name string A custom name for the API key resource.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
- Must be a unique API key name.
- No spaces allowed. For example,
ExampleAPIKey
.
- key_
name str A custom name for the API key resource.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
- Must be a unique API key name.
- No spaces allowed. For example,
ExampleAPIKey
.
- key
Name String A custom name for the API key resource.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
- Must be a unique API key name.
- No spaces allowed. For example,
ExampleAPIKey
.
getApiKey Result
The following output properties are available:
- Arn string
- The Amazon Resource Name (ARN) for the resource. Used when you need to specify a resource across all AWS .
- Create
Time string - The timestamp for when the API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.
- Description string
- Updates the description for the API key resource.
- Expire
Time string - The optional timestamp for when the API key resource will expire in ISO 8601 format .
- Key
Arn string - The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all AWS .
- Restrictions
Pulumi.
Aws Native. Location. Outputs. Api Key Restrictions - The API key restrictions for the API key resource.
- List<Pulumi.
Aws Native. Outputs. Tag> - An array of key-value pairs to apply to this resource.
- Update
Time string - The timestamp for when the API key resource was last updated in ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ
.
- Arn string
- The Amazon Resource Name (ARN) for the resource. Used when you need to specify a resource across all AWS .
- Create
Time string - The timestamp for when the API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.
- Description string
- Updates the description for the API key resource.
- Expire
Time string - The optional timestamp for when the API key resource will expire in ISO 8601 format .
- Key
Arn string - The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all AWS .
- Restrictions
Api
Key Restrictions - The API key restrictions for the API key resource.
- Tag
- An array of key-value pairs to apply to this resource.
- Update
Time string - The timestamp for when the API key resource was last updated in ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ
.
- arn String
- The Amazon Resource Name (ARN) for the resource. Used when you need to specify a resource across all AWS .
- create
Time String - The timestamp for when the API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.
- description String
- Updates the description for the API key resource.
- expire
Time String - The optional timestamp for when the API key resource will expire in ISO 8601 format .
- key
Arn String - The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all AWS .
- restrictions
Api
Key Restrictions - The API key restrictions for the API key resource.
- List<Tag>
- An array of key-value pairs to apply to this resource.
- update
Time String - The timestamp for when the API key resource was last updated in ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ
.
- arn string
- The Amazon Resource Name (ARN) for the resource. Used when you need to specify a resource across all AWS .
- create
Time string - The timestamp for when the API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.
- description string
- Updates the description for the API key resource.
- expire
Time string - The optional timestamp for when the API key resource will expire in ISO 8601 format .
- key
Arn string - The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all AWS .
- restrictions
Api
Key Restrictions - The API key restrictions for the API key resource.
- Tag[]
- An array of key-value pairs to apply to this resource.
- update
Time string - The timestamp for when the API key resource was last updated in ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ
.
- arn str
- The Amazon Resource Name (ARN) for the resource. Used when you need to specify a resource across all AWS .
- create_
time str - The timestamp for when the API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.
- description str
- Updates the description for the API key resource.
- expire_
time str - The optional timestamp for when the API key resource will expire in ISO 8601 format .
- key_
arn str - The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all AWS .
- restrictions
Api
Key Restrictions - The API key restrictions for the API key resource.
- Sequence[root_Tag]
- An array of key-value pairs to apply to this resource.
- update_
time str - The timestamp for when the API key resource was last updated in ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ
.
- arn String
- The Amazon Resource Name (ARN) for the resource. Used when you need to specify a resource across all AWS .
- create
Time String - The timestamp for when the API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.
- description String
- Updates the description for the API key resource.
- expire
Time String - The optional timestamp for when the API key resource will expire in ISO 8601 format .
- key
Arn String - The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all AWS .
- restrictions Property Map
- The API key restrictions for the API key resource.
- List<Property Map>
- An array of key-value pairs to apply to this resource.
- update
Time String - The timestamp for when the API key resource was last updated in ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ
.
Supporting Types
ApiKeyRestrictions
- Allow
Actions List<string> A list of allowed actions that an API key resource grants permissions to perform. You must have at least one action for each type of resource. For example, if you have a place resource, you must include at least one place action.
The following are valid values for the actions.
Map actions
geo:GetMap*
- Allows all actions needed for map rendering.Place actions
geo:SearchPlaceIndexForText
- Allows geocoding.geo:SearchPlaceIndexForPosition
- Allows reverse geocoding.geo:SearchPlaceIndexForSuggestions
- Allows generating suggestions from text.geo:GetPlace
- Allows finding a place by place ID.Route actions
geo:CalculateRoute
- Allows point to point routing.geo:CalculateRouteMatrix
- Allows calculating a matrix of routes.
You must use these strings exactly. For example, to provide access to map rendering, the only valid action is
geo:GetMap*
as an input to the list.["geo:GetMap*"]
is valid but["geo:GetMapTile"]
is not. Similarly, you cannot use["geo:SearchPlaceIndexFor*"]
- you must list each of the Place actions separately.- Allow
Resources List<string> A list of allowed resource ARNs that a API key bearer can perform actions on.
- The ARN must be the correct ARN for a map, place, or route ARN. You may include wildcards in the resource-id to match multiple resources of the same type.
- The resources must be in the same
partition
,region
, andaccount-id
as the key that is being created. - Other than wildcards, you must include the full ARN, including the
arn
,partition
,service
,region
,account-id
andresource-id
delimited by colons (:). - No spaces allowed, even with wildcards. For example,
arn:aws:geo:region: *account-id* :map/ExampleMap*
.
For more information about ARN format, see Amazon Resource Names (ARNs) .
- Allow
Referers List<string> An optional list of allowed HTTP referers for which requests must originate from. Requests using this API key from other domains will not be allowed.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
$\-._+!*
(),;/?:@=&` - May contain a percent (%) if followed by 2 hexadecimal digits (A-F, a-f, 0-9); this is used for URL encoding purposes.
- May contain wildcard characters question mark (?) and asterisk (*).
Question mark (?) will replace any single character (including hexadecimal digits).
Asterisk (*) will replace any multiple characters (including multiple hexadecimal digits).
- No spaces allowed. For example,
https://example.com
.
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
- Allow
Actions []string A list of allowed actions that an API key resource grants permissions to perform. You must have at least one action for each type of resource. For example, if you have a place resource, you must include at least one place action.
The following are valid values for the actions.
Map actions
geo:GetMap*
- Allows all actions needed for map rendering.Place actions
geo:SearchPlaceIndexForText
- Allows geocoding.geo:SearchPlaceIndexForPosition
- Allows reverse geocoding.geo:SearchPlaceIndexForSuggestions
- Allows generating suggestions from text.geo:GetPlace
- Allows finding a place by place ID.Route actions
geo:CalculateRoute
- Allows point to point routing.geo:CalculateRouteMatrix
- Allows calculating a matrix of routes.
You must use these strings exactly. For example, to provide access to map rendering, the only valid action is
geo:GetMap*
as an input to the list.["geo:GetMap*"]
is valid but["geo:GetMapTile"]
is not. Similarly, you cannot use["geo:SearchPlaceIndexFor*"]
- you must list each of the Place actions separately.- Allow
Resources []string A list of allowed resource ARNs that a API key bearer can perform actions on.
- The ARN must be the correct ARN for a map, place, or route ARN. You may include wildcards in the resource-id to match multiple resources of the same type.
- The resources must be in the same
partition
,region
, andaccount-id
as the key that is being created. - Other than wildcards, you must include the full ARN, including the
arn
,partition
,service
,region
,account-id
andresource-id
delimited by colons (:). - No spaces allowed, even with wildcards. For example,
arn:aws:geo:region: *account-id* :map/ExampleMap*
.
For more information about ARN format, see Amazon Resource Names (ARNs) .
- Allow
Referers []string An optional list of allowed HTTP referers for which requests must originate from. Requests using this API key from other domains will not be allowed.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
$\-._+!*
(),;/?:@=&` - May contain a percent (%) if followed by 2 hexadecimal digits (A-F, a-f, 0-9); this is used for URL encoding purposes.
- May contain wildcard characters question mark (?) and asterisk (*).
Question mark (?) will replace any single character (including hexadecimal digits).
Asterisk (*) will replace any multiple characters (including multiple hexadecimal digits).
- No spaces allowed. For example,
https://example.com
.
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
- allow
Actions List<String> A list of allowed actions that an API key resource grants permissions to perform. You must have at least one action for each type of resource. For example, if you have a place resource, you must include at least one place action.
The following are valid values for the actions.
Map actions
geo:GetMap*
- Allows all actions needed for map rendering.Place actions
geo:SearchPlaceIndexForText
- Allows geocoding.geo:SearchPlaceIndexForPosition
- Allows reverse geocoding.geo:SearchPlaceIndexForSuggestions
- Allows generating suggestions from text.geo:GetPlace
- Allows finding a place by place ID.Route actions
geo:CalculateRoute
- Allows point to point routing.geo:CalculateRouteMatrix
- Allows calculating a matrix of routes.
You must use these strings exactly. For example, to provide access to map rendering, the only valid action is
geo:GetMap*
as an input to the list.["geo:GetMap*"]
is valid but["geo:GetMapTile"]
is not. Similarly, you cannot use["geo:SearchPlaceIndexFor*"]
- you must list each of the Place actions separately.- allow
Resources List<String> A list of allowed resource ARNs that a API key bearer can perform actions on.
- The ARN must be the correct ARN for a map, place, or route ARN. You may include wildcards in the resource-id to match multiple resources of the same type.
- The resources must be in the same
partition
,region
, andaccount-id
as the key that is being created. - Other than wildcards, you must include the full ARN, including the
arn
,partition
,service
,region
,account-id
andresource-id
delimited by colons (:). - No spaces allowed, even with wildcards. For example,
arn:aws:geo:region: *account-id* :map/ExampleMap*
.
For more information about ARN format, see Amazon Resource Names (ARNs) .
- allow
Referers List<String> An optional list of allowed HTTP referers for which requests must originate from. Requests using this API key from other domains will not be allowed.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
$\-._+!*
(),;/?:@=&` - May contain a percent (%) if followed by 2 hexadecimal digits (A-F, a-f, 0-9); this is used for URL encoding purposes.
- May contain wildcard characters question mark (?) and asterisk (*).
Question mark (?) will replace any single character (including hexadecimal digits).
Asterisk (*) will replace any multiple characters (including multiple hexadecimal digits).
- No spaces allowed. For example,
https://example.com
.
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
- allow
Actions string[] A list of allowed actions that an API key resource grants permissions to perform. You must have at least one action for each type of resource. For example, if you have a place resource, you must include at least one place action.
The following are valid values for the actions.
Map actions
geo:GetMap*
- Allows all actions needed for map rendering.Place actions
geo:SearchPlaceIndexForText
- Allows geocoding.geo:SearchPlaceIndexForPosition
- Allows reverse geocoding.geo:SearchPlaceIndexForSuggestions
- Allows generating suggestions from text.geo:GetPlace
- Allows finding a place by place ID.Route actions
geo:CalculateRoute
- Allows point to point routing.geo:CalculateRouteMatrix
- Allows calculating a matrix of routes.
You must use these strings exactly. For example, to provide access to map rendering, the only valid action is
geo:GetMap*
as an input to the list.["geo:GetMap*"]
is valid but["geo:GetMapTile"]
is not. Similarly, you cannot use["geo:SearchPlaceIndexFor*"]
- you must list each of the Place actions separately.- allow
Resources string[] A list of allowed resource ARNs that a API key bearer can perform actions on.
- The ARN must be the correct ARN for a map, place, or route ARN. You may include wildcards in the resource-id to match multiple resources of the same type.
- The resources must be in the same
partition
,region
, andaccount-id
as the key that is being created. - Other than wildcards, you must include the full ARN, including the
arn
,partition
,service
,region
,account-id
andresource-id
delimited by colons (:). - No spaces allowed, even with wildcards. For example,
arn:aws:geo:region: *account-id* :map/ExampleMap*
.
For more information about ARN format, see Amazon Resource Names (ARNs) .
- allow
Referers string[] An optional list of allowed HTTP referers for which requests must originate from. Requests using this API key from other domains will not be allowed.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
$\-._+!*
(),;/?:@=&` - May contain a percent (%) if followed by 2 hexadecimal digits (A-F, a-f, 0-9); this is used for URL encoding purposes.
- May contain wildcard characters question mark (?) and asterisk (*).
Question mark (?) will replace any single character (including hexadecimal digits).
Asterisk (*) will replace any multiple characters (including multiple hexadecimal digits).
- No spaces allowed. For example,
https://example.com
.
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
- allow_
actions Sequence[str] A list of allowed actions that an API key resource grants permissions to perform. You must have at least one action for each type of resource. For example, if you have a place resource, you must include at least one place action.
The following are valid values for the actions.
Map actions
geo:GetMap*
- Allows all actions needed for map rendering.Place actions
geo:SearchPlaceIndexForText
- Allows geocoding.geo:SearchPlaceIndexForPosition
- Allows reverse geocoding.geo:SearchPlaceIndexForSuggestions
- Allows generating suggestions from text.geo:GetPlace
- Allows finding a place by place ID.Route actions
geo:CalculateRoute
- Allows point to point routing.geo:CalculateRouteMatrix
- Allows calculating a matrix of routes.
You must use these strings exactly. For example, to provide access to map rendering, the only valid action is
geo:GetMap*
as an input to the list.["geo:GetMap*"]
is valid but["geo:GetMapTile"]
is not. Similarly, you cannot use["geo:SearchPlaceIndexFor*"]
- you must list each of the Place actions separately.- allow_
resources Sequence[str] A list of allowed resource ARNs that a API key bearer can perform actions on.
- The ARN must be the correct ARN for a map, place, or route ARN. You may include wildcards in the resource-id to match multiple resources of the same type.
- The resources must be in the same
partition
,region
, andaccount-id
as the key that is being created. - Other than wildcards, you must include the full ARN, including the
arn
,partition
,service
,region
,account-id
andresource-id
delimited by colons (:). - No spaces allowed, even with wildcards. For example,
arn:aws:geo:region: *account-id* :map/ExampleMap*
.
For more information about ARN format, see Amazon Resource Names (ARNs) .
- allow_
referers Sequence[str] An optional list of allowed HTTP referers for which requests must originate from. Requests using this API key from other domains will not be allowed.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
$\-._+!*
(),;/?:@=&` - May contain a percent (%) if followed by 2 hexadecimal digits (A-F, a-f, 0-9); this is used for URL encoding purposes.
- May contain wildcard characters question mark (?) and asterisk (*).
Question mark (?) will replace any single character (including hexadecimal digits).
Asterisk (*) will replace any multiple characters (including multiple hexadecimal digits).
- No spaces allowed. For example,
https://example.com
.
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
- allow
Actions List<String> A list of allowed actions that an API key resource grants permissions to perform. You must have at least one action for each type of resource. For example, if you have a place resource, you must include at least one place action.
The following are valid values for the actions.
Map actions
geo:GetMap*
- Allows all actions needed for map rendering.Place actions
geo:SearchPlaceIndexForText
- Allows geocoding.geo:SearchPlaceIndexForPosition
- Allows reverse geocoding.geo:SearchPlaceIndexForSuggestions
- Allows generating suggestions from text.geo:GetPlace
- Allows finding a place by place ID.Route actions
geo:CalculateRoute
- Allows point to point routing.geo:CalculateRouteMatrix
- Allows calculating a matrix of routes.
You must use these strings exactly. For example, to provide access to map rendering, the only valid action is
geo:GetMap*
as an input to the list.["geo:GetMap*"]
is valid but["geo:GetMapTile"]
is not. Similarly, you cannot use["geo:SearchPlaceIndexFor*"]
- you must list each of the Place actions separately.- allow
Resources List<String> A list of allowed resource ARNs that a API key bearer can perform actions on.
- The ARN must be the correct ARN for a map, place, or route ARN. You may include wildcards in the resource-id to match multiple resources of the same type.
- The resources must be in the same
partition
,region
, andaccount-id
as the key that is being created. - Other than wildcards, you must include the full ARN, including the
arn
,partition
,service
,region
,account-id
andresource-id
delimited by colons (:). - No spaces allowed, even with wildcards. For example,
arn:aws:geo:region: *account-id* :map/ExampleMap*
.
For more information about ARN format, see Amazon Resource Names (ARNs) .
- allow
Referers List<String> An optional list of allowed HTTP referers for which requests must originate from. Requests using this API key from other domains will not be allowed.
Requirements:
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
$\-._+!*
(),;/?:@=&` - May contain a percent (%) if followed by 2 hexadecimal digits (A-F, a-f, 0-9); this is used for URL encoding purposes.
- May contain wildcard characters question mark (?) and asterisk (*).
Question mark (?) will replace any single character (including hexadecimal digits).
Asterisk (*) will replace any multiple characters (including multiple hexadecimal digits).
- No spaces allowed. For example,
https://example.com
.
- Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list
Tag
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.