1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package neptune 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/neptune/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Modifies settings for a DB instance. You can change one or more database 15// configuration parameters by specifying these parameters and the new values in 16// the request. To learn what modifications you can make to your DB instance, call 17// DescribeValidDBInstanceModifications before you call ModifyDBInstance. 18func (c *Client) ModifyDBInstance(ctx context.Context, params *ModifyDBInstanceInput, optFns ...func(*Options)) (*ModifyDBInstanceOutput, error) { 19 if params == nil { 20 params = &ModifyDBInstanceInput{} 21 } 22 23 result, metadata, err := c.invokeOperation(ctx, "ModifyDBInstance", params, optFns, addOperationModifyDBInstanceMiddlewares) 24 if err != nil { 25 return nil, err 26 } 27 28 out := result.(*ModifyDBInstanceOutput) 29 out.ResultMetadata = metadata 30 return out, nil 31} 32 33type ModifyDBInstanceInput struct { 34 35 // The DB instance identifier. This value is stored as a lowercase string. 36 // Constraints: 37 // 38 // * Must match the identifier of an existing DBInstance. 39 // 40 // This member is required. 41 DBInstanceIdentifier *string 42 43 // The new amount of storage (in gibibytes) to allocate for the DB instance. Not 44 // applicable. Storage is managed by the DB Cluster. 45 AllocatedStorage *int32 46 47 // Indicates that major version upgrades are allowed. Changing this parameter 48 // doesn't result in an outage and the change is asynchronously applied as soon as 49 // possible. 50 AllowMajorVersionUpgrade bool 51 52 // Specifies whether the modifications in this request and any pending 53 // modifications are asynchronously applied as soon as possible, regardless of the 54 // PreferredMaintenanceWindow setting for the DB instance. If this parameter is set 55 // to false, changes to the DB instance are applied during the next maintenance 56 // window. Some parameter changes can cause an outage and are applied on the next 57 // call to RebootDBInstance, or the next failure reboot. Default: false 58 ApplyImmediately bool 59 60 // Indicates that minor version upgrades are applied automatically to the DB 61 // instance during the maintenance window. Changing this parameter doesn't result 62 // in an outage except in the following case and the change is asynchronously 63 // applied as soon as possible. An outage will result if this parameter is set to 64 // true during the maintenance window, and a newer minor version is available, and 65 // Neptune has enabled auto patching for that engine version. 66 AutoMinorVersionUpgrade *bool 67 68 // Not applicable. The retention period for automated backups is managed by the DB 69 // cluster. For more information, see ModifyDBCluster. Default: Uses existing 70 // setting 71 BackupRetentionPeriod *int32 72 73 // Indicates the certificate that needs to be associated with the instance. 74 CACertificateIdentifier *string 75 76 // The configuration setting for the log types to be enabled for export to 77 // CloudWatch Logs for a specific DB instance or DB cluster. 78 CloudwatchLogsExportConfiguration *types.CloudwatchLogsExportConfiguration 79 80 // True to copy all tags from the DB instance to snapshots of the DB instance, and 81 // otherwise false. The default is false. 82 CopyTagsToSnapshot *bool 83 84 // The new compute and memory capacity of the DB instance, for example, 85 // db.m4.large. Not all DB instance classes are available in all AWS Regions. If 86 // you modify the DB instance class, an outage occurs during the change. The change 87 // is applied during the next maintenance window, unless ApplyImmediately is 88 // specified as true for this request. Default: Uses existing setting 89 DBInstanceClass *string 90 91 // The name of the DB parameter group to apply to the DB instance. Changing this 92 // setting doesn't result in an outage. The parameter group name itself is changed 93 // immediately, but the actual parameter changes are not applied until you reboot 94 // the instance without failover. The db instance will NOT be rebooted 95 // automatically and the parameter changes will NOT be applied during the next 96 // maintenance window. Default: Uses existing setting Constraints: The DB parameter 97 // group must be in the same DB parameter group family as this DB instance. 98 DBParameterGroupName *string 99 100 // The port number on which the database accepts connections. The value of the 101 // DBPortNumber parameter must not match any of the port values specified for 102 // options in the option group for the DB instance. Your database will restart when 103 // you change the DBPortNumber value regardless of the value of the 104 // ApplyImmediately parameter. Default: 8182 105 DBPortNumber *int32 106 107 // A list of DB security groups to authorize on this DB instance. Changing this 108 // setting doesn't result in an outage and the change is asynchronously applied as 109 // soon as possible. Constraints: 110 // 111 // * If supplied, must match existing 112 // DBSecurityGroups. 113 DBSecurityGroups []string 114 115 // The new DB subnet group for the DB instance. You can use this parameter to move 116 // your DB instance to a different VPC. Changing the subnet group causes an outage 117 // during the change. The change is applied during the next maintenance window, 118 // unless you specify true for the ApplyImmediately parameter. Constraints: If 119 // supplied, must match the name of an existing DBSubnetGroup. Example: 120 // mySubnetGroup 121 DBSubnetGroupName *string 122 123 // A value that indicates whether the DB instance has deletion protection enabled. 124 // The database can't be deleted when deletion protection is enabled. By default, 125 // deletion protection is disabled. See Deleting a DB Instance 126 // (https://docs.aws.amazon.com/neptune/latest/userguide/manage-console-instances-delete.html). 127 DeletionProtection *bool 128 129 // Not supported. 130 Domain *string 131 132 // Not supported 133 DomainIAMRoleName *string 134 135 // True to enable mapping of AWS Identity and Access Management (IAM) accounts to 136 // database accounts, and otherwise false. You can enable IAM database 137 // authentication for the following database engines Not applicable. Mapping AWS 138 // IAM accounts to database accounts is managed by the DB cluster. For more 139 // information, see ModifyDBCluster. Default: false 140 EnableIAMDatabaseAuthentication *bool 141 142 // (Not supported by Neptune) 143 EnablePerformanceInsights *bool 144 145 // The version number of the database engine to upgrade to. Currently, setting this 146 // parameter has no effect. To upgrade your database engine to the most recent 147 // release, use the ApplyPendingMaintenanceAction API. 148 EngineVersion *string 149 150 // The new Provisioned IOPS (I/O operations per second) value for the instance. 151 // Changing this setting doesn't result in an outage and the change is applied 152 // during the next maintenance window unless the ApplyImmediately parameter is set 153 // to true for this request. Default: Uses existing setting 154 Iops *int32 155 156 // Not supported. 157 LicenseModel *string 158 159 // Not applicable. 160 MasterUserPassword *string 161 162 // The interval, in seconds, between points when Enhanced Monitoring metrics are 163 // collected for the DB instance. To disable collecting Enhanced Monitoring 164 // metrics, specify 0. The default is 0. If MonitoringRoleArn is specified, then 165 // you must also set MonitoringInterval to a value other than 0. Valid Values: 0, 166 // 1, 5, 10, 15, 30, 60 167 MonitoringInterval *int32 168 169 // The ARN for the IAM role that permits Neptune to send enhanced monitoring 170 // metrics to Amazon CloudWatch Logs. For example, 171 // arn:aws:iam:123456789012:role/emaccess. If MonitoringInterval is set to a value 172 // other than 0, then you must supply a MonitoringRoleArn value. 173 MonitoringRoleArn *string 174 175 // Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter 176 // doesn't result in an outage and the change is applied during the next 177 // maintenance window unless the ApplyImmediately parameter is set to true for this 178 // request. 179 MultiAZ *bool 180 181 // The new DB instance identifier for the DB instance when renaming a DB instance. 182 // When you change the DB instance identifier, an instance reboot will occur 183 // immediately if you set Apply Immediately to true, or will occur during the next 184 // maintenance window if Apply Immediately to false. This value is stored as a 185 // lowercase string. Constraints: 186 // 187 // * Must contain from 1 to 63 letters, numbers, or 188 // hyphens. 189 // 190 // * The first character must be a letter. 191 // 192 // * Cannot end with a hyphen or 193 // contain two consecutive hyphens. 194 // 195 // Example: mydbinstance 196 NewDBInstanceIdentifier *string 197 198 // (Not supported by Neptune) 199 OptionGroupName *string 200 201 // (Not supported by Neptune) 202 PerformanceInsightsKMSKeyId *string 203 204 // The daily time range during which automated backups are created if automated 205 // backups are enabled. Not applicable. The daily time range for creating automated 206 // backups is managed by the DB cluster. For more information, see ModifyDBCluster. 207 // Constraints: 208 // 209 // * Must be in the format hh24:mi-hh24:mi 210 // 211 // * Must be in Universal 212 // Time Coordinated (UTC) 213 // 214 // * Must not conflict with the preferred maintenance 215 // window 216 // 217 // * Must be at least 30 minutes 218 PreferredBackupWindow *string 219 220 // The weekly time range (in UTC) during which system maintenance can occur, which 221 // might result in an outage. Changing this parameter doesn't result in an outage, 222 // except in the following situation, and the change is asynchronously applied as 223 // soon as possible. If there are pending actions that cause a reboot, and the 224 // maintenance window is changed to include the current time, then changing this 225 // parameter will cause a reboot of the DB instance. If moving this window to the 226 // current time, there must be at least 30 minutes between the current time and end 227 // of the window to ensure pending changes are applied. Default: Uses existing 228 // setting Format: ddd:hh24:mi-ddd:hh24:mi Valid Days: Mon | Tue | Wed | Thu | Fri 229 // | Sat | Sun Constraints: Must be at least 30 minutes 230 PreferredMaintenanceWindow *string 231 232 // A value that specifies the order in which a Read Replica is promoted to the 233 // primary instance after a failure of the existing primary instance. Default: 1 234 // Valid Values: 0 - 15 235 PromotionTier *int32 236 237 // This flag should no longer be used. 238 // 239 // Deprecated: This member has been deprecated. 240 PubliclyAccessible *bool 241 242 // Not supported. 243 StorageType *string 244 245 // The ARN from the key store with which to associate the instance for TDE 246 // encryption. 247 TdeCredentialArn *string 248 249 // The password for the given ARN from the key store in order to access the device. 250 TdeCredentialPassword *string 251 252 // A list of EC2 VPC security groups to authorize on this DB instance. This change 253 // is asynchronously applied as soon as possible. Not applicable. The associated 254 // list of EC2 VPC security groups is managed by the DB cluster. For more 255 // information, see ModifyDBCluster. Constraints: 256 // 257 // * If supplied, must match 258 // existing VpcSecurityGroupIds. 259 VpcSecurityGroupIds []string 260} 261 262type ModifyDBInstanceOutput struct { 263 264 // Contains the details of an Amazon Neptune DB instance. This data type is used as 265 // a response element in the DescribeDBInstances action. 266 DBInstance *types.DBInstance 267 268 // Metadata pertaining to the operation's result. 269 ResultMetadata middleware.Metadata 270} 271 272func addOperationModifyDBInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { 273 err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBInstance{}, middleware.After) 274 if err != nil { 275 return err 276 } 277 err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBInstance{}, middleware.After) 278 if err != nil { 279 return err 280 } 281 if err = addSetLoggerMiddleware(stack, options); err != nil { 282 return err 283 } 284 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 285 return err 286 } 287 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 288 return err 289 } 290 if err = addResolveEndpointMiddleware(stack, options); err != nil { 291 return err 292 } 293 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 294 return err 295 } 296 if err = addRetryMiddlewares(stack, options); err != nil { 297 return err 298 } 299 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 300 return err 301 } 302 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 303 return err 304 } 305 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 306 return err 307 } 308 if err = addClientUserAgent(stack); err != nil { 309 return err 310 } 311 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 312 return err 313 } 314 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 315 return err 316 } 317 if err = addOpModifyDBInstanceValidationMiddleware(stack); err != nil { 318 return err 319 } 320 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBInstance(options.Region), middleware.Before); err != nil { 321 return err 322 } 323 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 324 return err 325 } 326 if err = addResponseErrorMiddleware(stack); err != nil { 327 return err 328 } 329 if err = addRequestResponseLogging(stack, options); err != nil { 330 return err 331 } 332 return nil 333} 334 335func newServiceMetadataMiddleware_opModifyDBInstance(region string) *awsmiddleware.RegisterServiceMetadata { 336 return &awsmiddleware.RegisterServiceMetadata{ 337 Region: region, 338 ServiceID: ServiceID, 339 SigningName: "rds", 340 OperationName: "ModifyDBInstance", 341 } 342} 343