1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package rds 4 5import ( 6 "context" 7 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 8 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 9 "github.com/aws/aws-sdk-go-v2/service/rds/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Imports the installation media for a DB engine that requires an on-premises 15// customer provided license, such as SQL Server. 16func (c *Client) ImportInstallationMedia(ctx context.Context, params *ImportInstallationMediaInput, optFns ...func(*Options)) (*ImportInstallationMediaOutput, error) { 17 if params == nil { 18 params = &ImportInstallationMediaInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "ImportInstallationMedia", params, optFns, addOperationImportInstallationMediaMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*ImportInstallationMediaOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29} 30 31type ImportInstallationMediaInput struct { 32 33 // The identifier of the custom Availability Zone (AZ) to import the installation 34 // media to. 35 // 36 // This member is required. 37 CustomAvailabilityZoneId *string 38 39 // The name of the database engine to be used for this instance. The list only 40 // includes supported DB engines that require an on-premises customer provided 41 // license. Valid Values: 42 // 43 // * sqlserver-ee 44 // 45 // * sqlserver-se 46 // 47 // * sqlserver-ex 48 // 49 // * 50 // sqlserver-web 51 // 52 // This member is required. 53 Engine *string 54 55 // The path to the installation medium for the specified DB engine. Example: 56 // SQLServerISO/en_sql_server_2016_enterprise_x64_dvd_8701793.iso 57 // 58 // This member is required. 59 EngineInstallationMediaPath *string 60 61 // The version number of the database engine to use. For a list of valid engine 62 // versions, call DescribeDBEngineVersions. The following are the database engines 63 // and links to information about the major and minor versions. The list only 64 // includes DB engines that require an on-premises customer provided license. 65 // Microsoft SQL Server See Microsoft SQL Server Versions on Amazon RDS 66 // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.VersionSupport) 67 // in the Amazon RDS User Guide. 68 // 69 // This member is required. 70 EngineVersion *string 71 72 // The path to the installation medium for the operating system associated with the 73 // specified DB engine. Example: 74 // WindowsISO/en_windows_server_2016_x64_dvd_9327751.iso 75 // 76 // This member is required. 77 OSInstallationMediaPath *string 78} 79 80// Contains the installation media for a DB engine that requires an on-premises 81// customer provided license, such as Microsoft SQL Server. 82type ImportInstallationMediaOutput struct { 83 84 // The custom Availability Zone (AZ) that contains the installation media. 85 CustomAvailabilityZoneId *string 86 87 // The DB engine. 88 Engine *string 89 90 // The path to the installation medium for the DB engine. 91 EngineInstallationMediaPath *string 92 93 // The engine version of the DB engine. 94 EngineVersion *string 95 96 // If an installation media failure occurred, the cause of the failure. 97 FailureCause *types.InstallationMediaFailureCause 98 99 // The installation medium ID. 100 InstallationMediaId *string 101 102 // The path to the installation medium for the operating system associated with the 103 // DB engine. 104 OSInstallationMediaPath *string 105 106 // The status of the installation medium. 107 Status *string 108 109 // Metadata pertaining to the operation's result. 110 ResultMetadata middleware.Metadata 111} 112 113func addOperationImportInstallationMediaMiddlewares(stack *middleware.Stack, options Options) (err error) { 114 err = stack.Serialize.Add(&awsAwsquery_serializeOpImportInstallationMedia{}, middleware.After) 115 if err != nil { 116 return err 117 } 118 err = stack.Deserialize.Add(&awsAwsquery_deserializeOpImportInstallationMedia{}, middleware.After) 119 if err != nil { 120 return err 121 } 122 if err = addSetLoggerMiddleware(stack, options); err != nil { 123 return err 124 } 125 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 126 return err 127 } 128 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 129 return err 130 } 131 if err = addResolveEndpointMiddleware(stack, options); err != nil { 132 return err 133 } 134 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 135 return err 136 } 137 if err = addRetryMiddlewares(stack, options); err != nil { 138 return err 139 } 140 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 141 return err 142 } 143 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 144 return err 145 } 146 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 147 return err 148 } 149 if err = addClientUserAgent(stack); err != nil { 150 return err 151 } 152 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 153 return err 154 } 155 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 156 return err 157 } 158 if err = addOpImportInstallationMediaValidationMiddleware(stack); err != nil { 159 return err 160 } 161 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportInstallationMedia(options.Region), middleware.Before); err != nil { 162 return err 163 } 164 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 165 return err 166 } 167 if err = addResponseErrorMiddleware(stack); err != nil { 168 return err 169 } 170 if err = addRequestResponseLogging(stack, options); err != nil { 171 return err 172 } 173 return nil 174} 175 176func newServiceMetadataMiddleware_opImportInstallationMedia(region string) *awsmiddleware.RegisterServiceMetadata { 177 return &awsmiddleware.RegisterServiceMetadata{ 178 Region: region, 179 ServiceID: ServiceID, 180 SigningName: "rds", 181 OperationName: "ImportInstallationMedia", 182 } 183} 184