// Code generated by smithy-go-codegen DO NOT EDIT. package applicationinsights 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/applicationinsights/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Describes a workload and its configuration. func (c *Client) DescribeWorkload(ctx context.Context, params *DescribeWorkloadInput, optFns ...func(*Options)) (*DescribeWorkloadOutput, error) { if params == nil { params = &DescribeWorkloadInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeWorkload", params, optFns, c.addOperationDescribeWorkloadMiddlewares) if err != nil { return nil, err } out := result.(*DescribeWorkloadOutput) out.ResultMetadata = metadata return out, nil } type DescribeWorkloadInput struct { // The name of the component. // // This member is required. ComponentName *string // The name of the resource group. // // This member is required. ResourceGroupName *string // The ID of the workload. // // This member is required. WorkloadId *string // The AWS account ID for the workload owner. AccountId *string noSmithyDocumentSerde } type DescribeWorkloadOutput struct { // The configuration settings of the workload. The value is the escaped JSON of // the configuration. WorkloadConfiguration *types.WorkloadConfiguration // The ID of the workload. WorkloadId *string // If logging is supported for the resource type, shows whether the component has // configured logs to be monitored. WorkloadRemarks *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeWorkloadMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeWorkload{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeWorkload{}, 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 = addOpDescribeWorkloadValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWorkload(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_opDescribeWorkload(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "applicationinsights", OperationName: "DescribeWorkload", } }