Container for the parameters to the GetContextKeysForCustomPolicy operation. 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 AWS and its services that provide details about the context of an API query request, and 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.

Inheritance: AmazonIdentityManagementServiceRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.IdentityManagement.Model.GetContextKeysForCustomPolicyRequest();

            if (cmdletContext.PolicyInputList != null)
            {
                request.PolicyInputList = cmdletContext.PolicyInputList;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetContextKeysForCustomPolicy operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetContextKeysForCustomPolicy operation on AmazonIdentityManagementServiceClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetContextKeysForCustomPolicy
        ///         operation.</returns>
        public IAsyncResult BeginGetContextKeysForCustomPolicy(GetContextKeysForCustomPolicyRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new GetContextKeysForCustomPolicyRequestMarshaller();
            var unmarshaller = GetContextKeysForCustomPolicyResponseUnmarshaller.Instance;

            return BeginInvoke<GetContextKeysForCustomPolicyRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        /// <summary>
        /// Gets a list of all of the context keys referenced in <code>Condition</code> elements
        /// 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 <a>GetContextKeysForPrincipalPolicy</a>.
        /// 
        ///  
        /// <para>
        /// Context keys are variables maintained by AWS and its services that provide details
        /// about the context of an API query request, and can be evaluated by using the <code>Condition</code>
        /// element of an IAM policy. Use GetContextKeysForCustomPolicy to understand what key
        /// names and values you must supply when you call <a>SimulateCustomPolicy</a>. 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.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetContextKeysForCustomPolicy service method.</param>
        /// 
        /// <returns>The response from the GetContextKeysForCustomPolicy service method, as returned by IdentityManagementService.</returns>
        /// <exception cref="Amazon.IdentityManagement.Model.InvalidInputException">
        /// The request was rejected because an invalid or out-of-range value was supplied for
        /// an input parameter.
        /// </exception>
        public GetContextKeysForCustomPolicyResponse GetContextKeysForCustomPolicy(GetContextKeysForCustomPolicyRequest request)
        {
            var marshaller = new GetContextKeysForCustomPolicyRequestMarshaller();
            var unmarshaller = GetContextKeysForCustomPolicyResponseUnmarshaller.Instance;

            return Invoke<GetContextKeysForCustomPolicyRequest,GetContextKeysForCustomPolicyResponse>(request, marshaller, unmarshaller);
        }
 /// <summary>
 /// Gets a list of all of the context keys referenced in <code>Condition</code> elements
 /// 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 <a>GetContextKeysForPrincipalPolicy</a>.
 /// 
 ///  
 /// <para>
 /// Context keys are variables maintained by AWS and its services that provide details
 /// about the context of an API query request, and can be evaluated by using the <code>Condition</code>
 /// element of an IAM policy. Use GetContextKeysForCustomPolicy to understand what key
 /// names and values you must supply when you call <a>SimulateCustomPolicy</a>. 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.
 /// </para>
 /// </summary>
 /// <param name="policyInputList">A list of policies for which you want list of context keys used in <code>Condition</code> elements. Each document is specified as a string containing the complete, valid JSON text of an IAM policy.</param>
 /// 
 /// <returns>The response from the GetContextKeysForCustomPolicy service method, as returned by IdentityManagementService.</returns>
 /// <exception cref="Amazon.IdentityManagement.Model.InvalidInputException">
 /// The request was rejected because an invalid or out-of-range value was supplied for
 /// an input parameter.
 /// </exception>
 public GetContextKeysForCustomPolicyResponse GetContextKeysForCustomPolicy(List<string> policyInputList)
 {
     var request = new GetContextKeysForCustomPolicyRequest();
     request.PolicyInputList = policyInputList;
     return GetContextKeysForCustomPolicy(request);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the GetContextKeysForCustomPolicy operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetContextKeysForCustomPolicy operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<GetContextKeysForCustomPolicyResponse> GetContextKeysForCustomPolicyAsync(GetContextKeysForCustomPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetContextKeysForCustomPolicyRequestMarshaller();
            var unmarshaller = GetContextKeysForCustomPolicyResponseUnmarshaller.Instance;

            return InvokeAsync<GetContextKeysForCustomPolicyRequest,GetContextKeysForCustomPolicyResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 /// <summary>
 /// Gets a list of all of the context keys referenced in <code>Condition</code> elements
 /// 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 <a>GetContextKeysForPrincipalPolicy</a>.
 /// 
 ///  
 /// <para>
 /// Context keys are variables maintained by AWS and its services that provide details
 /// about the context of an API query request, and can be evaluated by using the <code>Condition</code>
 /// element of an IAM policy. Use GetContextKeysForCustomPolicy to understand what key
 /// names and values you must supply when you call <a>SimulateCustomPolicy</a>. 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.
 /// </para>
 /// </summary>
 /// <param name="policyInputList">A list of policies for which you want list of context keys used in <code>Condition</code> elements. Each document is specified as a string containing the complete, valid JSON text of an IAM policy.</param>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the GetContextKeysForCustomPolicy service method, as returned by IdentityManagementService.</returns>
 /// <exception cref="Amazon.IdentityManagement.Model.InvalidInputException">
 /// The request was rejected because an invalid or out-of-range value was supplied for
 /// an input parameter.
 /// </exception>
 public Task<GetContextKeysForCustomPolicyResponse> GetContextKeysForCustomPolicyAsync(List<string> policyInputList, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new GetContextKeysForCustomPolicyRequest();
     request.PolicyInputList = policyInputList;
     return GetContextKeysForCustomPolicyAsync(request, cancellationToken);
 }
 private Amazon.IdentityManagement.Model.GetContextKeysForCustomPolicyResponse CallAWSServiceOperation(IAmazonIdentityManagementService client, Amazon.IdentityManagement.Model.GetContextKeysForCustomPolicyRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Identity and Access Management", "GetContextKeysForCustomPolicy");
     try
     {
         #if DESKTOP
         return(client.GetContextKeysForCustomPolicy(request));
         #elif CORECLR
         return(client.GetContextKeysForCustomPolicyAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
 /// <summary>
 /// Initiates the asynchronous execution of the GetContextKeysForCustomPolicy operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the GetContextKeysForCustomPolicy operation on AmazonIdentityManagementServiceClient.</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 public void GetContextKeysForCustomPolicyAsync(GetContextKeysForCustomPolicyRequest request, AmazonServiceCallback<GetContextKeysForCustomPolicyRequest, GetContextKeysForCustomPolicyResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new GetContextKeysForCustomPolicyRequestMarshaller();
     var unmarshaller = GetContextKeysForCustomPolicyResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<GetContextKeysForCustomPolicyRequest,GetContextKeysForCustomPolicyResponse> responseObject 
                     = new AmazonServiceResult<GetContextKeysForCustomPolicyRequest,GetContextKeysForCustomPolicyResponse>((GetContextKeysForCustomPolicyRequest)req, (GetContextKeysForCustomPolicyResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<GetContextKeysForCustomPolicyRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
 /// <summary>
 /// 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 <a>GetContextKeysForPrincipalPolicy</a>.
 /// 
 ///  
 /// <para>
 /// Context keys are variables maintained by AWS and its services that provide details
 /// about the context of an API query request, and 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 <a>SimulateCustomPolicy</a>.
 /// 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.
 /// </para>
 /// </summary>
 /// <param name="policyInputList">A list of policies for which you want the list of context keys referenced in those policies. Each document is specified as a string containing the complete, valid JSON text of an IAM policy. This parameter allows (per its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of any printable ASCII character ranging from the space character (\u0020) through end of the ASCII character range (\u00FF). It also includes the special characters tab (\u0009), line feed (\u000A), and carriage return (\u000D).</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">
 ///     A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///     procedure using the AsyncState property.
 /// </param>
 /// 
 /// <returns>The response from the GetContextKeysForCustomPolicy service method, as returned by IdentityManagementService.</returns>
 /// <exception cref="Amazon.IdentityManagement.Model.InvalidInputException">
 /// The request was rejected because an invalid or out-of-range value was supplied for
 /// an input parameter.
 /// </exception>
 public void GetContextKeysForCustomPolicyAsync(List<string> policyInputList,  AmazonServiceCallback<GetContextKeysForCustomPolicyRequest, GetContextKeysForCustomPolicyResponse> callback, AsyncOptions options = null)
 {
     var request = new GetContextKeysForCustomPolicyRequest();
     request.PolicyInputList = policyInputList;
     GetContextKeysForCustomPolicyAsync(request, callback, options);
 }