public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.Elasticsearch.Model.UpdateElasticsearchDomainConfigRequest(); if (cmdletContext.AccessPolicy != null) { request.AccessPolicies = cmdletContext.AccessPolicy; } if (cmdletContext.AdvancedOption != null) { request.AdvancedOptions = cmdletContext.AdvancedOption; } // populate CognitoOptions var requestCognitoOptionsIsNull = true; request.CognitoOptions = new Amazon.Elasticsearch.Model.CognitoOptions(); System.Boolean?requestCognitoOptions_cognitoOptions_Enabled = null; if (cmdletContext.CognitoOptions_Enabled != null) { requestCognitoOptions_cognitoOptions_Enabled = cmdletContext.CognitoOptions_Enabled.Value; } if (requestCognitoOptions_cognitoOptions_Enabled != null) { request.CognitoOptions.Enabled = requestCognitoOptions_cognitoOptions_Enabled.Value; requestCognitoOptionsIsNull = false; } System.String requestCognitoOptions_cognitoOptions_IdentityPoolId = null; if (cmdletContext.CognitoOptions_IdentityPoolId != null) { requestCognitoOptions_cognitoOptions_IdentityPoolId = cmdletContext.CognitoOptions_IdentityPoolId; } if (requestCognitoOptions_cognitoOptions_IdentityPoolId != null) { request.CognitoOptions.IdentityPoolId = requestCognitoOptions_cognitoOptions_IdentityPoolId; requestCognitoOptionsIsNull = false; } System.String requestCognitoOptions_cognitoOptions_RoleArn = null; if (cmdletContext.CognitoOptions_RoleArn != null) { requestCognitoOptions_cognitoOptions_RoleArn = cmdletContext.CognitoOptions_RoleArn; } if (requestCognitoOptions_cognitoOptions_RoleArn != null) { request.CognitoOptions.RoleArn = requestCognitoOptions_cognitoOptions_RoleArn; requestCognitoOptionsIsNull = false; } System.String requestCognitoOptions_cognitoOptions_UserPoolId = null; if (cmdletContext.CognitoOptions_UserPoolId != null) { requestCognitoOptions_cognitoOptions_UserPoolId = cmdletContext.CognitoOptions_UserPoolId; } if (requestCognitoOptions_cognitoOptions_UserPoolId != null) { request.CognitoOptions.UserPoolId = requestCognitoOptions_cognitoOptions_UserPoolId; requestCognitoOptionsIsNull = false; } // determine if request.CognitoOptions should be set to null if (requestCognitoOptionsIsNull) { request.CognitoOptions = null; } // populate DomainEndpointOptions var requestDomainEndpointOptionsIsNull = true; request.DomainEndpointOptions = new Amazon.Elasticsearch.Model.DomainEndpointOptions(); System.Boolean?requestDomainEndpointOptions_domainEndpointOptions_EnforceHTTPS = null; if (cmdletContext.DomainEndpointOptions_EnforceHTTPS != null) { requestDomainEndpointOptions_domainEndpointOptions_EnforceHTTPS = cmdletContext.DomainEndpointOptions_EnforceHTTPS.Value; } if (requestDomainEndpointOptions_domainEndpointOptions_EnforceHTTPS != null) { request.DomainEndpointOptions.EnforceHTTPS = requestDomainEndpointOptions_domainEndpointOptions_EnforceHTTPS.Value; requestDomainEndpointOptionsIsNull = false; } Amazon.Elasticsearch.TLSSecurityPolicy requestDomainEndpointOptions_domainEndpointOptions_TLSSecurityPolicy = null; if (cmdletContext.DomainEndpointOptions_TLSSecurityPolicy != null) { requestDomainEndpointOptions_domainEndpointOptions_TLSSecurityPolicy = cmdletContext.DomainEndpointOptions_TLSSecurityPolicy; } if (requestDomainEndpointOptions_domainEndpointOptions_TLSSecurityPolicy != null) { request.DomainEndpointOptions.TLSSecurityPolicy = requestDomainEndpointOptions_domainEndpointOptions_TLSSecurityPolicy; requestDomainEndpointOptionsIsNull = false; } // determine if request.DomainEndpointOptions should be set to null if (requestDomainEndpointOptionsIsNull) { request.DomainEndpointOptions = null; } if (cmdletContext.DomainName != null) { request.DomainName = cmdletContext.DomainName; } // populate EBSOptions var requestEBSOptionsIsNull = true; request.EBSOptions = new Amazon.Elasticsearch.Model.EBSOptions(); System.Boolean?requestEBSOptions_eBSOptions_EBSEnabled = null; if (cmdletContext.EBSOptions_EBSEnabled != null) { requestEBSOptions_eBSOptions_EBSEnabled = cmdletContext.EBSOptions_EBSEnabled.Value; } if (requestEBSOptions_eBSOptions_EBSEnabled != null) { request.EBSOptions.EBSEnabled = requestEBSOptions_eBSOptions_EBSEnabled.Value; requestEBSOptionsIsNull = false; } System.Int32?requestEBSOptions_eBSOptions_Iops = null; if (cmdletContext.EBSOptions_Iops != null) { requestEBSOptions_eBSOptions_Iops = cmdletContext.EBSOptions_Iops.Value; } if (requestEBSOptions_eBSOptions_Iops != null) { request.EBSOptions.Iops = requestEBSOptions_eBSOptions_Iops.Value; requestEBSOptionsIsNull = false; } System.Int32?requestEBSOptions_eBSOptions_VolumeSize = null; if (cmdletContext.EBSOptions_VolumeSize != null) { requestEBSOptions_eBSOptions_VolumeSize = cmdletContext.EBSOptions_VolumeSize.Value; } if (requestEBSOptions_eBSOptions_VolumeSize != null) { request.EBSOptions.VolumeSize = requestEBSOptions_eBSOptions_VolumeSize.Value; requestEBSOptionsIsNull = false; } Amazon.Elasticsearch.VolumeType requestEBSOptions_eBSOptions_VolumeType = null; if (cmdletContext.EBSOptions_VolumeType != null) { requestEBSOptions_eBSOptions_VolumeType = cmdletContext.EBSOptions_VolumeType; } if (requestEBSOptions_eBSOptions_VolumeType != null) { request.EBSOptions.VolumeType = requestEBSOptions_eBSOptions_VolumeType; requestEBSOptionsIsNull = false; } // determine if request.EBSOptions should be set to null if (requestEBSOptionsIsNull) { request.EBSOptions = null; } // populate ElasticsearchClusterConfig var requestElasticsearchClusterConfigIsNull = true; request.ElasticsearchClusterConfig = new Amazon.Elasticsearch.Model.ElasticsearchClusterConfig(); System.Int32?requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterCount = null; if (cmdletContext.ElasticsearchClusterConfig_DedicatedMasterCount != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterCount = cmdletContext.ElasticsearchClusterConfig_DedicatedMasterCount.Value; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterCount != null) { request.ElasticsearchClusterConfig.DedicatedMasterCount = requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterCount.Value; requestElasticsearchClusterConfigIsNull = false; } System.Boolean?requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterEnabled = null; if (cmdletContext.ElasticsearchClusterConfig_DedicatedMasterEnabled != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterEnabled = cmdletContext.ElasticsearchClusterConfig_DedicatedMasterEnabled.Value; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterEnabled != null) { request.ElasticsearchClusterConfig.DedicatedMasterEnabled = requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterEnabled.Value; requestElasticsearchClusterConfigIsNull = false; } Amazon.Elasticsearch.ESPartitionInstanceType requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterType = null; if (cmdletContext.ElasticsearchClusterConfig_DedicatedMasterType != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterType = cmdletContext.ElasticsearchClusterConfig_DedicatedMasterType; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterType != null) { request.ElasticsearchClusterConfig.DedicatedMasterType = requestElasticsearchClusterConfig_elasticsearchClusterConfig_DedicatedMasterType; requestElasticsearchClusterConfigIsNull = false; } System.Int32?requestElasticsearchClusterConfig_elasticsearchClusterConfig_InstanceCount = null; if (cmdletContext.ElasticsearchClusterConfig_InstanceCount != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_InstanceCount = cmdletContext.ElasticsearchClusterConfig_InstanceCount.Value; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_InstanceCount != null) { request.ElasticsearchClusterConfig.InstanceCount = requestElasticsearchClusterConfig_elasticsearchClusterConfig_InstanceCount.Value; requestElasticsearchClusterConfigIsNull = false; } Amazon.Elasticsearch.ESPartitionInstanceType requestElasticsearchClusterConfig_elasticsearchClusterConfig_InstanceType = null; if (cmdletContext.ElasticsearchClusterConfig_InstanceType != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_InstanceType = cmdletContext.ElasticsearchClusterConfig_InstanceType; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_InstanceType != null) { request.ElasticsearchClusterConfig.InstanceType = requestElasticsearchClusterConfig_elasticsearchClusterConfig_InstanceType; requestElasticsearchClusterConfigIsNull = false; } System.Int32?requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmCount = null; if (cmdletContext.ElasticsearchClusterConfig_WarmCount != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmCount = cmdletContext.ElasticsearchClusterConfig_WarmCount.Value; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmCount != null) { request.ElasticsearchClusterConfig.WarmCount = requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmCount.Value; requestElasticsearchClusterConfigIsNull = false; } System.Boolean?requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmEnabled = null; if (cmdletContext.ElasticsearchClusterConfig_WarmEnabled != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmEnabled = cmdletContext.ElasticsearchClusterConfig_WarmEnabled.Value; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmEnabled != null) { request.ElasticsearchClusterConfig.WarmEnabled = requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmEnabled.Value; requestElasticsearchClusterConfigIsNull = false; } Amazon.Elasticsearch.ESWarmPartitionInstanceType requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmType = null; if (cmdletContext.ElasticsearchClusterConfig_WarmType != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmType = cmdletContext.ElasticsearchClusterConfig_WarmType; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmType != null) { request.ElasticsearchClusterConfig.WarmType = requestElasticsearchClusterConfig_elasticsearchClusterConfig_WarmType; requestElasticsearchClusterConfigIsNull = false; } System.Boolean?requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessEnabled = null; if (cmdletContext.ElasticsearchClusterConfig_ZoneAwarenessEnabled != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessEnabled = cmdletContext.ElasticsearchClusterConfig_ZoneAwarenessEnabled.Value; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessEnabled != null) { request.ElasticsearchClusterConfig.ZoneAwarenessEnabled = requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessEnabled.Value; requestElasticsearchClusterConfigIsNull = false; } Amazon.Elasticsearch.Model.ZoneAwarenessConfig requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig = null; // populate ZoneAwarenessConfig var requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfigIsNull = true; requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig = new Amazon.Elasticsearch.Model.ZoneAwarenessConfig(); System.Int32?requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig_zoneAwarenessConfig_AvailabilityZoneCount = null; if (cmdletContext.ZoneAwarenessConfig_AvailabilityZoneCount != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig_zoneAwarenessConfig_AvailabilityZoneCount = cmdletContext.ZoneAwarenessConfig_AvailabilityZoneCount.Value; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig_zoneAwarenessConfig_AvailabilityZoneCount != null) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig.AvailabilityZoneCount = requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig_zoneAwarenessConfig_AvailabilityZoneCount.Value; requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfigIsNull = false; } // determine if requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig should be set to null if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfigIsNull) { requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig = null; } if (requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig != null) { request.ElasticsearchClusterConfig.ZoneAwarenessConfig = requestElasticsearchClusterConfig_elasticsearchClusterConfig_ZoneAwarenessConfig; requestElasticsearchClusterConfigIsNull = false; } // determine if request.ElasticsearchClusterConfig should be set to null if (requestElasticsearchClusterConfigIsNull) { request.ElasticsearchClusterConfig = null; } if (cmdletContext.LogPublishingOption != null) { request.LogPublishingOptions = cmdletContext.LogPublishingOption; } // populate SnapshotOptions var requestSnapshotOptionsIsNull = true; request.SnapshotOptions = new Amazon.Elasticsearch.Model.SnapshotOptions(); System.Int32?requestSnapshotOptions_snapshotOptions_AutomatedSnapshotStartHour = null; if (cmdletContext.SnapshotOptions_AutomatedSnapshotStartHour != null) { requestSnapshotOptions_snapshotOptions_AutomatedSnapshotStartHour = cmdletContext.SnapshotOptions_AutomatedSnapshotStartHour.Value; } if (requestSnapshotOptions_snapshotOptions_AutomatedSnapshotStartHour != null) { request.SnapshotOptions.AutomatedSnapshotStartHour = requestSnapshotOptions_snapshotOptions_AutomatedSnapshotStartHour.Value; requestSnapshotOptionsIsNull = false; } // determine if request.SnapshotOptions should be set to null if (requestSnapshotOptionsIsNull) { request.SnapshotOptions = null; } // populate VPCOptions var requestVPCOptionsIsNull = true; request.VPCOptions = new Amazon.Elasticsearch.Model.VPCOptions(); List <System.String> requestVPCOptions_vPCOptions_SecurityGroupId = null; if (cmdletContext.VPCOptions_SecurityGroupId != null) { requestVPCOptions_vPCOptions_SecurityGroupId = cmdletContext.VPCOptions_SecurityGroupId; } if (requestVPCOptions_vPCOptions_SecurityGroupId != null) { request.VPCOptions.SecurityGroupIds = requestVPCOptions_vPCOptions_SecurityGroupId; requestVPCOptionsIsNull = false; } List <System.String> requestVPCOptions_vPCOptions_SubnetId = null; if (cmdletContext.VPCOptions_SubnetId != null) { requestVPCOptions_vPCOptions_SubnetId = cmdletContext.VPCOptions_SubnetId; } if (requestVPCOptions_vPCOptions_SubnetId != null) { request.VPCOptions.SubnetIds = requestVPCOptions_vPCOptions_SubnetId; requestVPCOptionsIsNull = false; } // determine if request.VPCOptions should be set to null if (requestVPCOptionsIsNull) { request.VPCOptions = null; } 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); }