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. 16func (c *Client) DescribeSimulationJob(ctx context.Context, params *DescribeSimulationJobInput, optFns ...func(*Options)) (*DescribeSimulationJobOutput, error) { 17 if params == nil { 18 params = &DescribeSimulationJobInput{} 19 } 20 21 result, metadata, err := c.invokeOperation(ctx, "DescribeSimulationJob", params, optFns, addOperationDescribeSimulationJobMiddlewares) 22 if err != nil { 23 return nil, err 24 } 25 26 out := result.(*DescribeSimulationJobOutput) 27 out.ResultMetadata = metadata 28 return out, nil 29} 30 31type DescribeSimulationJobInput struct { 32 33 // The Amazon Resource Name (ARN) of the simulation job to be described. 34 // 35 // This member is required. 36 Job *string 37} 38 39type DescribeSimulationJobOutput struct { 40 41 // The Amazon Resource Name (ARN) of the simulation job. 42 Arn *string 43 44 // Unique, case-sensitive identifier that you provide to ensure the idempotency of 45 // the request. 46 ClientRequestToken *string 47 48 // Compute information for the simulation job. 49 Compute *types.ComputeResponse 50 51 // The data sources for the simulation job. 52 DataSources []types.DataSource 53 54 // The failure behavior for the simulation job. 55 FailureBehavior types.FailureBehavior 56 57 // The failure code of the simulation job if it failed: InternalServiceError 58 // Internal service error. RobotApplicationCrash Robot application exited 59 // abnormally. SimulationApplicationCrash Simulation application exited abnormally. 60 // BadPermissionsRobotApplication Robot application bundle could not be downloaded. 61 // BadPermissionsSimulationApplication Simulation application bundle could not be 62 // downloaded. BadPermissionsS3Output Unable to publish outputs to 63 // customer-provided S3 bucket. BadPermissionsCloudwatchLogs Unable to publish logs 64 // to customer-provided CloudWatch Logs resource. SubnetIpLimitExceeded Subnet IP 65 // limit exceeded. ENILimitExceeded ENI limit exceeded. 66 // BadPermissionsUserCredentials Unable to use the Role provided. 67 // InvalidBundleRobotApplication Robot bundle cannot be extracted (invalid format, 68 // bundling error, or other issue). InvalidBundleSimulationApplication Simulation 69 // bundle cannot be extracted (invalid format, bundling error, or other issue). 70 // RobotApplicationVersionMismatchedEtag Etag for RobotApplication does not match 71 // value during version creation. SimulationApplicationVersionMismatchedEtag Etag 72 // for SimulationApplication does not match value during version creation. 73 FailureCode types.SimulationJobErrorCode 74 75 // Details about why the simulation job failed. For more information about 76 // troubleshooting, see Troubleshooting 77 // (https://docs.aws.amazon.com/robomaker/latest/dg/troubleshooting.html). 78 FailureReason *string 79 80 // The IAM role that allows the simulation instance to call the AWS APIs that are 81 // specified in its associated policies on your behalf. 82 IamRole *string 83 84 // The time, in milliseconds since the epoch, when the simulation job was last 85 // started. 86 LastStartedAt *time.Time 87 88 // The time, in milliseconds since the epoch, when the simulation job was last 89 // updated. 90 LastUpdatedAt *time.Time 91 92 // The logging configuration. 93 LoggingConfig *types.LoggingConfig 94 95 // The maximum job duration in seconds. The value must be 8 days (691,200 seconds) 96 // or less. 97 MaxJobDurationInSeconds int64 98 99 // The name of the simulation job. 100 Name *string 101 102 // The network interface information for the simulation job. 103 NetworkInterface *types.NetworkInterface 104 105 // Location for output files generated by the simulation job. 106 OutputLocation *types.OutputLocation 107 108 // A list of robot applications. 109 RobotApplications []types.RobotApplicationConfig 110 111 // A list of simulation applications. 112 SimulationApplications []types.SimulationApplicationConfig 113 114 // The simulation job execution duration in milliseconds. 115 SimulationTimeMillis int64 116 117 // The status of the simulation job. 118 Status types.SimulationJobStatus 119 120 // The list of all tags added to the specified simulation job. 121 Tags map[string]string 122 123 // The VPC configuration. 124 VpcConfig *types.VPCConfigResponse 125 126 // Metadata pertaining to the operation's result. 127 ResultMetadata middleware.Metadata 128} 129 130func addOperationDescribeSimulationJobMiddlewares(stack *middleware.Stack, options Options) (err error) { 131 err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeSimulationJob{}, middleware.After) 132 if err != nil { 133 return err 134 } 135 err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeSimulationJob{}, middleware.After) 136 if err != nil { 137 return err 138 } 139 if err = addSetLoggerMiddleware(stack, options); err != nil { 140 return err 141 } 142 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 143 return err 144 } 145 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 146 return err 147 } 148 if err = addResolveEndpointMiddleware(stack, options); err != nil { 149 return err 150 } 151 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 152 return err 153 } 154 if err = addRetryMiddlewares(stack, options); err != nil { 155 return err 156 } 157 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 158 return err 159 } 160 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 161 return err 162 } 163 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 164 return err 165 } 166 if err = addClientUserAgent(stack); err != nil { 167 return err 168 } 169 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 170 return err 171 } 172 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 173 return err 174 } 175 if err = addOpDescribeSimulationJobValidationMiddleware(stack); err != nil { 176 return err 177 } 178 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSimulationJob(options.Region), middleware.Before); err != nil { 179 return err 180 } 181 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 182 return err 183 } 184 if err = addResponseErrorMiddleware(stack); err != nil { 185 return err 186 } 187 if err = addRequestResponseLogging(stack, options); err != nil { 188 return err 189 } 190 return nil 191} 192 193func newServiceMetadataMiddleware_opDescribeSimulationJob(region string) *awsmiddleware.RegisterServiceMetadata { 194 return &awsmiddleware.RegisterServiceMetadata{ 195 Region: region, 196 ServiceID: ServiceID, 197 SigningName: "robomaker", 198 OperationName: "DescribeSimulationJob", 199 } 200} 201