AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Gets a list of all of the context keys referenced in the input policies. The policies are supplied as a list of one or more strings. To get the context keys from policies associated with an IAM user, group, or role, use GetContextKeysForPrincipalPolicy.

Context keys are variables maintained by Amazon Web Services and its services that provide details about the context of an API query request. Context keys can be evaluated by testing against a value specified in an IAM policy. Use GetContextKeysForCustomPolicy to understand what key names and values you must supply when you call SimulateCustomPolicy. Note that all parameters are shown in unencoded form here for clarity but must be URL encoded to be included as a part of a real HTML request.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginGetContextKeysForCustomPolicy and EndGetContextKeysForCustomPolicy.

Namespace: Amazon.IdentityManagement
Assembly: AWSSDK.IdentityManagement.dll
Version: 3.x.y.z

Syntax

C#
public abstract Task<GetContextKeysForCustomPolicyResponse> GetContextKeysForCustomPolicyAsync(
         GetContextKeysForCustomPolicyRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.IdentityManagement.Model.GetContextKeysForCustomPolicyRequest

Container for the necessary parameters to execute the GetContextKeysForCustomPolicy service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the GetContextKeysForCustomPolicy service method, as returned by IdentityManagementService.

Exceptions

ExceptionCondition
InvalidInputException The request was rejected because an invalid or out-of-range value was supplied for an input parameter.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5

See Also