private Amazon.SimpleEmailV2.Model.PutEmailIdentityDkimSigningAttributesResponse CallAWSServiceOperation(IAmazonSimpleEmailServiceV2 client, Amazon.SimpleEmailV2.Model.PutEmailIdentityDkimSigningAttributesRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Simple Email Service V2 (SES V2)", "PutEmailIdentityDkimSigningAttributes"); try { #if DESKTOP return(client.PutEmailIdentityDkimSigningAttributes(request)); #elif CORECLR return(client.PutEmailIdentityDkimSigningAttributesAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.SimpleEmailV2.Model.PutEmailIdentityDkimSigningAttributesRequest(); if (cmdletContext.EmailIdentity != null) { request.EmailIdentity = cmdletContext.EmailIdentity; } // populate SigningAttributes var requestSigningAttributesIsNull = true; request.SigningAttributes = new Amazon.SimpleEmailV2.Model.DkimSigningAttributes(); System.String requestSigningAttributes_signingAttributes_DomainSigningPrivateKey = null; if (cmdletContext.SigningAttributes_DomainSigningPrivateKey != null) { requestSigningAttributes_signingAttributes_DomainSigningPrivateKey = cmdletContext.SigningAttributes_DomainSigningPrivateKey; } if (requestSigningAttributes_signingAttributes_DomainSigningPrivateKey != null) { request.SigningAttributes.DomainSigningPrivateKey = requestSigningAttributes_signingAttributes_DomainSigningPrivateKey; requestSigningAttributesIsNull = false; } System.String requestSigningAttributes_signingAttributes_DomainSigningSelector = null; if (cmdletContext.SigningAttributes_DomainSigningSelector != null) { requestSigningAttributes_signingAttributes_DomainSigningSelector = cmdletContext.SigningAttributes_DomainSigningSelector; } if (requestSigningAttributes_signingAttributes_DomainSigningSelector != null) { request.SigningAttributes.DomainSigningSelector = requestSigningAttributes_signingAttributes_DomainSigningSelector; requestSigningAttributesIsNull = false; } Amazon.SimpleEmailV2.DkimSigningKeyLength requestSigningAttributes_signingAttributes_NextSigningKeyLength = null; if (cmdletContext.SigningAttributes_NextSigningKeyLength != null) { requestSigningAttributes_signingAttributes_NextSigningKeyLength = cmdletContext.SigningAttributes_NextSigningKeyLength; } if (requestSigningAttributes_signingAttributes_NextSigningKeyLength != null) { request.SigningAttributes.NextSigningKeyLength = requestSigningAttributes_signingAttributes_NextSigningKeyLength; requestSigningAttributesIsNull = false; } // determine if request.SigningAttributes should be set to null if (requestSigningAttributesIsNull) { request.SigningAttributes = null; } if (cmdletContext.SigningAttributesOrigin != null) { request.SigningAttributesOrigin = cmdletContext.SigningAttributesOrigin; } 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); }