Exemplo n.º 1
0
        internal SetStackPolicyResponse SetStackPolicy(SetStackPolicyRequest request)
        {
            var marshaller   = new SetStackPolicyRequestMarshaller();
            var unmarshaller = SetStackPolicyResponseUnmarshaller.Instance;

            return(Invoke <SetStackPolicyRequest, SetStackPolicyResponse>(request, marshaller, unmarshaller));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initiates the asynchronous execution of the SetStackPolicy operation.
        /// <seealso cref="Amazon.CloudFormation.IAmazonCloudFormation.SetStackPolicy"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the SetStackPolicy 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 <SetStackPolicyResponse> SetStackPolicyAsync(SetStackPolicyRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new SetStackPolicyRequestMarshaller();
            var unmarshaller = SetStackPolicyResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, SetStackPolicyRequest, SetStackPolicyResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initiates the asynchronous execution of the SetStackPolicy operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the SetStackPolicy 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 <SetStackPolicyResponse> SetStackPolicyAsync(SetStackPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new SetStackPolicyRequestMarshaller();
            var unmarshaller = SetStackPolicyResponseUnmarshaller.Instance;

            return(InvokeAsync <SetStackPolicyRequest, SetStackPolicyResponse>(request, marshaller,
                                                                               unmarshaller, cancellationToken));
        }
Exemplo n.º 4
0
        /// <summary>
        /// <para>Sets a stack policy for a specified stack.</para>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the SetStackPolicy service method on
        /// AmazonCloudFormation.</param>
        public SetStackPolicyResponse SetStackPolicy(SetStackPolicyRequest request)
        {
            var task = SetStackPolicyAsync(request);

            try
            {
                return(task.Result);
            }
            catch (AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return(null);
            }
        }
Exemplo n.º 5
0
 public async Task <SetStackPolicyResponse> SetStackPolicyAsync(string stackName, string stackId, SetStackPolicyRequest request)
 {
     AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
     return(await SetStackPolicyWithOptionsAsync(stackName, stackId, request, runtime));
 }
Exemplo n.º 6
0
 public SetStackPolicyResponse SetStackPolicy(string stackName, string stackId, SetStackPolicyRequest request)
 {
     AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
     return(SetStackPolicyWithOptions(stackName, stackId, request, runtime));
 }
Exemplo n.º 7
0
 public async Task <SetStackPolicyResponse> SetStackPolicyWithOptionsAsync(string stackName, string stackId, SetStackPolicyRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
 {
     AlibabaCloud.TeaUtil.Common.ValidateModel(request);
     return(TeaModel.ToObject <SetStackPolicyResponse>(await DoRequestAsync("2015-09-01", "HTTPS", "POST", "AK", "/stacks/" + stackName + "/" + stackId + "/policy", null, request.Headers, null, runtime)));
 }