How to use the Organizations function from aws-sdk

Find comprehensive JavaScript aws-sdk.Organizations code examples handpicked from public code repositorys.

83
84
85
86
87
88
89
90
91
92
    body: JSON.stringify(err)
  };

  callback(null, response);
} else {
  let organizations = new AWS.Organizations({
    accessKeyId: data.Credentials.AccessKeyId,
    secretAccessKey: data.Credentials.SecretAccessKey,
    sessionToken: data.Credentials.SessionToken,
    region: "us-east-1"
fork icon5
star icon1
watch icon4

+ 29 other calls in file

500
501
502
503
504
505
506
507
508
509
  };

  await this.cloudFormationClient.updateStackSet(stackParameters).promise();
}

const rootOrgsInfo = await new Organizations({ region: 'us-east-1' }).listRoots({}).promise();

const deployToAdditionalRegionsParams = {
  StackSetName: options.stackSetName,
  DeploymentTargets: {
fork icon4
star icon31
watch icon3

+ 11 other calls in file

4
5
6
7
8
9
10
11
12
console.log({ log: 'getAccountData.input', ...event});

if (event === undefined) throw new Error('event must not be undefined');
if (event.accountId === undefined) throw new Error('event.accountId must not be undefined');

const org = new AWS.Organizations();
const response = await org.describeAccount({AccountId: event.accountId}).promise();

console.log({ log: 'getAccountData.response', ...response});
fork icon0
star icon1
watch icon8

+ 13 other calls in file

9
10
11
12
13
14
15
16
17
18
19
 *  OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
 *  and limitations under the License.
 */


const aws = require('aws-sdk');
const org = new aws.Organizations({ region: 'us-east-1' });
const cfn = require('cfn-response');
/**
 * create-govcloud-account - lambda handler
 *
fork icon0
star icon0
watch icon0