// Code generated by smithy-go-codegen DO NOT EDIT. package codestar 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/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Creates a profile for a user that includes user preferences, such as the // display name and email address assocciated with the user, in AWS CodeStar. The // user profile is not project-specific. Information in the user profile is // displayed wherever the user's information appears to other users in AWS // CodeStar. func (c *Client) CreateUserProfile(ctx context.Context, params *CreateUserProfileInput, optFns ...func(*Options)) (*CreateUserProfileOutput, error) { if params == nil { params = &CreateUserProfileInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateUserProfile", params, optFns, c.addOperationCreateUserProfileMiddlewares) if err != nil { return nil, err } out := result.(*CreateUserProfileOutput) out.ResultMetadata = metadata return out, nil } type CreateUserProfileInput struct { // The name that will be displayed as the friendly name for the user in AWS // CodeStar. // // This member is required. DisplayName *string // The email address that will be displayed as part of the user's profile in AWS // CodeStar. // // This member is required. EmailAddress *string // The Amazon Resource Name (ARN) of the user in IAM. // // This member is required. UserArn *string // The SSH public key associated with the user in AWS CodeStar. If a project owner // allows the user remote access to project resources, this public key will be used // along with the user's private key for SSH access. SshPublicKey *string noSmithyDocumentSerde } type CreateUserProfileOutput struct { // The Amazon Resource Name (ARN) of the user in IAM. // // This member is required. UserArn *string // The date the user profile was created, in timestamp format. CreatedTimestamp *time.Time // The name that is displayed as the friendly name for the user in AWS CodeStar. DisplayName *string // The email address that is displayed as part of the user's profile in AWS // CodeStar. EmailAddress *string // The date the user profile was last modified, in timestamp format. LastModifiedTimestamp *time.Time // The SSH public key associated with the user in AWS CodeStar. This is the public // portion of the public/private keypair the user can use to access project // resources if a project owner allows the user remote access to those resources. SshPublicKey *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateUserProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateUserProfile{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateUserProfile{}, 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 = addOpCreateUserProfileValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUserProfile(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_opCreateUserProfile(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "codestar", OperationName: "CreateUserProfile", } }