public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ConfigService.Model.PutOrganizationConfigRuleRequest(); if (cmdletContext.ExcludedAccount != null) { request.ExcludedAccounts = cmdletContext.ExcludedAccount; } if (cmdletContext.OrganizationConfigRuleName != null) { request.OrganizationConfigRuleName = cmdletContext.OrganizationConfigRuleName; } // populate OrganizationCustomRuleMetadata var requestOrganizationCustomRuleMetadataIsNull = true; request.OrganizationCustomRuleMetadata = new Amazon.ConfigService.Model.OrganizationCustomRuleMetadata(); System.String requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_Description = null; if (cmdletContext.OrganizationCustomRuleMetadata_Description != null) { requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_Description = cmdletContext.OrganizationCustomRuleMetadata_Description; } if (requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_Description != null) { request.OrganizationCustomRuleMetadata.Description = requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_Description; requestOrganizationCustomRuleMetadataIsNull = false; } System.String requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_InputParameter = null; if (cmdletContext.OrganizationCustomRuleMetadata_InputParameter != null) { requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_InputParameter = cmdletContext.OrganizationCustomRuleMetadata_InputParameter; } if (requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_InputParameter != null) { request.OrganizationCustomRuleMetadata.InputParameters = requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_InputParameter; requestOrganizationCustomRuleMetadataIsNull = false; } System.String requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_LambdaFunctionArn = null; if (cmdletContext.OrganizationCustomRuleMetadata_LambdaFunctionArn != null) { requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_LambdaFunctionArn = cmdletContext.OrganizationCustomRuleMetadata_LambdaFunctionArn; } if (requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_LambdaFunctionArn != null) { request.OrganizationCustomRuleMetadata.LambdaFunctionArn = requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_LambdaFunctionArn; requestOrganizationCustomRuleMetadataIsNull = false; } Amazon.ConfigService.MaximumExecutionFrequency requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_MaximumExecutionFrequency = null; if (cmdletContext.OrganizationCustomRuleMetadata_MaximumExecutionFrequency != null) { requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_MaximumExecutionFrequency = cmdletContext.OrganizationCustomRuleMetadata_MaximumExecutionFrequency; } if (requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_MaximumExecutionFrequency != null) { request.OrganizationCustomRuleMetadata.MaximumExecutionFrequency = requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_MaximumExecutionFrequency; requestOrganizationCustomRuleMetadataIsNull = false; } List <System.String> requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_OrganizationConfigRuleTriggerType = null; if (cmdletContext.OrganizationCustomRuleMetadata_OrganizationConfigRuleTriggerType != null) { requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_OrganizationConfigRuleTriggerType = cmdletContext.OrganizationCustomRuleMetadata_OrganizationConfigRuleTriggerType; } if (requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_OrganizationConfigRuleTriggerType != null) { request.OrganizationCustomRuleMetadata.OrganizationConfigRuleTriggerTypes = requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_OrganizationConfigRuleTriggerType; requestOrganizationCustomRuleMetadataIsNull = false; } System.String requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_ResourceIdScope = null; if (cmdletContext.OrganizationCustomRuleMetadata_ResourceIdScope != null) { requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_ResourceIdScope = cmdletContext.OrganizationCustomRuleMetadata_ResourceIdScope; } if (requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_ResourceIdScope != null) { request.OrganizationCustomRuleMetadata.ResourceIdScope = requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_ResourceIdScope; requestOrganizationCustomRuleMetadataIsNull = false; } List <System.String> requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_ResourceTypesScope = null; if (cmdletContext.OrganizationCustomRuleMetadata_ResourceTypesScope != null) { requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_ResourceTypesScope = cmdletContext.OrganizationCustomRuleMetadata_ResourceTypesScope; } if (requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_ResourceTypesScope != null) { request.OrganizationCustomRuleMetadata.ResourceTypesScope = requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_ResourceTypesScope; requestOrganizationCustomRuleMetadataIsNull = false; } System.String requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_TagKeyScope = null; if (cmdletContext.OrganizationCustomRuleMetadata_TagKeyScope != null) { requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_TagKeyScope = cmdletContext.OrganizationCustomRuleMetadata_TagKeyScope; } if (requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_TagKeyScope != null) { request.OrganizationCustomRuleMetadata.TagKeyScope = requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_TagKeyScope; requestOrganizationCustomRuleMetadataIsNull = false; } System.String requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_TagValueScope = null; if (cmdletContext.OrganizationCustomRuleMetadata_TagValueScope != null) { requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_TagValueScope = cmdletContext.OrganizationCustomRuleMetadata_TagValueScope; } if (requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_TagValueScope != null) { request.OrganizationCustomRuleMetadata.TagValueScope = requestOrganizationCustomRuleMetadata_organizationCustomRuleMetadata_TagValueScope; requestOrganizationCustomRuleMetadataIsNull = false; } // determine if request.OrganizationCustomRuleMetadata should be set to null if (requestOrganizationCustomRuleMetadataIsNull) { request.OrganizationCustomRuleMetadata = null; } // populate OrganizationManagedRuleMetadata var requestOrganizationManagedRuleMetadataIsNull = true; request.OrganizationManagedRuleMetadata = new Amazon.ConfigService.Model.OrganizationManagedRuleMetadata(); System.String requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_Description = null; if (cmdletContext.OrganizationManagedRuleMetadata_Description != null) { requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_Description = cmdletContext.OrganizationManagedRuleMetadata_Description; } if (requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_Description != null) { request.OrganizationManagedRuleMetadata.Description = requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_Description; requestOrganizationManagedRuleMetadataIsNull = false; } System.String requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_InputParameter = null; if (cmdletContext.OrganizationManagedRuleMetadata_InputParameter != null) { requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_InputParameter = cmdletContext.OrganizationManagedRuleMetadata_InputParameter; } if (requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_InputParameter != null) { request.OrganizationManagedRuleMetadata.InputParameters = requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_InputParameter; requestOrganizationManagedRuleMetadataIsNull = false; } Amazon.ConfigService.MaximumExecutionFrequency requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_MaximumExecutionFrequency = null; if (cmdletContext.OrganizationManagedRuleMetadata_MaximumExecutionFrequency != null) { requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_MaximumExecutionFrequency = cmdletContext.OrganizationManagedRuleMetadata_MaximumExecutionFrequency; } if (requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_MaximumExecutionFrequency != null) { request.OrganizationManagedRuleMetadata.MaximumExecutionFrequency = requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_MaximumExecutionFrequency; requestOrganizationManagedRuleMetadataIsNull = false; } System.String requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_ResourceIdScope = null; if (cmdletContext.OrganizationManagedRuleMetadata_ResourceIdScope != null) { requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_ResourceIdScope = cmdletContext.OrganizationManagedRuleMetadata_ResourceIdScope; } if (requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_ResourceIdScope != null) { request.OrganizationManagedRuleMetadata.ResourceIdScope = requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_ResourceIdScope; requestOrganizationManagedRuleMetadataIsNull = false; } List <System.String> requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_ResourceTypesScope = null; if (cmdletContext.OrganizationManagedRuleMetadata_ResourceTypesScope != null) { requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_ResourceTypesScope = cmdletContext.OrganizationManagedRuleMetadata_ResourceTypesScope; } if (requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_ResourceTypesScope != null) { request.OrganizationManagedRuleMetadata.ResourceTypesScope = requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_ResourceTypesScope; requestOrganizationManagedRuleMetadataIsNull = false; } System.String requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_RuleIdentifier = null; if (cmdletContext.OrganizationManagedRuleMetadata_RuleIdentifier != null) { requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_RuleIdentifier = cmdletContext.OrganizationManagedRuleMetadata_RuleIdentifier; } if (requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_RuleIdentifier != null) { request.OrganizationManagedRuleMetadata.RuleIdentifier = requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_RuleIdentifier; requestOrganizationManagedRuleMetadataIsNull = false; } System.String requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_TagKeyScope = null; if (cmdletContext.OrganizationManagedRuleMetadata_TagKeyScope != null) { requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_TagKeyScope = cmdletContext.OrganizationManagedRuleMetadata_TagKeyScope; } if (requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_TagKeyScope != null) { request.OrganizationManagedRuleMetadata.TagKeyScope = requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_TagKeyScope; requestOrganizationManagedRuleMetadataIsNull = false; } System.String requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_TagValueScope = null; if (cmdletContext.OrganizationManagedRuleMetadata_TagValueScope != null) { requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_TagValueScope = cmdletContext.OrganizationManagedRuleMetadata_TagValueScope; } if (requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_TagValueScope != null) { request.OrganizationManagedRuleMetadata.TagValueScope = requestOrganizationManagedRuleMetadata_organizationManagedRuleMetadata_TagValueScope; requestOrganizationManagedRuleMetadataIsNull = false; } // determine if request.OrganizationManagedRuleMetadata should be set to null if (requestOrganizationManagedRuleMetadataIsNull) { request.OrganizationManagedRuleMetadata = 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); }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ConfigService.Model.PutDeliveryChannelRequest(); // populate DeliveryChannel var requestDeliveryChannelIsNull = true; request.DeliveryChannel = new Amazon.ConfigService.Model.DeliveryChannel(); System.String requestDeliveryChannel_deliveryChannelName = null; if (cmdletContext.DeliveryChannelName != null) { requestDeliveryChannel_deliveryChannelName = cmdletContext.DeliveryChannelName; } if (requestDeliveryChannel_deliveryChannelName != null) { request.DeliveryChannel.Name = requestDeliveryChannel_deliveryChannelName; requestDeliveryChannelIsNull = false; } System.String requestDeliveryChannel_deliveryChannel_S3BucketName = null; if (cmdletContext.DeliveryChannel_S3BucketName != null) { requestDeliveryChannel_deliveryChannel_S3BucketName = cmdletContext.DeliveryChannel_S3BucketName; } if (requestDeliveryChannel_deliveryChannel_S3BucketName != null) { request.DeliveryChannel.S3BucketName = requestDeliveryChannel_deliveryChannel_S3BucketName; requestDeliveryChannelIsNull = false; } System.String requestDeliveryChannel_deliveryChannel_S3KeyPrefix = null; if (cmdletContext.DeliveryChannel_S3KeyPrefix != null) { requestDeliveryChannel_deliveryChannel_S3KeyPrefix = cmdletContext.DeliveryChannel_S3KeyPrefix; } if (requestDeliveryChannel_deliveryChannel_S3KeyPrefix != null) { request.DeliveryChannel.S3KeyPrefix = requestDeliveryChannel_deliveryChannel_S3KeyPrefix; requestDeliveryChannelIsNull = false; } System.String requestDeliveryChannel_deliveryChannel_S3KmsKeyArn = null; if (cmdletContext.DeliveryChannel_S3KmsKeyArn != null) { requestDeliveryChannel_deliveryChannel_S3KmsKeyArn = cmdletContext.DeliveryChannel_S3KmsKeyArn; } if (requestDeliveryChannel_deliveryChannel_S3KmsKeyArn != null) { request.DeliveryChannel.S3KmsKeyArn = requestDeliveryChannel_deliveryChannel_S3KmsKeyArn; requestDeliveryChannelIsNull = false; } System.String requestDeliveryChannel_deliveryChannel_SnsTopicARN = null; if (cmdletContext.DeliveryChannel_SnsTopicARN != null) { requestDeliveryChannel_deliveryChannel_SnsTopicARN = cmdletContext.DeliveryChannel_SnsTopicARN; } if (requestDeliveryChannel_deliveryChannel_SnsTopicARN != null) { request.DeliveryChannel.SnsTopicARN = requestDeliveryChannel_deliveryChannel_SnsTopicARN; requestDeliveryChannelIsNull = false; } Amazon.ConfigService.Model.ConfigSnapshotDeliveryProperties requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties = null; // populate ConfigSnapshotDeliveryProperties var requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryPropertiesIsNull = true; requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties = new Amazon.ConfigService.Model.ConfigSnapshotDeliveryProperties(); Amazon.ConfigService.MaximumExecutionFrequency requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties_configSnapshotDeliveryProperties_DeliveryFrequency = null; if (cmdletContext.ConfigSnapshotDeliveryProperties_DeliveryFrequency != null) { requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties_configSnapshotDeliveryProperties_DeliveryFrequency = cmdletContext.ConfigSnapshotDeliveryProperties_DeliveryFrequency; } if (requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties_configSnapshotDeliveryProperties_DeliveryFrequency != null) { requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties.DeliveryFrequency = requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties_configSnapshotDeliveryProperties_DeliveryFrequency; requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryPropertiesIsNull = false; } // determine if requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties should be set to null if (requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryPropertiesIsNull) { requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties = null; } if (requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties != null) { request.DeliveryChannel.ConfigSnapshotDeliveryProperties = requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties; requestDeliveryChannelIsNull = false; } // determine if request.DeliveryChannel should be set to null if (requestDeliveryChannelIsNull) { request.DeliveryChannel = 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); }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ConfigService.Model.PutConfigRuleRequest(); // populate ConfigRule var requestConfigRuleIsNull = true; request.ConfigRule = new Amazon.ConfigService.Model.ConfigRule(); System.String requestConfigRule_configRule_ConfigRuleArn = null; if (cmdletContext.ConfigRule_ConfigRuleArn != null) { requestConfigRule_configRule_ConfigRuleArn = cmdletContext.ConfigRule_ConfigRuleArn; } if (requestConfigRule_configRule_ConfigRuleArn != null) { request.ConfigRule.ConfigRuleArn = requestConfigRule_configRule_ConfigRuleArn; requestConfigRuleIsNull = false; } System.String requestConfigRule_configRule_ConfigRuleId = null; if (cmdletContext.ConfigRule_ConfigRuleId != null) { requestConfigRule_configRule_ConfigRuleId = cmdletContext.ConfigRule_ConfigRuleId; } if (requestConfigRule_configRule_ConfigRuleId != null) { request.ConfigRule.ConfigRuleId = requestConfigRule_configRule_ConfigRuleId; requestConfigRuleIsNull = false; } System.String requestConfigRule_configRule_ConfigRuleName = null; if (cmdletContext.ConfigRule_ConfigRuleName != null) { requestConfigRule_configRule_ConfigRuleName = cmdletContext.ConfigRule_ConfigRuleName; } if (requestConfigRule_configRule_ConfigRuleName != null) { request.ConfigRule.ConfigRuleName = requestConfigRule_configRule_ConfigRuleName; requestConfigRuleIsNull = false; } Amazon.ConfigService.ConfigRuleState requestConfigRule_configRule_ConfigRuleState = null; if (cmdletContext.ConfigRule_ConfigRuleState != null) { requestConfigRule_configRule_ConfigRuleState = cmdletContext.ConfigRule_ConfigRuleState; } if (requestConfigRule_configRule_ConfigRuleState != null) { request.ConfigRule.ConfigRuleState = requestConfigRule_configRule_ConfigRuleState; requestConfigRuleIsNull = false; } System.String requestConfigRule_configRule_CreatedBy = null; if (cmdletContext.ConfigRule_CreatedBy != null) { requestConfigRule_configRule_CreatedBy = cmdletContext.ConfigRule_CreatedBy; } if (requestConfigRule_configRule_CreatedBy != null) { request.ConfigRule.CreatedBy = requestConfigRule_configRule_CreatedBy; requestConfigRuleIsNull = false; } System.String requestConfigRule_configRule_Description = null; if (cmdletContext.ConfigRule_Description != null) { requestConfigRule_configRule_Description = cmdletContext.ConfigRule_Description; } if (requestConfigRule_configRule_Description != null) { request.ConfigRule.Description = requestConfigRule_configRule_Description; requestConfigRuleIsNull = false; } System.String requestConfigRule_configRule_InputParameter = null; if (cmdletContext.ConfigRule_InputParameter != null) { requestConfigRule_configRule_InputParameter = cmdletContext.ConfigRule_InputParameter; } if (requestConfigRule_configRule_InputParameter != null) { request.ConfigRule.InputParameters = requestConfigRule_configRule_InputParameter; requestConfigRuleIsNull = false; } Amazon.ConfigService.MaximumExecutionFrequency requestConfigRule_configRule_MaximumExecutionFrequency = null; if (cmdletContext.ConfigRule_MaximumExecutionFrequency != null) { requestConfigRule_configRule_MaximumExecutionFrequency = cmdletContext.ConfigRule_MaximumExecutionFrequency; } if (requestConfigRule_configRule_MaximumExecutionFrequency != null) { request.ConfigRule.MaximumExecutionFrequency = requestConfigRule_configRule_MaximumExecutionFrequency; requestConfigRuleIsNull = false; } Amazon.ConfigService.Model.Source requestConfigRule_configRule_Source = null; // populate Source var requestConfigRule_configRule_SourceIsNull = true; requestConfigRule_configRule_Source = new Amazon.ConfigService.Model.Source(); Amazon.ConfigService.Owner requestConfigRule_configRule_Source_source_Owner = null; if (cmdletContext.Source_Owner != null) { requestConfigRule_configRule_Source_source_Owner = cmdletContext.Source_Owner; } if (requestConfigRule_configRule_Source_source_Owner != null) { requestConfigRule_configRule_Source.Owner = requestConfigRule_configRule_Source_source_Owner; requestConfigRule_configRule_SourceIsNull = false; } List <Amazon.ConfigService.Model.SourceDetail> requestConfigRule_configRule_Source_source_SourceDetail = null; if (cmdletContext.Source_SourceDetail != null) { requestConfigRule_configRule_Source_source_SourceDetail = cmdletContext.Source_SourceDetail; } if (requestConfigRule_configRule_Source_source_SourceDetail != null) { requestConfigRule_configRule_Source.SourceDetails = requestConfigRule_configRule_Source_source_SourceDetail; requestConfigRule_configRule_SourceIsNull = false; } System.String requestConfigRule_configRule_Source_source_SourceIdentifier = null; if (cmdletContext.Source_SourceIdentifier != null) { requestConfigRule_configRule_Source_source_SourceIdentifier = cmdletContext.Source_SourceIdentifier; } if (requestConfigRule_configRule_Source_source_SourceIdentifier != null) { requestConfigRule_configRule_Source.SourceIdentifier = requestConfigRule_configRule_Source_source_SourceIdentifier; requestConfigRule_configRule_SourceIsNull = false; } // determine if requestConfigRule_configRule_Source should be set to null if (requestConfigRule_configRule_SourceIsNull) { requestConfigRule_configRule_Source = null; } if (requestConfigRule_configRule_Source != null) { request.ConfigRule.Source = requestConfigRule_configRule_Source; requestConfigRuleIsNull = false; } Amazon.ConfigService.Model.Scope requestConfigRule_configRule_Scope = null; // populate Scope var requestConfigRule_configRule_ScopeIsNull = true; requestConfigRule_configRule_Scope = new Amazon.ConfigService.Model.Scope(); System.String requestConfigRule_configRule_Scope_scope_ComplianceResourceId = null; if (cmdletContext.Scope_ComplianceResourceId != null) { requestConfigRule_configRule_Scope_scope_ComplianceResourceId = cmdletContext.Scope_ComplianceResourceId; } if (requestConfigRule_configRule_Scope_scope_ComplianceResourceId != null) { requestConfigRule_configRule_Scope.ComplianceResourceId = requestConfigRule_configRule_Scope_scope_ComplianceResourceId; requestConfigRule_configRule_ScopeIsNull = false; } List <System.String> requestConfigRule_configRule_Scope_scope_ComplianceResourceType = null; if (cmdletContext.Scope_ComplianceResourceType != null) { requestConfigRule_configRule_Scope_scope_ComplianceResourceType = cmdletContext.Scope_ComplianceResourceType; } if (requestConfigRule_configRule_Scope_scope_ComplianceResourceType != null) { requestConfigRule_configRule_Scope.ComplianceResourceTypes = requestConfigRule_configRule_Scope_scope_ComplianceResourceType; requestConfigRule_configRule_ScopeIsNull = false; } System.String requestConfigRule_configRule_Scope_scope_TagKey = null; if (cmdletContext.Scope_TagKey != null) { requestConfigRule_configRule_Scope_scope_TagKey = cmdletContext.Scope_TagKey; } if (requestConfigRule_configRule_Scope_scope_TagKey != null) { requestConfigRule_configRule_Scope.TagKey = requestConfigRule_configRule_Scope_scope_TagKey; requestConfigRule_configRule_ScopeIsNull = false; } System.String requestConfigRule_configRule_Scope_scope_TagValue = null; if (cmdletContext.Scope_TagValue != null) { requestConfigRule_configRule_Scope_scope_TagValue = cmdletContext.Scope_TagValue; } if (requestConfigRule_configRule_Scope_scope_TagValue != null) { requestConfigRule_configRule_Scope.TagValue = requestConfigRule_configRule_Scope_scope_TagValue; requestConfigRule_configRule_ScopeIsNull = false; } // determine if requestConfigRule_configRule_Scope should be set to null if (requestConfigRule_configRule_ScopeIsNull) { requestConfigRule_configRule_Scope = null; } if (requestConfigRule_configRule_Scope != null) { request.ConfigRule.Scope = requestConfigRule_configRule_Scope; requestConfigRuleIsNull = false; } // determine if request.ConfigRule should be set to null if (requestConfigRuleIsNull) { request.ConfigRule = null; } if (cmdletContext.Tag != null) { request.Tags = cmdletContext.Tag; } 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); }