// Code generated by smithy-go-codegen DO NOT EDIT. package servicecatalogappregistry 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/servicecatalogappregistry/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Retrieves metadata information about one of your applications. The application // can be specified by its ARN, ID, or name (which is unique within one account in // one region at a given point in time). Specify by ARN or ID in automated // workflows if you want to make sure that the exact same application is returned // or a ResourceNotFoundException is thrown, avoiding the ABA addressing problem. func (c *Client) GetApplication(ctx context.Context, params *GetApplicationInput, optFns ...func(*Options)) (*GetApplicationOutput, error) { if params == nil { params = &GetApplicationInput{} } result, metadata, err := c.invokeOperation(ctx, "GetApplication", params, optFns, c.addOperationGetApplicationMiddlewares) if err != nil { return nil, err } out := result.(*GetApplicationOutput) out.ResultMetadata = metadata return out, nil } type GetApplicationInput struct { // The name, ID, or ARN of the application. // // This member is required. Application *string noSmithyDocumentSerde } type GetApplicationOutput struct { // The Amazon resource name (ARN) that specifies the application across services. Arn *string // The number of top-level resources that were registered as part of this // application. AssociatedResourceCount int32 // The ISO-8601 formatted timestamp of the moment when the application was created. CreationTime *time.Time // The description of the application. Description *string // The identifier of the application. Id *string // The information about the integration of the application with other services, // such as Resource Groups. Integrations *types.Integrations // The ISO-8601 formatted timestamp of the moment when the application was last // updated. LastUpdateTime *time.Time // The name of the application. The name must be unique in the region in which you // are creating the application. Name *string // Key-value pairs associated with the application. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetApplication{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetApplication{}, 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 = addOpGetApplicationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApplication(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_opGetApplication(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "servicecatalog", OperationName: "GetApplication", } }