// Code generated by smithy-go-codegen DO NOT EDIT. package backup import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/backup/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns event notifications for the specified backup vault. func (c *Client) GetBackupVaultNotifications(ctx context.Context, params *GetBackupVaultNotificationsInput, optFns ...func(*Options)) (*GetBackupVaultNotificationsOutput, error) { if params == nil { params = &GetBackupVaultNotificationsInput{} } result, metadata, err := c.invokeOperation(ctx, "GetBackupVaultNotifications", params, optFns, c.addOperationGetBackupVaultNotificationsMiddlewares) if err != nil { return nil, err } out := result.(*GetBackupVaultNotificationsOutput) out.ResultMetadata = metadata return out, nil } type GetBackupVaultNotificationsInput struct { // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the // Amazon Web Services Region where they are created. They consist of lowercase // letters, numbers, and hyphens. // // This member is required. BackupVaultName *string noSmithyDocumentSerde } type GetBackupVaultNotificationsOutput struct { // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault . BackupVaultArn *string // An array of events that indicate the status of jobs to back up resources to the // backup vault. BackupVaultEvents []types.BackupVaultEvent // The name of a logical container where backups are stored. Backup vaults are // identified by names that are unique to the account used to create them and the // Region where they are created. They consist of lowercase letters, numbers, and // hyphens. BackupVaultName *string // An ARN that uniquely identifies an Amazon Simple Notification Service (Amazon // SNS) topic; for example, arn:aws:sns:us-west-2:111122223333:MyTopic . SNSTopicArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetBackupVaultNotificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetBackupVaultNotifications{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetBackupVaultNotifications{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetBackupVaultNotificationsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBackupVaultNotifications(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetBackupVaultNotifications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "backup", OperationName: "GetBackupVaultNotifications", } }