Constants used for properties of type ProvisioningArtifactType.
Inheritance: ConstantClass
Esempio n. 1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ServiceCatalog.Model.CreateProvisioningArtifactRequest();

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

            // populate Parameters
            var requestParametersIsNull = true;

            request.Parameters = new Amazon.ServiceCatalog.Model.ProvisioningArtifactProperties();
            System.String requestParameters_parameters_Description = null;
            if (cmdletContext.Parameters_Description != null)
            {
                requestParameters_parameters_Description = cmdletContext.Parameters_Description;
            }
            if (requestParameters_parameters_Description != null)
            {
                request.Parameters.Description = requestParameters_parameters_Description;
                requestParametersIsNull        = false;
            }
            System.Boolean?requestParameters_parameters_DisableTemplateValidation = null;
            if (cmdletContext.Parameters_DisableTemplateValidation != null)
            {
                requestParameters_parameters_DisableTemplateValidation = cmdletContext.Parameters_DisableTemplateValidation.Value;
            }
            if (requestParameters_parameters_DisableTemplateValidation != null)
            {
                request.Parameters.DisableTemplateValidation = requestParameters_parameters_DisableTemplateValidation.Value;
                requestParametersIsNull = false;
            }
            Dictionary <System.String, System.String> requestParameters_parameters_Info = null;

            if (cmdletContext.Parameters_Info != null)
            {
                requestParameters_parameters_Info = cmdletContext.Parameters_Info;
            }
            if (requestParameters_parameters_Info != null)
            {
                request.Parameters.Info = requestParameters_parameters_Info;
                requestParametersIsNull = false;
            }
            System.String requestParameters_parameters_Name = null;
            if (cmdletContext.Parameters_Name != null)
            {
                requestParameters_parameters_Name = cmdletContext.Parameters_Name;
            }
            if (requestParameters_parameters_Name != null)
            {
                request.Parameters.Name = requestParameters_parameters_Name;
                requestParametersIsNull = false;
            }
            Amazon.ServiceCatalog.ProvisioningArtifactType requestParameters_parameters_Type = null;
            if (cmdletContext.Parameters_Type != null)
            {
                requestParameters_parameters_Type = cmdletContext.Parameters_Type;
            }
            if (requestParameters_parameters_Type != null)
            {
                request.Parameters.Type = requestParameters_parameters_Type;
                requestParametersIsNull = false;
            }
            // determine if request.Parameters should be set to null
            if (requestParametersIsNull)
            {
                request.Parameters = null;
            }
            if (cmdletContext.ProductId != null)
            {
                request.ProductId = cmdletContext.ProductId;
            }

            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);
        }