CoreNetwork
Learn how to create, update, and manage AWS NetworkManager CoreNetworks using Alchemy Cloud Control.
The CoreNetwork resource allows you to manage AWS NetworkManager CoreNetworks which facilitate the management of your global network. This resource provides a central point for managing your network components and policies across AWS.
Minimal Example
Section titled “Minimal Example”Create a basic CoreNetwork with required properties and a description.
import AWS from "alchemy/aws/control";
const coreNetwork = await AWS.NetworkManager.CoreNetwork("myCoreNetwork", { GlobalNetworkId: "gn-12345678", Description: "Core network for managing global connectivity"});
Advanced Configuration
Section titled “Advanced Configuration”Configure a CoreNetwork with a policy document and tags for better resource management.
const policyDocument = { Version: "2012-10-17", Statement: [ { Effect: "Allow", Principal: "*", Action: "networkmanager:CreateCoreNetwork", Resource: "*" } ]};
const advancedCoreNetwork = await AWS.NetworkManager.CoreNetwork("advancedCoreNetwork", { GlobalNetworkId: "gn-87654321", Description: "Advanced core network with policies", PolicyDocument: policyDocument, Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Team", Value: "NetworkOps" } ]});
Adoption of Existing Resources
Section titled “Adoption of Existing Resources”Create a CoreNetwork while adopting an existing resource if it already exists.
const adoptExistingCoreNetwork = await AWS.NetworkManager.CoreNetwork("adoptExistingCoreNetwork", { GlobalNetworkId: "gn-11223344", Description: "Adopting existing core network", adopt: true});
Updating CoreNetwork Properties
Section titled “Updating CoreNetwork Properties”Update an existing CoreNetwork with new properties and a modified policy document.
const updatedPolicyDocument = { Version: "2012-10-17", Statement: [ { Effect: "Allow", Principal: "*", Action: "networkmanager:UpdateCoreNetwork", Resource: "*" } ]};
const updatedCoreNetwork = await AWS.NetworkManager.CoreNetwork("updateCoreNetwork", { GlobalNetworkId: "gn-44556677", Description: "Updated core network with new policies", PolicyDocument: updatedPolicyDocument});