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

Function DatabaseNetPeeringsRemove

dbng/networking.go:101–116  ·  view source on GitHub ↗
(ctx context.Context, databaseID, netPeeringID string)

Source from the content-addressed store, hash-verified

99}
100
101func DatabaseNetPeeringsRemove(ctx context.Context, databaseID, netPeeringID string) error {
102 c, err := config.ScalingoClient(ctx)
103 if err != nil {
104 return errors.Wrap(ctx, err, "get Scalingo client")
105 }
106
107 err = c.Preview().DatabaseNetPeeringDestroy(ctx, databaseID, netPeeringID)
108 if err != nil {
109 return errors.Wrap(ctx, err, "remove database net peering")
110 }
111
112 io.Statusf("Net peering '%s' has been removed from database '%s'.\n", netPeeringID, databaseID)
113 io.Warning("Expect some delay for the net peering removal to be applied.")
114
115 return nil
116}
117
118func DatabaseNetworkConfigurationShow(ctx context.Context, databaseID string) error {
119 c, err := config.ScalingoClient(ctx)

Callers 1

Calls 3

ScalingoClientFunction · 0.92
StatusfFunction · 0.92
WarningFunction · 0.92

Tested by

no test coverage detected