1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package robomaker 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/robomaker/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12 "time" 13) 14 15// Describes a simulation job batch. 16func (c *Client) DescribeSimulationJobBatch(ctx context.Context, params *DescribeSimulationJobBatchInput, optFns ...func(*Options)) (*DescribeSimulationJobBatchOutput, error) { 17 if params == nil { 18 params = &DescribeSimulationJobBatchInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "DescribeSimulationJobBatch", params, optFns, addOperationDescribeSimulationJobBatchMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*DescribeSimulationJobBatchOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29} 30 31type DescribeSimulationJobBatchInput struct { 32 33 // The id of the batch to describe. 34 // 35 // This member is required. 36 Batch *string 37} 38 39type DescribeSimulationJobBatchOutput struct { 40 41 // The Amazon Resource Name (ARN) of the batch. 42 Arn *string 43 44 // The batch policy. 45 BatchPolicy *types.BatchPolicy 46 47 // Unique, case-sensitive identifier that you provide to ensure the idempotency of 48 // the request. 49 ClientRequestToken *string 50 51 // The time, in milliseconds since the epoch, when the simulation job batch was 52 // created. 53 CreatedAt *time.Time 54 55 // A list of created simulation job summaries. 56 CreatedRequests []types.SimulationJobSummary 57 58 // A list of failed create simulation job requests. The request failed to be 59 // created into a simulation job. Failed requests do not have a simulation job ID. 60 FailedRequests []types.FailedCreateSimulationJobRequest 61 62 // The failure code of the simulation job batch. 63 FailureCode types.SimulationJobBatchErrorCode 64 65 // The reason the simulation job batch failed. 66 FailureReason *string 67 68 // The time, in milliseconds since the epoch, when the simulation job batch was 69 // last updated. 70 LastUpdatedAt *time.Time 71 72 // A list of pending simulation job requests. These requests have not yet been 73 // created into simulation jobs. 74 PendingRequests []types.SimulationJobRequest 75 76 // The status of the batch. Pending The simulation job batch request is pending. 77 // InProgress The simulation job batch is in progress. Failed The simulation job 78 // batch failed. One or more simulation job requests could not be completed due to 79 // an internal failure (like InternalServiceError). See failureCode and 80 // failureReason for more information. Completed The simulation batch job 81 // completed. A batch is complete when (1) there are no pending simulation job 82 // requests in the batch and none of the failed simulation job requests are due to 83 // InternalServiceError and (2) when all created simulation jobs have reached a 84 // terminal state (for example, Completed or Failed). Canceled The simulation batch 85 // job was cancelled. Canceling The simulation batch job is being cancelled. 86 // Completing The simulation batch job is completing. TimingOut The simulation job 87 // batch is timing out. If a batch timing out, and there are pending requests that 88 // were failing due to an internal failure (like InternalServiceError), the batch 89 // status will be Failed. If there are no such failing request, the batch status 90 // will be TimedOut. TimedOut The simulation batch job timed out. 91 Status types.SimulationJobBatchStatus 92 93 // A map that contains tag keys and tag values that are attached to the simulation 94 // job batch. 95 Tags map[string]string 96 97 // Metadata pertaining to the operation's result. 98 ResultMetadata middleware.Metadata 99} 100 101func addOperationDescribeSimulationJobBatchMiddlewares(stack *middleware.Stack, options Options) (err error) { 102 err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeSimulationJobBatch{}, middleware.After) 103 if err != nil { 104 return err 105 } 106 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeSimulationJobBatch{}, middleware.After) 107 if err != nil { 108 return err 109 } 110 if err = addSetLoggerMiddleware(stack, options); err != nil { 111 return err 112 } 113 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 114 return err 115 } 116 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 117 return err 118 } 119 if err = addResolveEndpointMiddleware(stack, options); err != nil { 120 return err 121 } 122 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 123 return err 124 } 125 if err = addRetryMiddlewares(stack, options); err != nil { 126 return err 127 } 128 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 129 return err 130 } 131 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 132 return err 133 } 134 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 135 return err 136 } 137 if err = addClientUserAgent(stack); err != nil { 138 return err 139 } 140 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 141 return err 142 } 143 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 144 return err 145 } 146 if err = addOpDescribeSimulationJobBatchValidationMiddleware(stack); err != nil { 147 return err 148 } 149 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSimulationJobBatch(options.Region), middleware.Before); err != nil { 150 return err 151 } 152 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 153 return err 154 } 155 if err = addResponseErrorMiddleware(stack); err != nil { 156 return err 157 } 158 if err = addRequestResponseLogging(stack, options); err != nil { 159 return err 160 } 161 return nil 162} 163 164func newServiceMetadataMiddleware_opDescribeSimulationJobBatch(region string) *awsmiddleware.RegisterServiceMetadata { 165 return &awsmiddleware.RegisterServiceMetadata{ 166 Region: region, 167 ServiceID: ServiceID, 168 SigningName: "robomaker", 169 OperationName: "DescribeSimulationJobBatch", 170 } 171} 172