1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package swf 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/swf/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Returns information about the specified domain, including description and 15// status. Access Control You can use IAM policies to control this action's access 16// to Amazon SWF resources as follows: 17// 18// * Use a Resource element with the domain 19// name to limit the action to only specified domains. 20// 21// * Use an Action element to 22// allow or deny permission to call this action. 23// 24// * You cannot use an IAM policy to 25// constrain this action's parameters. 26// 27// If the caller doesn't have sufficient 28// permissions to invoke the action, or the parameter values fall outside the 29// specified constraints, the action fails. The associated event attribute's cause 30// parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM 31// policies, see Using IAM to Manage Access to Amazon SWF Workflows 32// (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html) 33// in the Amazon SWF Developer Guide. 34func (c *Client) DescribeDomain(ctx context.Context, params *DescribeDomainInput, optFns ...func(*Options)) (*DescribeDomainOutput, error) { 35 if params == nil { 36 params = &DescribeDomainInput{} 37 } 38 39 result, metadata, err := c.invokeOperation(ctx, "DescribeDomain", params, optFns, addOperationDescribeDomainMiddlewares) 40 if err != nil { 41 return nil, err 42 } 43 44 out := result.(*DescribeDomainOutput) 45 out.ResultMetadata = metadata 46 return out, nil 47} 48 49type DescribeDomainInput struct { 50 51 // The name of the domain to describe. 52 // 53 // This member is required. 54 Name *string 55} 56 57// Contains details of a domain. 58type DescribeDomainOutput struct { 59 60 // The domain configuration. Currently, this includes only the domain's retention 61 // period. 62 // 63 // This member is required. 64 Configuration *types.DomainConfiguration 65 66 // The basic information about a domain, such as its name, status, and description. 67 // 68 // This member is required. 69 DomainInfo *types.DomainInfo 70 71 // Metadata pertaining to the operation's result. 72 ResultMetadata middleware.Metadata 73} 74 75func addOperationDescribeDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { 76 err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeDomain{}, middleware.After) 77 if err != nil { 78 return err 79 } 80 err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeDomain{}, middleware.After) 81 if err != nil { 82 return err 83 } 84 if err = addSetLoggerMiddleware(stack, options); err != nil { 85 return err 86 } 87 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 88 return err 89 } 90 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 91 return err 92 } 93 if err = addResolveEndpointMiddleware(stack, options); err != nil { 94 return err 95 } 96 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 97 return err 98 } 99 if err = addRetryMiddlewares(stack, options); err != nil { 100 return err 101 } 102 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 103 return err 104 } 105 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 106 return err 107 } 108 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 109 return err 110 } 111 if err = addClientUserAgent(stack); err != nil { 112 return err 113 } 114 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 115 return err 116 } 117 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 118 return err 119 } 120 if err = addOpDescribeDomainValidationMiddleware(stack); err != nil { 121 return err 122 } 123 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDomain(options.Region), middleware.Before); err != nil { 124 return err 125 } 126 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 127 return err 128 } 129 if err = addResponseErrorMiddleware(stack); err != nil { 130 return err 131 } 132 if err = addRequestResponseLogging(stack, options); err != nil { 133 return err 134 } 135 return nil 136} 137 138func newServiceMetadataMiddleware_opDescribeDomain(region string) *awsmiddleware.RegisterServiceMetadata { 139 return &awsmiddleware.RegisterServiceMetadata{ 140 Region: region, 141 ServiceID: ServiceID, 142 SigningName: "swf", 143 OperationName: "DescribeDomain", 144 } 145} 146