1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package backup 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/backup/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12 "time" 13) 14 15// Returns backup job details for the specified BackupJobId. 16func (c *Client) DescribeBackupJob(ctx context.Context, params *DescribeBackupJobInput, optFns ...func(*Options)) (*DescribeBackupJobOutput, error) { 17 if params == nil { 18 params = &DescribeBackupJobInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "DescribeBackupJob", params, optFns, addOperationDescribeBackupJobMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*DescribeBackupJobOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29} 30 31type DescribeBackupJobInput struct { 32 33 // Uniquely identifies a request to AWS Backup to back up a resource. 34 // 35 // This member is required. 36 BackupJobId *string 37} 38 39type DescribeBackupJobOutput struct { 40 41 // Returns the account ID that owns the backup job. 42 AccountId *string 43 44 // Uniquely identifies a request to AWS Backup to back up a resource. 45 BackupJobId *string 46 47 // Represents the options specified as part of backup plan or on-demand backup job. 48 BackupOptions map[string]string 49 50 // The size, in bytes, of a backup. 51 BackupSizeInBytes *int64 52 53 // Represents the actual backup type selected for a backup job. For example, if a 54 // successful WindowsVSS backup was taken, BackupType returns "WindowsVSS". If 55 // BackupType is empty, then the backup type that was is a regular backup. 56 BackupType *string 57 58 // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for 59 // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. 60 BackupVaultArn *string 61 62 // The name of a logical container where backups are stored. Backup vaults are 63 // identified by names that are unique to the account used to create them and the 64 // AWS Region where they are created. They consist of lowercase letters, numbers, 65 // and hyphens. 66 BackupVaultName *string 67 68 // The size in bytes transferred to a backup vault at the time that the job status 69 // was queried. 70 BytesTransferred *int64 71 72 // The date and time that a job to create a backup job is completed, in Unix format 73 // and Coordinated Universal Time (UTC). The value of CompletionDate is accurate to 74 // milliseconds. For example, the value 1516925490.087 represents Friday, January 75 // 26, 2018 12:11:30.087 AM. 76 CompletionDate *time.Time 77 78 // Contains identifying information about the creation of a backup job, including 79 // the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the 80 // backup plan that is used to create it. 81 CreatedBy *types.RecoveryPointCreator 82 83 // The date and time that a backup job is created, in Unix format and Coordinated 84 // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For 85 // example, the value 1516925490.087 represents Friday, January 26, 2018 86 // 12:11:30.087 AM. 87 CreationDate *time.Time 88 89 // The date and time that a job to back up resources is expected to be completed, 90 // in Unix format and Coordinated Universal Time (UTC). The value of 91 // ExpectedCompletionDate is accurate to milliseconds. For example, the value 92 // 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. 93 ExpectedCompletionDate *time.Time 94 95 // Specifies the IAM role ARN used to create the target recovery point; for 96 // example, arn:aws:iam::123456789012:role/S3Access. 97 IamRoleArn *string 98 99 // Contains an estimated percentage that is complete of a job at the time the job 100 // status was queried. 101 PercentDone *string 102 103 // An ARN that uniquely identifies a recovery point; for example, 104 // arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. 105 RecoveryPointArn *string 106 107 // An ARN that uniquely identifies a saved resource. The format of the ARN depends 108 // on the resource type. 109 ResourceArn *string 110 111 // The type of AWS resource to be backed up; for example, an Amazon Elastic Block 112 // Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) 113 // database. 114 ResourceType *string 115 116 // Specifies the time in Unix format and Coordinated Universal Time (UTC) when a 117 // backup job must be started before it is canceled. The value is calculated by 118 // adding the start window to the scheduled time. So if the scheduled time were 119 // 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00 PM on 120 // the date specified. The value of StartBy is accurate to milliseconds. For 121 // example, the value 1516925490.087 represents Friday, January 26, 2018 122 // 12:11:30.087 AM. 123 StartBy *time.Time 124 125 // The current state of a resource recovery point. 126 State types.BackupJobState 127 128 // A detailed message explaining the status of the job to back up a resource. 129 StatusMessage *string 130 131 // Metadata pertaining to the operation's result. 132 ResultMetadata middleware.Metadata 133} 134 135func addOperationDescribeBackupJobMiddlewares(stack *middleware.Stack, options Options) (err error) { 136 err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeBackupJob{}, middleware.After) 137 if err != nil { 138 return err 139 } 140 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeBackupJob{}, middleware.After) 141 if err != nil { 142 return err 143 } 144 if err = addSetLoggerMiddleware(stack, options); err != nil { 145 return err 146 } 147 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 148 return err 149 } 150 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 151 return err 152 } 153 if err = addResolveEndpointMiddleware(stack, options); err != nil { 154 return err 155 } 156 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 157 return err 158 } 159 if err = addRetryMiddlewares(stack, options); err != nil { 160 return err 161 } 162 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 163 return err 164 } 165 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 166 return err 167 } 168 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 169 return err 170 } 171 if err = addClientUserAgent(stack); err != nil { 172 return err 173 } 174 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 175 return err 176 } 177 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 178 return err 179 } 180 if err = addOpDescribeBackupJobValidationMiddleware(stack); err != nil { 181 return err 182 } 183 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBackupJob(options.Region), middleware.Before); err != nil { 184 return err 185 } 186 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 187 return err 188 } 189 if err = addResponseErrorMiddleware(stack); err != nil { 190 return err 191 } 192 if err = addRequestResponseLogging(stack, options); err != nil { 193 return err 194 } 195 return nil 196} 197 198func newServiceMetadataMiddleware_opDescribeBackupJob(region string) *awsmiddleware.RegisterServiceMetadata { 199 return &awsmiddleware.RegisterServiceMetadata{ 200 Region: region, 201 ServiceID: ServiceID, 202 SigningName: "backup", 203 OperationName: "DescribeBackupJob", 204 } 205} 206