MCPcopy Create free account
hub / github.com/Scalingo/cli / DatabaseNetPeeringsAdd

Function DatabaseNetPeeringsAdd

dbng/networking.go:84–99  ·  view source on GitHub ↗
(ctx context.Context, databaseID string, params scalingo.DatabaseNetPeeringCreateParams)

Source from the content-addressed store, hash-verified

82}
83
84func DatabaseNetPeeringsAdd(ctx context.Context, databaseID string, params scalingo.DatabaseNetPeeringCreateParams) error {
85 c, err := config.ScalingoClient(ctx)
86 if err != nil {
87 return errors.Wrap(ctx, err, "get Scalingo client")
88 }
89
90 netPeering, err := c.Preview().DatabaseNetPeeringCreate(ctx, databaseID, params)
91 if err != nil {
92 return errors.Wrap(ctx, err, "add database net peering")
93 }
94
95 io.Statusf("Net peering '%s' creation has been initiated for database '%s'.\n", netPeering.ID, databaseID)
96 io.Warning("Expect some delay for the net peering to be applied.")
97
98 return nil
99}
100
101func DatabaseNetPeeringsRemove(ctx context.Context, databaseID, netPeeringID string) error {
102 c, err := config.ScalingoClient(ctx)

Callers 1

Calls 3

ScalingoClientFunction · 0.92
StatusfFunction · 0.92
WarningFunction · 0.92

Tested by

no test coverage detected