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.

Updates a key group.

When you update a key group, all the fields are updated with the values provided in the request. You cannot update some fields independent of others. To update a key group:

  1. Get the current key group with GetKeyGroup or GetKeyGroupConfig.

  2. Locally modify the fields in the key group that you want to update. For example, add or remove public key IDs.

  3. Call UpdateKeyGroup with the entire key group object, including the fields that you modified and those that you didn't.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to UpdateKeyGroupAsync.

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

Syntax

C#
public abstract UpdateKeyGroupResponse UpdateKeyGroup(
         UpdateKeyGroupRequest request
)

Parameters

request
Type: Amazon.CloudFront.Model.UpdateKeyGroupRequest

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

Return Value


The response from the UpdateKeyGroup service method, as returned by CloudFront.

Exceptions

ExceptionCondition
InvalidArgumentException An argument is invalid.
InvalidIfMatchVersionException The If-Match version is missing or not valid.
KeyGroupAlreadyExistsException A key group with this name already exists. You must provide a unique name. To modify an existing key group, use UpdateKeyGroup.
NoSuchResourceException A resource that was specified is not valid.
PreconditionFailedException The precondition in one or more of the request fields evaluated to false.
TooManyPublicKeysInKeyGroupException The number of public keys in this key group is more than the maximum allowed. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also