- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ExportServerEngineAttributeCommand
Exports a specified server engine attribute as a base64-encoded string. For example, you can export user data that you can use in EC2 to associate nodes with a server.
This operation is synchronous.
A ValidationException
is raised when parameters of the request are not valid. A ResourceNotFoundException
is thrown when the server does not exist. An InvalidStateException
is thrown when the server is in any of the following states: CREATING, TERMINATED, FAILED or DELETING.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { OpsWorksCMClient, ExportServerEngineAttributeCommand } from "@aws-sdk/client-opsworkscm"; // ES Modules import
// const { OpsWorksCMClient, ExportServerEngineAttributeCommand } = require("@aws-sdk/client-opsworkscm"); // CommonJS import
const client = new OpsWorksCMClient(config);
const input = { // ExportServerEngineAttributeRequest
ExportAttributeName: "STRING_VALUE", // required
ServerName: "STRING_VALUE", // required
InputAttributes: [ // EngineAttributes
{ // EngineAttribute
Name: "STRING_VALUE",
Value: "STRING_VALUE",
},
],
};
const command = new ExportServerEngineAttributeCommand(input);
const response = await client.send(command);
// { // ExportServerEngineAttributeResponse
// EngineAttribute: { // EngineAttribute
// Name: "STRING_VALUE",
// Value: "STRING_VALUE",
// },
// ServerName: "STRING_VALUE",
// };
ExportServerEngineAttributeCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ExportAttributeName Required | string | undefined | The name of the export attribute. Currently, the supported export attribute is |
ServerName Required | string | undefined | The name of the server from which you are exporting the attribute. |
InputAttributes | EngineAttribute[] | undefined | The list of engine attributes. The list type is
|
ExportServerEngineAttributeCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
EngineAttribute | EngineAttribute | undefined | The requested engine attribute pair with attribute name and value. |
ServerName | string | undefined | The server name used in the request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidStateException | client | The resource is in a state that does not allow you to perform a specified action. |
ResourceNotFoundException | client | The requested resource does not exist, or access was denied. |
ValidationException | client | One or more of the provided request parameters are not valid. |
OpsWorksCMServiceException | Base exception class for all service exceptions from OpsWorksCM service. |