protected void ExecuteContainerServiceCreateOrUpdateMethod(object[] invokeMethodInputParameters)
        {
            string           resourceGroupName    = (string)ParseParameter(invokeMethodInputParameters[0]);
            string           containerServiceName = (string)ParseParameter(invokeMethodInputParameters[1]);
            ContainerService parameters           = (ContainerService)ParseParameter(invokeMethodInputParameters[2]);

            var result = ContainerServicesClient.CreateOrUpdate(resourceGroupName, containerServiceName, parameters);

            WriteObject(result);
        }
Пример #2
0
        protected override void ProcessRecord()
        {
            ExecuteClientAction(() =>
            {
                if (ShouldProcess(this.ResourceGroupName, VerbsData.Update))
                {
                    string resourceGroupName    = this.ResourceGroupName;
                    string containerServiceName = this.Name;
                    ContainerService parameters = this.ContainerService;

                    var result = ContainerServicesClient.CreateOrUpdate(resourceGroupName, containerServiceName, parameters);
                    WriteObject(result);
                }
            });
        }
        public override void ExecuteCmdlet()
        {
            ExecuteClientAction(() =>
            {
                if (ShouldProcess(this.Name, VerbsData.Update))
                {
                    string resourceGroupName    = this.ResourceGroupName;
                    string containerServiceName = this.Name;
                    ContainerService parameters = new ContainerService();
                    ComputeAutomationAutoMapperProfile.Mapper.Map <PSContainerService, ContainerService>(this.ContainerService, parameters);

                    var result   = ContainerServicesClient.CreateOrUpdate(resourceGroupName, containerServiceName, parameters);
                    var psObject = new PSContainerService();
                    ComputeAutomationAutoMapperProfile.Mapper.Map <ContainerService, PSContainerService>(result, psObject);
                    WriteObject(psObject);
                }
            });
        }
Пример #4
0
        protected override void ProcessRecord()
        {
            AutoMapper.Mapper.AddProfile <ComputeAutomationAutoMapperProfile>();
            ExecuteClientAction(() =>
            {
                if (ShouldProcess(this.Name, VerbsCommon.New))
                {
                    string resourceGroupName    = this.ResourceGroupName;
                    string containerServiceName = this.Name;
                    ContainerService parameters = new ContainerService();
                    Mapper.Map <PSContainerService, ContainerService>(this.ContainerService, parameters);

                    var result   = ContainerServicesClient.CreateOrUpdate(resourceGroupName, containerServiceName, parameters);
                    var psObject = new PSContainerService();
                    Mapper.Map <ContainerService, PSContainerService>(result, psObject);
                    WriteObject(psObject);
                }
            });
        }