UpdatePrivateDnsNamespaceCommand

Updates a private DNS namespace.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ServiceDiscoveryClient, UpdatePrivateDnsNamespaceCommand } from "@aws-sdk/client-servicediscovery"; // ES Modules import
// const { ServiceDiscoveryClient, UpdatePrivateDnsNamespaceCommand } = require("@aws-sdk/client-servicediscovery"); // CommonJS import
const client = new ServiceDiscoveryClient(config);
const input = { // UpdatePrivateDnsNamespaceRequest
  Id: "STRING_VALUE", // required
  UpdaterRequestId: "STRING_VALUE",
  Namespace: { // PrivateDnsNamespaceChange
    Description: "STRING_VALUE",
    Properties: { // PrivateDnsNamespacePropertiesChange
      DnsProperties: { // PrivateDnsPropertiesMutableChange
        SOA: { // SOAChange
          TTL: Number("long"), // required
        },
      },
    },
  },
};
const command = new UpdatePrivateDnsNamespaceCommand(input);
const response = await client.send(command);
// { // UpdatePrivateDnsNamespaceResponse
//   OperationId: "STRING_VALUE",
// };

Example Usage

 Loading code editorLoading code editor

UpdatePrivateDnsNamespaceCommand Input

Parameter
Type
Description
Id
Required
string | undefined

The ID of the namespace that you want to update.

Namespace
Required
PrivateDnsNamespaceChange | undefined

Updated properties for the private DNS namespace.

UpdaterRequestId
string | undefined

A unique string that identifies the request and that allows failed UpdatePrivateDnsNamespace requests to be retried without the risk of running the operation twice. UpdaterRequestId can be any unique string (for example, a date/timestamp).

UpdatePrivateDnsNamespaceCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
OperationId
string | undefined

A value that you can use to determine whether the request completed successfully. To get the status of the operation, see GetOperation .

Throws

Name
Fault
Details
DuplicateRequest
client

The operation is already in progress.

InvalidInput
client

One or more specified values aren't valid. For example, a required value might be missing, a numeric value might be outside the allowed range, or a string value might exceed length constraints.

NamespaceNotFound
client

No namespace exists with the specified ID.

ResourceInUse
client

The specified resource can't be deleted because it contains other resources. For example, you can't delete a service that contains any instances.

ServiceDiscoveryServiceException
Base exception class for all service exceptions from ServiceDiscovery service.