/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the lambda-2015-03-31.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Lambda.Model
{
///
/// Container for the parameters to the UpdateFunctionCode operation.
/// Updates a Lambda function's code. If code signing is enabled for the function, the
/// code package must be signed by a trusted publisher. For more information, see Configuring
/// code signing for Lambda.
///
///
///
/// If the function's package type is Image
, then you must specify the code
/// package in ImageUri
as the URI of a container
/// image in the Amazon ECR registry.
///
///
///
/// If the function's package type is Zip
, then you must specify the deployment
/// package as a .zip
/// file archive. Enter the Amazon S3 bucket and key of the code .zip file location.
/// You can also provide the function code inline using the ZipFile
field.
///
///
///
/// The code in the deployment package must be compatible with the target instruction
/// set architecture of the function (x86-64
or arm64
).
///
///
///
/// The function's code is locked when you publish a version. You can't modify the code
/// of a published version, only the unpublished version.
///
///
///
/// For a function defined as a container image, Lambda resolves the image tag to an image
/// digest. In Amazon ECR, if you update the image tag to a new image, Lambda does not
/// automatically update the function.
///
///
///
public partial class UpdateFunctionCodeRequest : AmazonLambdaRequest
{
private List _architectures = new List();
private bool? _dryRun;
private string _functionName;
private string _imageUri;
private bool? _publish;
private string _revisionId;
private string _s3Bucket;
private string _s3Key;
private string _s3ObjectVersion;
private MemoryStream _zipFile;
///
/// Gets and sets the property 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
.
///
///
[AWSProperty(Min=1, Max=1)]
public List Architectures
{
get { return this._architectures; }
set { this._architectures = value; }
}
// Check to see if Architectures property is set
internal bool IsSetArchitectures()
{
return this._architectures != null && this._architectures.Count > 0;
}
///
/// Gets and sets the property DryRun.
///
/// Set to true to validate the request parameters and access permissions without modifying
/// the function code.
///
///
public bool DryRun
{
get { return this._dryRun.GetValueOrDefault(); }
set { this._dryRun = value; }
}
// Check to see if DryRun property is set
internal bool IsSetDryRun()
{
return this._dryRun.HasValue;
}
///
/// Gets and sets the property FunctionName.
///
/// The name of the Lambda function.
///
/// Name formats
///
///
-
///
/// Function name –
my-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.
///
///
[AWSProperty(Required=true, Min=1, Max=140)]
public string FunctionName
{
get { return this._functionName; }
set { this._functionName = value; }
}
// Check to see if FunctionName property is set
internal bool IsSetFunctionName()
{
return this._functionName != null;
}
///
/// Gets and sets the property ImageUri.
///
/// URI of a container image in the Amazon ECR registry. Do not use for a function defined
/// with a .zip file archive.
///
///
public string ImageUri
{
get { return this._imageUri; }
set { this._imageUri = value; }
}
// Check to see if ImageUri property is set
internal bool IsSetImageUri()
{
return this._imageUri != null;
}
///
/// Gets and sets the property 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.
///
///
public bool Publish
{
get { return this._publish.GetValueOrDefault(); }
set { this._publish = value; }
}
// Check to see if Publish property is set
internal bool IsSetPublish()
{
return this._publish.HasValue;
}
///
/// Gets and sets the property 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.
///
///
public string RevisionId
{
get { return this._revisionId; }
set { this._revisionId = value; }
}
// Check to see if RevisionId property is set
internal bool IsSetRevisionId()
{
return this._revisionId != null;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Min=3, Max=63)]
public string S3Bucket
{
get { return this._s3Bucket; }
set { this._s3Bucket = value; }
}
// Check to see if S3Bucket property is set
internal bool IsSetS3Bucket()
{
return this._s3Bucket != null;
}
///
/// Gets and sets the property S3Key.
///
/// The Amazon S3 key of the deployment package. Use only with a function defined with
/// a .zip file archive deployment package.
///
///
[AWSProperty(Min=1, Max=1024)]
public string S3Key
{
get { return this._s3Key; }
set { this._s3Key = value; }
}
// Check to see if S3Key property is set
internal bool IsSetS3Key()
{
return this._s3Key != null;
}
///
/// Gets and sets the property S3ObjectVersion.
///
/// For versioned objects, the version of the deployment package object to use.
///
///
[AWSProperty(Min=1, Max=1024)]
public string S3ObjectVersion
{
get { return this._s3ObjectVersion; }
set { this._s3ObjectVersion = value; }
}
// Check to see if S3ObjectVersion property is set
internal bool IsSetS3ObjectVersion()
{
return this._s3ObjectVersion != null;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Sensitive=true)]
public MemoryStream ZipFile
{
get { return this._zipFile; }
set { this._zipFile = value; }
}
// Check to see if ZipFile property is set
internal bool IsSetZipFile()
{
return this._zipFile != null;
}
}
}