public void ListEntitiesForPolicyMarshallTest() { var operation = service_model.FindOperation("ListEntitiesForPolicy"); var request = InstantiateClassGenerator.Execute<ListEntitiesForPolicyRequest>(); var marshaller = new ListEntitiesForPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = ListEntitiesForPolicyResponseUnmarshaller.Instance.Unmarshall(context) as ListEntitiesForPolicyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the ListEntitiesForPolicy operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListEntitiesForPolicy 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 EndListEntitiesForPolicy /// operation.</returns> public IAsyncResult BeginListEntitiesForPolicy(ListEntitiesForPolicyRequest request, AsyncCallback callback, object state) { var marshaller = new ListEntitiesForPolicyRequestMarshaller(); var unmarshaller = ListEntitiesForPolicyResponseUnmarshaller.Instance; return BeginInvoke<ListEntitiesForPolicyRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the ListEntitiesForPolicy operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListEntitiesForPolicy 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<ListEntitiesForPolicyResponse> ListEntitiesForPolicyAsync(ListEntitiesForPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListEntitiesForPolicyRequestMarshaller(); var unmarshaller = ListEntitiesForPolicyResponseUnmarshaller.Instance; return InvokeAsync<ListEntitiesForPolicyRequest,ListEntitiesForPolicyResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Lists all users, groups, and roles that the specified managed policy is attached to. /// /// /// /// <para> /// You can use the optional <code>EntityFilter</code> parameter to limit the results /// to a particular type of entity (users, groups, or roles). For example, to list only /// the roles that are attached to the specified policy, set <code>EntityFilter</code> /// to <code>Role</code>. /// </para> /// /// <para> /// You can paginate the results using the <code>MaxItems</code> and <code>Marker</code> /// parameters. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListEntitiesForPolicy service method.</param> /// /// <returns>The response from the ListEntitiesForPolicy 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> /// <exception cref="Amazon.IdentityManagement.Model.NoSuchEntityException"> /// The request was rejected because it referenced an entity that does not exist. The /// error message describes the entity. /// </exception> /// <exception cref="Amazon.IdentityManagement.Model.ServiceFailureException"> /// The request processing has failed because of an unknown error, exception or failure. /// </exception> public ListEntitiesForPolicyResponse ListEntitiesForPolicy(ListEntitiesForPolicyRequest request) { var marshaller = new ListEntitiesForPolicyRequestMarshaller(); var unmarshaller = ListEntitiesForPolicyResponseUnmarshaller.Instance; return Invoke<ListEntitiesForPolicyRequest,ListEntitiesForPolicyResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the ListEntitiesForPolicy operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListEntitiesForPolicy 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 ListEntitiesForPolicyAsync(ListEntitiesForPolicyRequest request, AmazonServiceCallback<ListEntitiesForPolicyRequest, ListEntitiesForPolicyResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new ListEntitiesForPolicyRequestMarshaller(); var unmarshaller = ListEntitiesForPolicyResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<ListEntitiesForPolicyRequest,ListEntitiesForPolicyResponse> responseObject = new AmazonServiceResult<ListEntitiesForPolicyRequest,ListEntitiesForPolicyResponse>((ListEntitiesForPolicyRequest)req, (ListEntitiesForPolicyResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<ListEntitiesForPolicyRequest>(request, marshaller, unmarshaller, options, callbackHelper); }