public void JsonPostTypeTest()
        {
            var request = new DoActionsRequest();

            request.StackName   = "test";
            request.StackId     = "test";
            request.ContentType = FormatType.JSON;
            request.BodyParameters.Add("test", "test");

            var exception = Assert.Throws <ClientException>(() => { client.GetAcsResponse(request); });

            Assert.NotNull(exception);
        }
        public void FormPostTypeTest()
        {
            var request = new DoActionsRequest();

            request.StackName   = "test";
            request.StackId     = "test";
            request.ContentType = FormatType.FORM;
            request.BodyParameters.Add("test", "test");

            var exception = Assert.Throws <ClientException>(() => { client.GetAcsResponse(request); });

            Assert.Equal("HTTPBadRequest", exception.ErrorCode);
            Assert.Equal("No action specified", exception.ErrorMessage);
        }
Esempio n. 3
0
 public async Task <DoActionsResponse> DoActionsAsync(string stackName, string stackId, DoActionsRequest request)
 {
     AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
     return(await DoActionsWithOptionsAsync(stackName, stackId, request, runtime));
 }
Esempio n. 4
0
 public DoActionsResponse DoActions(string stackName, string stackId, DoActionsRequest request)
 {
     AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
     return(DoActionsWithOptions(stackName, stackId, request, runtime));
 }
Esempio n. 5
0
 public async Task <DoActionsResponse> DoActionsWithOptionsAsync(string stackName, string stackId, DoActionsRequest request, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
 {
     AlibabaCloud.TeaUtil.Common.ValidateModel(request);
     return(TeaModel.ToObject <DoActionsResponse>(await DoRequestAsync("2015-09-01", "HTTPS", "POST", "AK", "/stacks/" + stackName + "/" + stackId + "/actions", null, request.Headers, null, runtime)));
 }