1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package lightsail 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/lightsail/types" 10 "github.com/aws/smithy-go/middleware" 11 smithyhttp "github.com/aws/smithy-go/transport/http" 12) 13 14// Creates a temporary set of log in credentials that you can use to log in to the 15// Docker process on your local machine. After you're logged in, you can use the 16// native Docker commands to push your local container images to the container 17// image registry of your Amazon Lightsail account so that you can use them with 18// your Lightsail container service. The log in credentials expire 12 hours after 19// they are created, at which point you will need to create a new set of log in 20// credentials. You can only push container images to the container service 21// registry of your Lightsail account. You cannot pull container images or perform 22// any other container image management actions on the container service registry. 23// After you push your container images to the container image registry of your 24// Lightsail account, use the RegisterContainerImage action to register the pushed 25// images to a specific Lightsail container service. This action is not required if 26// you install and use the Lightsail Control (lightsailctl) plugin to push 27// container images to your Lightsail container service. For more information, see 28// Pushing and managing container images on your Amazon Lightsail container 29// services 30// (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-pushing-container-images) 31// in the Lightsail Dev Guide. 32func (c *Client) CreateContainerServiceRegistryLogin(ctx context.Context, params *CreateContainerServiceRegistryLoginInput, optFns ...func(*Options)) (*CreateContainerServiceRegistryLoginOutput, error) { 33 if params == nil { 34 params = &CreateContainerServiceRegistryLoginInput{} 35 } 36 37 result, metadata, err := c.invokeOperation(ctx, "CreateContainerServiceRegistryLogin", params, optFns, addOperationCreateContainerServiceRegistryLoginMiddlewares) 38 if err != nil { 39 return nil, err 40 } 41 42 out := result.(*CreateContainerServiceRegistryLoginOutput) 43 out.ResultMetadata = metadata 44 return out, nil 45} 46 47type CreateContainerServiceRegistryLoginInput struct { 48} 49 50type CreateContainerServiceRegistryLoginOutput struct { 51 52 // An object that describes the log in information for the container service 53 // registry of your Lightsail account. 54 RegistryLogin *types.ContainerServiceRegistryLogin 55 56 // Metadata pertaining to the operation's result. 57 ResultMetadata middleware.Metadata 58} 59 60func addOperationCreateContainerServiceRegistryLoginMiddlewares(stack *middleware.Stack, options Options) (err error) { 61 err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateContainerServiceRegistryLogin{}, middleware.After) 62 if err != nil { 63 return err 64 } 65 err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateContainerServiceRegistryLogin{}, middleware.After) 66 if err != nil { 67 return err 68 } 69 if err = addSetLoggerMiddleware(stack, options); err != nil { 70 return err 71 } 72 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 73 return err 74 } 75 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 76 return err 77 } 78 if err = addResolveEndpointMiddleware(stack, options); err != nil { 79 return err 80 } 81 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 82 return err 83 } 84 if err = addRetryMiddlewares(stack, options); err != nil { 85 return err 86 } 87 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 88 return err 89 } 90 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 91 return err 92 } 93 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 94 return err 95 } 96 if err = addClientUserAgent(stack); err != nil { 97 return err 98 } 99 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 100 return err 101 } 102 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 103 return err 104 } 105 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContainerServiceRegistryLogin(options.Region), middleware.Before); err != nil { 106 return err 107 } 108 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 109 return err 110 } 111 if err = addResponseErrorMiddleware(stack); err != nil { 112 return err 113 } 114 if err = addRequestResponseLogging(stack, options); err != nil { 115 return err 116 } 117 return nil 118} 119 120func newServiceMetadataMiddleware_opCreateContainerServiceRegistryLogin(region string) *awsmiddleware.RegisterServiceMetadata { 121 return &awsmiddleware.RegisterServiceMetadata{ 122 Region: region, 123 ServiceID: ServiceID, 124 SigningName: "lightsail", 125 OperationName: "CreateContainerServiceRegistryLogin", 126 } 127} 128