/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Lambda { namespace Model { /** */ class UpdateFunctionCodeRequest : public LambdaRequest { public: AWS_LAMBDA_API UpdateFunctionCodeRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "UpdateFunctionCode"; } AWS_LAMBDA_API Aws::String SerializePayload() const override; /** *

The name of the Lambda function.

Name formats *

  • Function namemy-function.

  • *
  • Function ARN – * arn:aws:lambda:us-west-2:123456789012:function:my-function.

    *
  • Partial ARN – * 123456789012:function:my-function.

The length * constraint applies only to the full ARN. If you specify only the function name, * it is limited to 64 characters in length.

*/ inline const Aws::String& GetFunctionName() const{ return m_functionName; } /** *

The name of the Lambda function.

Name formats *

  • Function namemy-function.

  • *
  • Function ARN – * arn:aws:lambda:us-west-2:123456789012:function:my-function.

    *
  • Partial ARN – * 123456789012:function:my-function.

The length * constraint applies only to the full ARN. If you specify only the function name, * it is limited to 64 characters in length.

*/ inline bool FunctionNameHasBeenSet() const { return m_functionNameHasBeenSet; } /** *

The name of the Lambda function.

Name formats *

  • Function namemy-function.

  • *
  • Function ARN – * arn:aws:lambda:us-west-2:123456789012:function:my-function.

    *
  • Partial ARN – * 123456789012:function:my-function.

The length * constraint applies only to the full ARN. If you specify only the function name, * it is limited to 64 characters in length.

*/ inline void SetFunctionName(const Aws::String& value) { m_functionNameHasBeenSet = true; m_functionName = value; } /** *

The name of the Lambda function.

Name formats *

  • Function namemy-function.

  • *
  • Function ARN – * arn:aws:lambda:us-west-2:123456789012:function:my-function.

    *
  • Partial ARN – * 123456789012:function:my-function.

The length * constraint applies only to the full ARN. If you specify only the function name, * it is limited to 64 characters in length.

*/ inline void SetFunctionName(Aws::String&& value) { m_functionNameHasBeenSet = true; m_functionName = std::move(value); } /** *

The name of the Lambda function.

Name formats *

  • Function namemy-function.

  • *
  • Function ARN – * arn:aws:lambda:us-west-2:123456789012:function:my-function.

    *
  • Partial ARN – * 123456789012:function:my-function.

The length * constraint applies only to the full ARN. If you specify only the function name, * it is limited to 64 characters in length.

*/ inline void SetFunctionName(const char* value) { m_functionNameHasBeenSet = true; m_functionName.assign(value); } /** *

The name of the Lambda function.

Name formats *

  • Function namemy-function.

  • *
  • Function ARN – * arn:aws:lambda:us-west-2:123456789012:function:my-function.

    *
  • Partial ARN – * 123456789012:function:my-function.

The length * constraint applies only to the full ARN. If you specify only the function name, * it is limited to 64 characters in length.

*/ inline UpdateFunctionCodeRequest& WithFunctionName(const Aws::String& value) { SetFunctionName(value); return *this;} /** *

The name of the Lambda function.

Name formats *

  • Function namemy-function.

  • *
  • Function ARN – * arn:aws:lambda:us-west-2:123456789012:function:my-function.

    *
  • Partial ARN – * 123456789012:function:my-function.

The length * constraint applies only to the full ARN. If you specify only the function name, * it is limited to 64 characters in length.

*/ inline UpdateFunctionCodeRequest& WithFunctionName(Aws::String&& value) { SetFunctionName(std::move(value)); return *this;} /** *

The name of the Lambda function.

Name formats *

  • Function namemy-function.

  • *
  • Function ARN – * arn:aws:lambda:us-west-2:123456789012:function:my-function.

    *
  • Partial ARN – * 123456789012:function:my-function.

The length * constraint applies only to the full ARN. If you specify only the function name, * it is limited to 64 characters in length.

*/ inline UpdateFunctionCodeRequest& WithFunctionName(const char* value) { SetFunctionName(value); return *this;} /** *

The base64-encoded contents of the deployment package. Amazon Web Services * SDK and CLI clients handle the encoding for you. Use only with a function * defined with a .zip file archive deployment package.

*/ inline const Aws::Utils::CryptoBuffer& GetZipFile() const{ return m_zipFile; } /** *

The base64-encoded contents of the deployment package. Amazon Web Services * SDK and CLI clients handle the encoding for you. Use only with a function * defined with a .zip file archive deployment package.

*/ inline bool ZipFileHasBeenSet() const { return m_zipFileHasBeenSet; } /** *

The base64-encoded contents of the deployment package. Amazon Web Services * SDK and CLI clients handle the encoding for you. Use only with a function * defined with a .zip file archive deployment package.

*/ inline void SetZipFile(const Aws::Utils::CryptoBuffer& value) { m_zipFileHasBeenSet = true; m_zipFile = value; } /** *

The base64-encoded contents of the deployment package. Amazon Web Services * SDK and CLI clients handle the encoding for you. Use only with a function * defined with a .zip file archive deployment package.

*/ inline void SetZipFile(Aws::Utils::CryptoBuffer&& value) { m_zipFileHasBeenSet = true; m_zipFile = std::move(value); } /** *

The base64-encoded contents of the deployment package. Amazon Web Services * SDK and CLI clients handle the encoding for you. Use only with a function * defined with a .zip file archive deployment package.

*/ inline UpdateFunctionCodeRequest& WithZipFile(const Aws::Utils::CryptoBuffer& value) { SetZipFile(value); return *this;} /** *

The base64-encoded contents of the deployment package. Amazon Web Services * SDK and CLI clients handle the encoding for you. Use only with a function * defined with a .zip file archive deployment package.

*/ inline UpdateFunctionCodeRequest& WithZipFile(Aws::Utils::CryptoBuffer&& value) { SetZipFile(std::move(value)); return *this;} /** *

An Amazon S3 bucket in the same Amazon Web Services Region as your function. * The bucket can be in a different Amazon Web Services account. Use only with a * function defined with a .zip file archive deployment package.

*/ inline const Aws::String& GetS3Bucket() const{ return m_s3Bucket; } /** *

An Amazon S3 bucket in the same Amazon Web Services Region as your function. * The bucket can be in a different Amazon Web Services account. Use only with a * function defined with a .zip file archive deployment package.

*/ inline bool S3BucketHasBeenSet() const { return m_s3BucketHasBeenSet; } /** *

An Amazon S3 bucket in the same Amazon Web Services Region as your function. * The bucket can be in a different Amazon Web Services account. Use only with a * function defined with a .zip file archive deployment package.

*/ inline void SetS3Bucket(const Aws::String& value) { m_s3BucketHasBeenSet = true; m_s3Bucket = value; } /** *

An Amazon S3 bucket in the same Amazon Web Services Region as your function. * The bucket can be in a different Amazon Web Services account. Use only with a * function defined with a .zip file archive deployment package.

*/ inline void SetS3Bucket(Aws::String&& value) { m_s3BucketHasBeenSet = true; m_s3Bucket = std::move(value); } /** *

An Amazon S3 bucket in the same Amazon Web Services Region as your function. * The bucket can be in a different Amazon Web Services account. Use only with a * function defined with a .zip file archive deployment package.

*/ inline void SetS3Bucket(const char* value) { m_s3BucketHasBeenSet = true; m_s3Bucket.assign(value); } /** *

An Amazon S3 bucket in the same Amazon Web Services Region as your function. * The bucket can be in a different Amazon Web Services account. Use only with a * function defined with a .zip file archive deployment package.

*/ inline UpdateFunctionCodeRequest& WithS3Bucket(const Aws::String& value) { SetS3Bucket(value); return *this;} /** *

An Amazon S3 bucket in the same Amazon Web Services Region as your function. * The bucket can be in a different Amazon Web Services account. Use only with a * function defined with a .zip file archive deployment package.

*/ inline UpdateFunctionCodeRequest& WithS3Bucket(Aws::String&& value) { SetS3Bucket(std::move(value)); return *this;} /** *

An Amazon S3 bucket in the same Amazon Web Services Region as your function. * The bucket can be in a different Amazon Web Services account. Use only with a * function defined with a .zip file archive deployment package.

*/ inline UpdateFunctionCodeRequest& WithS3Bucket(const char* value) { SetS3Bucket(value); return *this;} /** *

The Amazon S3 key of the deployment package. Use only with a function defined * with a .zip file archive deployment package.

*/ inline const Aws::String& GetS3Key() const{ return m_s3Key; } /** *

The Amazon S3 key of the deployment package. Use only with a function defined * with a .zip file archive deployment package.

*/ inline bool S3KeyHasBeenSet() const { return m_s3KeyHasBeenSet; } /** *

The Amazon S3 key of the deployment package. Use only with a function defined * with a .zip file archive deployment package.

*/ inline void SetS3Key(const Aws::String& value) { m_s3KeyHasBeenSet = true; m_s3Key = value; } /** *

The Amazon S3 key of the deployment package. Use only with a function defined * with a .zip file archive deployment package.

*/ inline void SetS3Key(Aws::String&& value) { m_s3KeyHasBeenSet = true; m_s3Key = std::move(value); } /** *

The Amazon S3 key of the deployment package. Use only with a function defined * with a .zip file archive deployment package.

*/ inline void SetS3Key(const char* value) { m_s3KeyHasBeenSet = true; m_s3Key.assign(value); } /** *

The Amazon S3 key of the deployment package. Use only with a function defined * with a .zip file archive deployment package.

*/ inline UpdateFunctionCodeRequest& WithS3Key(const Aws::String& value) { SetS3Key(value); return *this;} /** *

The Amazon S3 key of the deployment package. Use only with a function defined * with a .zip file archive deployment package.

*/ inline UpdateFunctionCodeRequest& WithS3Key(Aws::String&& value) { SetS3Key(std::move(value)); return *this;} /** *

The Amazon S3 key of the deployment package. Use only with a function defined * with a .zip file archive deployment package.

*/ inline UpdateFunctionCodeRequest& WithS3Key(const char* value) { SetS3Key(value); return *this;} /** *

For versioned objects, the version of the deployment package object to * use.

*/ inline const Aws::String& GetS3ObjectVersion() const{ return m_s3ObjectVersion; } /** *

For versioned objects, the version of the deployment package object to * use.

*/ inline bool S3ObjectVersionHasBeenSet() const { return m_s3ObjectVersionHasBeenSet; } /** *

For versioned objects, the version of the deployment package object to * use.

*/ inline void SetS3ObjectVersion(const Aws::String& value) { m_s3ObjectVersionHasBeenSet = true; m_s3ObjectVersion = value; } /** *

For versioned objects, the version of the deployment package object to * use.

*/ inline void SetS3ObjectVersion(Aws::String&& value) { m_s3ObjectVersionHasBeenSet = true; m_s3ObjectVersion = std::move(value); } /** *

For versioned objects, the version of the deployment package object to * use.

*/ inline void SetS3ObjectVersion(const char* value) { m_s3ObjectVersionHasBeenSet = true; m_s3ObjectVersion.assign(value); } /** *

For versioned objects, the version of the deployment package object to * use.

*/ inline UpdateFunctionCodeRequest& WithS3ObjectVersion(const Aws::String& value) { SetS3ObjectVersion(value); return *this;} /** *

For versioned objects, the version of the deployment package object to * use.

*/ inline UpdateFunctionCodeRequest& WithS3ObjectVersion(Aws::String&& value) { SetS3ObjectVersion(std::move(value)); return *this;} /** *

For versioned objects, the version of the deployment package object to * use.

*/ inline UpdateFunctionCodeRequest& WithS3ObjectVersion(const char* value) { SetS3ObjectVersion(value); return *this;} /** *

URI of a container image in the Amazon ECR registry. Do not use for a * function defined with a .zip file archive.

*/ inline const Aws::String& GetImageUri() const{ return m_imageUri; } /** *

URI of a container image in the Amazon ECR registry. Do not use for a * function defined with a .zip file archive.

*/ inline bool ImageUriHasBeenSet() const { return m_imageUriHasBeenSet; } /** *

URI of a container image in the Amazon ECR registry. Do not use for a * function defined with a .zip file archive.

*/ inline void SetImageUri(const Aws::String& value) { m_imageUriHasBeenSet = true; m_imageUri = value; } /** *

URI of a container image in the Amazon ECR registry. Do not use for a * function defined with a .zip file archive.

*/ inline void SetImageUri(Aws::String&& value) { m_imageUriHasBeenSet = true; m_imageUri = std::move(value); } /** *

URI of a container image in the Amazon ECR registry. Do not use for a * function defined with a .zip file archive.

*/ inline void SetImageUri(const char* value) { m_imageUriHasBeenSet = true; m_imageUri.assign(value); } /** *

URI of a container image in the Amazon ECR registry. Do not use for a * function defined with a .zip file archive.

*/ inline UpdateFunctionCodeRequest& WithImageUri(const Aws::String& value) { SetImageUri(value); return *this;} /** *

URI of a container image in the Amazon ECR registry. Do not use for a * function defined with a .zip file archive.

*/ inline UpdateFunctionCodeRequest& WithImageUri(Aws::String&& value) { SetImageUri(std::move(value)); return *this;} /** *

URI of a container image in the Amazon ECR registry. Do not use for a * function defined with a .zip file archive.

*/ inline UpdateFunctionCodeRequest& WithImageUri(const char* value) { SetImageUri(value); return *this;} /** *

Set to true to publish a new version of the function after updating the code. * This has the same effect as calling PublishVersion separately.

*/ inline bool GetPublish() const{ return m_publish; } /** *

Set to true to publish a new version of the function after updating the code. * This has the same effect as calling PublishVersion separately.

*/ inline bool PublishHasBeenSet() const { return m_publishHasBeenSet; } /** *

Set to true to publish a new version of the function after updating the code. * This has the same effect as calling PublishVersion separately.

*/ inline void SetPublish(bool value) { m_publishHasBeenSet = true; m_publish = value; } /** *

Set to true to publish a new version of the function after updating the code. * This has the same effect as calling PublishVersion separately.

*/ inline UpdateFunctionCodeRequest& WithPublish(bool value) { SetPublish(value); return *this;} /** *

Set to true to validate the request parameters and access permissions without * modifying the function code.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Set to true to validate the request parameters and access permissions without * modifying the function code.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Set to true to validate the request parameters and access permissions without * modifying the function code.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Set to true to validate the request parameters and access permissions without * modifying the function code.

*/ inline UpdateFunctionCodeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

Update the function only if the revision ID matches the ID that's specified. * Use this option to avoid modifying a function that has changed since you last * read it.

*/ inline const Aws::String& GetRevisionId() const{ return m_revisionId; } /** *

Update the function only if the revision ID matches the ID that's specified. * Use this option to avoid modifying a function that has changed since you last * read it.

*/ inline bool RevisionIdHasBeenSet() const { return m_revisionIdHasBeenSet; } /** *

Update the function only if the revision ID matches the ID that's specified. * Use this option to avoid modifying a function that has changed since you last * read it.

*/ inline void SetRevisionId(const Aws::String& value) { m_revisionIdHasBeenSet = true; m_revisionId = value; } /** *

Update the function only if the revision ID matches the ID that's specified. * Use this option to avoid modifying a function that has changed since you last * read it.

*/ inline void SetRevisionId(Aws::String&& value) { m_revisionIdHasBeenSet = true; m_revisionId = std::move(value); } /** *

Update the function only if the revision ID matches the ID that's specified. * Use this option to avoid modifying a function that has changed since you last * read it.

*/ inline void SetRevisionId(const char* value) { m_revisionIdHasBeenSet = true; m_revisionId.assign(value); } /** *

Update the function only if the revision ID matches the ID that's specified. * Use this option to avoid modifying a function that has changed since you last * read it.

*/ inline UpdateFunctionCodeRequest& WithRevisionId(const Aws::String& value) { SetRevisionId(value); return *this;} /** *

Update the function only if the revision ID matches the ID that's specified. * Use this option to avoid modifying a function that has changed since you last * read it.

*/ inline UpdateFunctionCodeRequest& WithRevisionId(Aws::String&& value) { SetRevisionId(std::move(value)); return *this;} /** *

Update the function only if the revision ID matches the ID that's specified. * Use this option to avoid modifying a function that has changed since you last * read it.

*/ inline UpdateFunctionCodeRequest& WithRevisionId(const char* value) { SetRevisionId(value); return *this;} /** *

The instruction set architecture that the function supports. Enter a string * array with one of the valid values (arm64 or x86_64). The default value is * x86_64.

*/ inline const Aws::Vector& GetArchitectures() const{ return m_architectures; } /** *

The instruction set architecture that the function supports. Enter a string * array with one of the valid values (arm64 or x86_64). The default value is * x86_64.

*/ inline bool ArchitecturesHasBeenSet() const { return m_architecturesHasBeenSet; } /** *

The instruction set architecture that the function supports. Enter a string * array with one of the valid values (arm64 or x86_64). The default value is * x86_64.

*/ inline void SetArchitectures(const Aws::Vector& value) { m_architecturesHasBeenSet = true; m_architectures = value; } /** *

The instruction set architecture that the function supports. Enter a string * array with one of the valid values (arm64 or x86_64). The default value is * x86_64.

*/ inline void SetArchitectures(Aws::Vector&& value) { m_architecturesHasBeenSet = true; m_architectures = std::move(value); } /** *

The instruction set architecture that the function supports. Enter a string * array with one of the valid values (arm64 or x86_64). The default value is * x86_64.

*/ inline UpdateFunctionCodeRequest& WithArchitectures(const Aws::Vector& value) { SetArchitectures(value); return *this;} /** *

The instruction set architecture that the function supports. Enter a string * array with one of the valid values (arm64 or x86_64). The default value is * x86_64.

*/ inline UpdateFunctionCodeRequest& WithArchitectures(Aws::Vector&& value) { SetArchitectures(std::move(value)); return *this;} /** *

The instruction set architecture that the function supports. Enter a string * array with one of the valid values (arm64 or x86_64). The default value is * x86_64.

*/ inline UpdateFunctionCodeRequest& AddArchitectures(const Architecture& value) { m_architecturesHasBeenSet = true; m_architectures.push_back(value); return *this; } /** *

The instruction set architecture that the function supports. Enter a string * array with one of the valid values (arm64 or x86_64). The default value is * x86_64.

*/ inline UpdateFunctionCodeRequest& AddArchitectures(Architecture&& value) { m_architecturesHasBeenSet = true; m_architectures.push_back(std::move(value)); return *this; } private: Aws::String m_functionName; bool m_functionNameHasBeenSet = false; Aws::Utils::CryptoBuffer m_zipFile; bool m_zipFileHasBeenSet = false; Aws::String m_s3Bucket; bool m_s3BucketHasBeenSet = false; Aws::String m_s3Key; bool m_s3KeyHasBeenSet = false; Aws::String m_s3ObjectVersion; bool m_s3ObjectVersionHasBeenSet = false; Aws::String m_imageUri; bool m_imageUriHasBeenSet = false; bool m_publish; bool m_publishHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::String m_revisionId; bool m_revisionIdHasBeenSet = false; Aws::Vector m_architectures; bool m_architecturesHasBeenSet = false; }; } // namespace Model } // namespace Lambda } // namespace Aws