AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Add a parameter to the system.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginPutParameter and EndPutParameter.

Namespace: Amazon.SimpleSystemsManagement
Assembly: AWSSDK.SimpleSystemsManagement.dll
Version: 3.x.y.z

Syntax

C#
public virtual Task<PutParameterResponse> PutParameterAsync(
         PutParameterRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.SimpleSystemsManagement.Model.PutParameterRequest

Container for the necessary parameters to execute the PutParameter service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the PutParameter service method, as returned by SimpleSystemsManagement.

Exceptions

ExceptionCondition
HierarchyLevelLimitExceededException A hierarchy can have a maximum of 15 levels. For more information, see Requirements and constraints for parameter names in the Amazon Web Services Systems Manager User Guide.
HierarchyTypeMismatchException Parameter Store doesn't support changing a parameter type in a hierarchy. For example, you can't change a parameter from a String type to a SecureString type. You must create a new, unique parameter.
IncompatiblePolicyException There is a conflict in the policies specified for this parameter. You can't, for example, specify two Expiration policies for a parameter. Review your policies, and try again.
InternalServerErrorException An error occurred on the server side.
InvalidAllowedPatternException The request doesn't meet the regular expression requirement.
InvalidKeyIdException The query key ID isn't valid.
InvalidPolicyAttributeException A policy attribute or its value is invalid.
InvalidPolicyTypeException The policy type isn't supported. Parameter Store supports the following policy types: Expiration, ExpirationNotification, and NoChangeNotification.
ParameterAlreadyExistsException The parameter already exists. You can't create duplicate parameters.
ParameterLimitExceededException You have exceeded the number of parameters for this Amazon Web Services account. Delete one or more parameters and try again.
ParameterMaxVersionLimitExceededException Parameter Store retains the 100 most recently created versions of a parameter. After this number of versions has been created, Parameter Store deletes the oldest version when a new one is created. However, if the oldest version has a label attached to it, Parameter Store won't delete the version and instead presents this error message: An error occurred (ParameterMaxVersionLimitExceeded) when calling the PutParameter operation: You attempted to create a new version of parameter-name by calling the PutParameter API with the overwrite flag. Version version-number, the oldest version, can't be deleted because it has a label associated with it. Move the label to another version of the parameter, and try again. This safeguard is to prevent parameter versions with mission critical labels assigned to them from being deleted. To continue creating new parameters, first move the label from the oldest version of the parameter to a newer one for use in your operations. For information about moving parameter labels, see Move a parameter label (console) or Move a parameter label (CLI) in the Amazon Web Services Systems Manager User Guide.
ParameterPatternMismatchException The parameter name isn't valid.
PoliciesLimitExceededException You specified more than the maximum number of allowed policies for the parameter. The maximum is 10.
TooManyUpdatesException There are concurrent updates for a resource that supports one update at a time.
UnsupportedParameterTypeException The parameter type isn't supported.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5

See Also