diff --git a/internal/flink/command_endpoint_list.go b/internal/flink/command_endpoint_list.go index 0209c7cbd8..796d300a01 100644 --- a/internal/flink/command_endpoint_list.go +++ b/internal/flink/command_endpoint_list.go @@ -78,7 +78,7 @@ func (c *command) endpointList(cmd *cobra.Command, _ []string) error { // 2 - List all the private endpoints based on the presence of "READY" PrivateLinkAttachments as filter // Note the `cloud` and `region` parameters have to be `nil` instead of empty slice in case of no filter - platts, err := c.V2Client.ListPrivateLinkAttachments(environmentId, nil, nil, nil, []string{"READY"}) + platts, err := c.V2Client.ListNetworkPrivateLinkAttachments(environmentId, nil, nil, nil, []string{"READY"}) if err != nil { return fmt.Errorf("unable to list Flink endpoint, failed to list private link attachments: %w", err) } diff --git a/internal/flink/command_endpoint_use.go b/internal/flink/command_endpoint_use.go index 3f704401f2..06ba2d5007 100644 --- a/internal/flink/command_endpoint_use.go +++ b/internal/flink/command_endpoint_use.go @@ -96,7 +96,7 @@ func validateUserProvidedFlinkEndpoint(endpoint, cloud, region string, c *comman } // Check if the endpoint is PRIVATE associated with PLATT - platts, err := c.V2Client.ListPrivateLinkAttachments(c.Context.GetCurrentEnvironment(), nil, nil, nil, []string{"READY"}) + platts, err := c.V2Client.ListNetworkPrivateLinkAttachments(c.Context.GetCurrentEnvironment(), nil, nil, nil, []string{"READY"}) if err != nil { log.CliLogger.Debugf("Error listing PrivateLink attachments: %v", err) return false diff --git a/internal/iam/command.go b/internal/iam/command.go index 6364a3fa72..a62b7a2ad1 100644 --- a/internal/iam/command.go +++ b/internal/iam/command.go @@ -58,7 +58,7 @@ func autocompleteResourceOwners(client *ccloudv2.Client) []string { if err != nil { return nil } - groupMappings, err := client.ListGroupMappings() + groupMappings, err := client.ListIamGroupMappings() if err != nil { return nil } diff --git a/internal/iam/command_certificate_authority_create.go b/internal/iam/command_certificate_authority_create.go index a8ac3c44be..1c85985360 100644 --- a/internal/iam/command_certificate_authority_create.go +++ b/internal/iam/command_certificate_authority_create.go @@ -94,7 +94,7 @@ func (c *certificateAuthorityCommand) create(cmd *cobra.Command, args []string) CrlChain: certificateauthorityv2.PtrString(crlChain), } - certificateAuthority, err := c.V2Client.CreateCertificateAuthority(certRequest) + certificateAuthority, err := c.V2Client.CreateIamCertificateAuthority(certRequest) if err != nil { return err } diff --git a/internal/iam/command_certificate_authority_delete.go b/internal/iam/command_certificate_authority_delete.go index 9d91f4fcb0..7d750fda35 100644 --- a/internal/iam/command_certificate_authority_delete.go +++ b/internal/iam/command_certificate_authority_delete.go @@ -32,7 +32,7 @@ func (c *certificateAuthorityCommand) newDeleteCommand() *cobra.Command { func (c *certificateAuthorityCommand) delete(cmd *cobra.Command, args []string) error { existenceFunc := func(id string) bool { - _, err := c.V2Client.GetCertificateAuthority(id) + _, err := c.V2Client.GetIamCertificateAuthority(id) return err == nil } @@ -41,7 +41,7 @@ func (c *certificateAuthorityCommand) delete(cmd *cobra.Command, args []string) } deleteFunc := func(id string) error { - return c.V2Client.DeleteCertificateAuthority(id) + return c.V2Client.DeleteIamCertificateAuthority(id) } _, err := deletion.Delete(cmd, args, deleteFunc, resource.CertificateAuthority) diff --git a/internal/iam/command_certificate_authority_describe.go b/internal/iam/command_certificate_authority_describe.go index 5625f3875a..b1355e57ad 100644 --- a/internal/iam/command_certificate_authority_describe.go +++ b/internal/iam/command_certificate_authority_describe.go @@ -22,7 +22,7 @@ func (c *certificateAuthorityCommand) newDescribeCommand() *cobra.Command { } func (c *certificateAuthorityCommand) describe(cmd *cobra.Command, args []string) error { - certificateAuthority, err := c.V2Client.GetCertificateAuthority(args[0]) + certificateAuthority, err := c.V2Client.GetIamCertificateAuthority(args[0]) if err != nil { return err } diff --git a/internal/iam/command_certificate_authority_list.go b/internal/iam/command_certificate_authority_list.go index 9280499a02..87ccd1d436 100644 --- a/internal/iam/command_certificate_authority_list.go +++ b/internal/iam/command_certificate_authority_list.go @@ -22,7 +22,7 @@ func (c *certificateAuthorityCommand) newListCommand() *cobra.Command { } func (c *certificateAuthorityCommand) list(cmd *cobra.Command, _ []string) error { - certificateAuthorities, err := c.V2Client.ListCertificateAuthorities() + certificateAuthorities, err := c.V2Client.ListIamCertificateAuthorities() if err != nil { return err } diff --git a/internal/iam/command_certificate_authority_update.go b/internal/iam/command_certificate_authority_update.go index 0b9a0d8365..145ad502a5 100644 --- a/internal/iam/command_certificate_authority_update.go +++ b/internal/iam/command_certificate_authority_update.go @@ -40,7 +40,7 @@ func (c *certificateAuthorityCommand) newUpdateCommand() *cobra.Command { func (c *certificateAuthorityCommand) update(cmd *cobra.Command, args []string) error { // The update sends a PUT request, so we also need to send unchanged fields - currentCertificateAuthority, err := c.V2Client.GetCertificateAuthority(args[0]) + currentCertificateAuthority, err := c.V2Client.GetIamCertificateAuthority(args[0]) if err != nil { return err } @@ -94,7 +94,7 @@ func (c *certificateAuthorityCommand) update(cmd *cobra.Command, args []string) update.CrlChain = certificateauthorityv2.PtrString(crlChain) } - certificateAuthority, err := c.V2Client.UpdateCertificateAuthority(update) + certificateAuthority, err := c.V2Client.UpdateIamCertificateAuthority(update) if err != nil { return err } diff --git a/internal/iam/command_certificate_pool_create.go b/internal/iam/command_certificate_pool_create.go index 17ff310d4c..9e84570b92 100644 --- a/internal/iam/command_certificate_pool_create.go +++ b/internal/iam/command_certificate_pool_create.go @@ -80,7 +80,7 @@ func (c *certificatePoolCommand) create(cmd *cobra.Command, args []string) error Filter: certificateauthorityv2.PtrString(filter), ExternalIdentifier: certificateauthorityv2.PtrString(externalIdentifier), } - certificatePool, err := c.V2Client.CreateCertificatePool(createCertificatePool, provider, resourceOwner) + certificatePool, err := c.V2Client.CreateIamCertificatePool(createCertificatePool, provider, resourceOwner) if err != nil { return err } diff --git a/internal/iam/command_certificate_pool_delete.go b/internal/iam/command_certificate_pool_delete.go index 9bd20500a5..2727eba803 100644 --- a/internal/iam/command_certificate_pool_delete.go +++ b/internal/iam/command_certificate_pool_delete.go @@ -40,7 +40,7 @@ func (c *certificatePoolCommand) delete(cmd *cobra.Command, args []string) error } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetCertificatePool(id, provider) + _, err := c.V2Client.GetIamCertificatePool(id, provider) return err == nil } @@ -49,7 +49,7 @@ func (c *certificatePoolCommand) delete(cmd *cobra.Command, args []string) error } deleteFunc := func(id string) error { - return c.V2Client.DeleteCertificatePool(id, provider) + return c.V2Client.DeleteIamCertificatePool(id, provider) } _, err = deletion.Delete(cmd, args, deleteFunc, resource.CertificatePool) diff --git a/internal/iam/command_certificate_pool_describe.go b/internal/iam/command_certificate_pool_describe.go index ef107e1c54..07c9b2f219 100644 --- a/internal/iam/command_certificate_pool_describe.go +++ b/internal/iam/command_certificate_pool_describe.go @@ -35,7 +35,7 @@ func (c *certificatePoolCommand) describe(cmd *cobra.Command, args []string) err if err != nil { return nil } - certificatePool, err := c.V2Client.GetCertificatePool(args[0], provider) + certificatePool, err := c.V2Client.GetIamCertificatePool(args[0], provider) if err != nil { return err } diff --git a/internal/iam/command_certificate_pool_list.go b/internal/iam/command_certificate_pool_list.go index 2a755a1ba7..6706f580fd 100644 --- a/internal/iam/command_certificate_pool_list.go +++ b/internal/iam/command_certificate_pool_list.go @@ -29,7 +29,7 @@ func (c *certificatePoolCommand) list(cmd *cobra.Command, _ []string) error { return nil } - certificatePools, err := c.V2Client.ListCertificatePool(provider) + certificatePools, err := c.V2Client.ListIamCertificatePools(provider) if err != nil { return err } diff --git a/internal/iam/command_certificate_pool_update.go b/internal/iam/command_certificate_pool_update.go index 0b0095f29d..c23ffaf692 100644 --- a/internal/iam/command_certificate_pool_update.go +++ b/internal/iam/command_certificate_pool_update.go @@ -44,7 +44,7 @@ func (c *certificatePoolCommand) update(cmd *cobra.Command, args []string) error } // The update sends a PUT request, so we also need to send unchanged fields - currentCertificatePool, err := c.V2Client.GetCertificatePool(args[0], provider) + currentCertificatePool, err := c.V2Client.GetIamCertificatePool(args[0], provider) if err != nil { return err } @@ -86,7 +86,7 @@ func (c *certificatePoolCommand) update(cmd *cobra.Command, args []string) error update.ExternalIdentifier = certificateauthorityv2.PtrString(externalIdentifier) } - certificatePool, err := c.V2Client.UpdateCertificatePool(update, provider) + certificatePool, err := c.V2Client.UpdateIamCertificatePool(update, provider) if err != nil { return err } diff --git a/internal/iam/command_groupmapping_create.go b/internal/iam/command_groupmapping_create.go index 1ebf7fcf4c..c64ceb8cbc 100644 --- a/internal/iam/command_groupmapping_create.go +++ b/internal/iam/command_groupmapping_create.go @@ -47,7 +47,7 @@ func (c *groupMappingCommand) create(cmd *cobra.Command, args []string) error { Description: ssov2.PtrString(description), Filter: ssov2.PtrString(filter), } - groupMapping, err := c.V2Client.CreateGroupMapping(createGroupMapping) + groupMapping, err := c.V2Client.CreateIamGroupMapping(createGroupMapping) if err != nil { return err } diff --git a/internal/iam/command_groupmapping_delete.go b/internal/iam/command_groupmapping_delete.go index 96f7919106..66a1bd3ea6 100644 --- a/internal/iam/command_groupmapping_delete.go +++ b/internal/iam/command_groupmapping_delete.go @@ -32,7 +32,7 @@ func (c *groupMappingCommand) newDeleteCommand() *cobra.Command { func (c *groupMappingCommand) delete(cmd *cobra.Command, args []string) error { existenceFunc := func(id string) bool { - _, err := c.V2Client.GetGroupMapping(id) + _, err := c.V2Client.GetIamGroupMapping(id) return err == nil } @@ -41,7 +41,7 @@ func (c *groupMappingCommand) delete(cmd *cobra.Command, args []string) error { } deleteFunc := func(id string) error { - return c.V2Client.DeleteGroupMapping(id) + return c.V2Client.DeleteIamGroupMapping(id) } _, err := deletion.Delete(cmd, args, deleteFunc, resource.SsoGroupMapping) diff --git a/internal/iam/command_groupmapping_describe.go b/internal/iam/command_groupmapping_describe.go index ef9f9bc6e2..1c739a2431 100644 --- a/internal/iam/command_groupmapping_describe.go +++ b/internal/iam/command_groupmapping_describe.go @@ -22,7 +22,7 @@ func (c *groupMappingCommand) newDescribeCommand() *cobra.Command { } func (c *groupMappingCommand) describe(cmd *cobra.Command, args []string) error { - groupMapping, err := c.V2Client.GetGroupMapping(args[0]) + groupMapping, err := c.V2Client.GetIamGroupMapping(args[0]) if err != nil { return err } diff --git a/internal/iam/command_groupmapping_list.go b/internal/iam/command_groupmapping_list.go index a5e5c7e79c..8321a645fa 100644 --- a/internal/iam/command_groupmapping_list.go +++ b/internal/iam/command_groupmapping_list.go @@ -22,7 +22,7 @@ func (c *groupMappingCommand) newListCommand() *cobra.Command { } func (c *groupMappingCommand) list(cmd *cobra.Command, _ []string) error { - groupMappings, err := c.V2Client.ListGroupMappings() + groupMappings, err := c.V2Client.ListIamGroupMappings() if err != nil { return err } diff --git a/internal/iam/command_groupmapping_update.go b/internal/iam/command_groupmapping_update.go index 6df3f303ff..6096f1f9f8 100644 --- a/internal/iam/command_groupmapping_update.go +++ b/internal/iam/command_groupmapping_update.go @@ -62,7 +62,7 @@ func (c *groupMappingCommand) update(cmd *cobra.Command, args []string) error { update.Filter = ssov2.PtrString(filter) } - groupMapping, err := c.V2Client.UpdateGroupMapping(update) + groupMapping, err := c.V2Client.UpdateIamGroupMapping(update) if err != nil { return err } diff --git a/internal/iam/command_pool_create.go b/internal/iam/command_pool_create.go index 23f37cacb0..0cadfc4a37 100644 --- a/internal/iam/command_pool_create.go +++ b/internal/iam/command_pool_create.go @@ -82,7 +82,7 @@ func (c *poolCommand) create(cmd *cobra.Command, args []string) error { IdentityClaim: identityproviderv2.PtrString(identityClaim), Filter: identityproviderv2.PtrString(filter), } - pool, err := c.V2Client.CreateIdentityPool(createIdentityPool, provider, resourceOwner) + pool, err := c.V2Client.CreateIamIdentityPool(createIdentityPool, provider, resourceOwner) if err != nil { return err } diff --git a/internal/iam/command_pool_delete.go b/internal/iam/command_pool_delete.go index 7bdd48fd72..db2715d3f8 100644 --- a/internal/iam/command_pool_delete.go +++ b/internal/iam/command_pool_delete.go @@ -40,7 +40,7 @@ func (c *poolCommand) delete(cmd *cobra.Command, args []string) error { } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetIdentityPool(id, provider) + _, err := c.V2Client.GetIamIdentityPool(id, provider) return err == nil } @@ -49,7 +49,7 @@ func (c *poolCommand) delete(cmd *cobra.Command, args []string) error { } deleteFunc := func(id string) error { - return c.V2Client.DeleteIdentityPool(id, provider) + return c.V2Client.DeleteIamIdentityPool(id, provider) } _, err = deletion.Delete(cmd, args, deleteFunc, resource.IdentityPool) diff --git a/internal/iam/command_pool_describe.go b/internal/iam/command_pool_describe.go index cf9a75fde3..05c79a66d4 100644 --- a/internal/iam/command_pool_describe.go +++ b/internal/iam/command_pool_describe.go @@ -30,7 +30,7 @@ func (c *poolCommand) describe(cmd *cobra.Command, args []string) error { return err } - pool, err := c.V2Client.GetIdentityPool(args[0], provider) + pool, err := c.V2Client.GetIamIdentityPool(args[0], provider) if err != nil { return err } diff --git a/internal/iam/command_pool_list.go b/internal/iam/command_pool_list.go index 2b754481b2..b4473cf4e3 100644 --- a/internal/iam/command_pool_list.go +++ b/internal/iam/command_pool_list.go @@ -30,7 +30,7 @@ func (c *poolCommand) list(cmd *cobra.Command, _ []string) error { return err } - identityPools, err := c.V2Client.ListIdentityPools(provider) + identityPools, err := c.V2Client.ListIamIdentityPools(provider) if err != nil { return err } diff --git a/internal/iam/command_pool_update.go b/internal/iam/command_pool_update.go index 2de7478309..b3d9e6923d 100644 --- a/internal/iam/command_pool_update.go +++ b/internal/iam/command_pool_update.go @@ -78,7 +78,7 @@ func (c *poolCommand) update(cmd *cobra.Command, args []string) error { updateIdentityPool.Filter = identityproviderv2.PtrString(filter) } - pool, err := c.V2Client.UpdateIdentityPool(updateIdentityPool, provider) + pool, err := c.V2Client.UpdateIamIdentityPool(updateIdentityPool, provider) if err != nil { return err } diff --git a/internal/iam/command_provider_create.go b/internal/iam/command_provider_create.go index f8ac1347f6..5cbfd635ee 100644 --- a/internal/iam/command_provider_create.go +++ b/internal/iam/command_provider_create.go @@ -64,7 +64,7 @@ func (c *identityProviderCommand) create(cmd *cobra.Command, args []string) erro Issuer: identityproviderv2.PtrString(issuerUri), JwksUri: identityproviderv2.PtrString(jwksUri), } - provider, err := c.V2Client.CreateIdentityProvider(createIdentityProvider) + provider, err := c.V2Client.CreateIamIdentityProvider(createIdentityProvider) if err != nil { return err } diff --git a/internal/iam/command_provider_delete.go b/internal/iam/command_provider_delete.go index fef4453461..5555a276c1 100644 --- a/internal/iam/command_provider_delete.go +++ b/internal/iam/command_provider_delete.go @@ -32,7 +32,7 @@ func (c *identityProviderCommand) newDeleteCommand() *cobra.Command { func (c *identityProviderCommand) delete(cmd *cobra.Command, args []string) error { existenceFunc := func(id string) bool { - _, err := c.V2Client.GetIdentityProvider(id) + _, err := c.V2Client.GetIamIdentityProvider(id) return err == nil } @@ -41,7 +41,7 @@ func (c *identityProviderCommand) delete(cmd *cobra.Command, args []string) erro } deleteFunc := func(id string) error { - return c.V2Client.DeleteIdentityProvider(id) + return c.V2Client.DeleteIamIdentityProvider(id) } _, err := deletion.Delete(cmd, args, deleteFunc, resource.IdentityProvider) diff --git a/internal/iam/command_provider_describe.go b/internal/iam/command_provider_describe.go index 4babe97cb9..c02c15a0d2 100644 --- a/internal/iam/command_provider_describe.go +++ b/internal/iam/command_provider_describe.go @@ -22,7 +22,7 @@ func (c *identityProviderCommand) newDescribeCommand() *cobra.Command { } func (c *identityProviderCommand) describe(cmd *cobra.Command, args []string) error { - provider, err := c.V2Client.GetIdentityProvider(args[0]) + provider, err := c.V2Client.GetIamIdentityProvider(args[0]) if err != nil { return err } diff --git a/internal/iam/command_provider_list.go b/internal/iam/command_provider_list.go index 1879d5de4f..7a3ea9622e 100644 --- a/internal/iam/command_provider_list.go +++ b/internal/iam/command_provider_list.go @@ -22,7 +22,7 @@ func (c *identityProviderCommand) newListCommand() *cobra.Command { } func (c *identityProviderCommand) list(cmd *cobra.Command, _ []string) error { - identityProviders, err := c.V2Client.ListIdentityProviders() + identityProviders, err := c.V2Client.ListIamIdentityProviders() if err != nil { return err } diff --git a/internal/iam/command_provider_update.go b/internal/iam/command_provider_update.go index fe434b3bf2..199103d3d6 100644 --- a/internal/iam/command_provider_update.go +++ b/internal/iam/command_provider_update.go @@ -62,7 +62,7 @@ func (c *identityProviderCommand) update(cmd *cobra.Command, args []string) erro update.Description = identityproviderv2.PtrString(description) } - provider, err := c.V2Client.UpdateIdentityProvider(update) + provider, err := c.V2Client.UpdateIamIdentityProvider(update) if err != nil { return err } diff --git a/internal/iam/command_rbac_role_binding_list.go b/internal/iam/command_rbac_role_binding_list.go index bdb6931f38..be7ff740e0 100644 --- a/internal/iam/command_rbac_role_binding_list.go +++ b/internal/iam/command_rbac_role_binding_list.go @@ -137,13 +137,13 @@ func (c *roleBindingCommand) list(cmd *cobra.Command, _ []string) error { } func (c *roleBindingCommand) getPoolToNameMap() (map[string]string, error) { - providers, err := c.V2Client.ListIdentityProviders() + providers, err := c.V2Client.ListIamIdentityProviders() if err != nil { return map[string]string{}, err } poolToName := make(map[string]string) for _, provider := range providers { - pools, err := c.V2Client.ListIdentityPools(provider.GetId()) + pools, err := c.V2Client.ListIamIdentityPools(provider.GetId()) if err != nil { return map[string]string{}, err } @@ -155,7 +155,7 @@ func (c *roleBindingCommand) getPoolToNameMap() (map[string]string, error) { } func (c *roleBindingCommand) getGroupMappingToNameMap() (map[string]string, error) { - groupMappings, err := c.V2Client.ListGroupMappings() + groupMappings, err := c.V2Client.ListIamGroupMappings() if err != nil { return map[string]string{}, err } diff --git a/internal/login/command_test.go b/internal/login/command_test.go index 4b629a9184..d57c7c3c3e 100644 --- a/internal/login/command_test.go +++ b/internal/login/command_test.go @@ -628,7 +628,7 @@ func getNewLoginCommandForSelfSignedCertTest(req *require.Assertions, cfg *confi transport, ok := mdsClient.GetConfig().HTTPClient.Transport.(*http.Transport) req.True(ok) req.NotEqual(http.DefaultTransport, transport) - found := slices.ContainsFunc(transport.TLSClientConfig.RootCAs.Subjects(), func(subject []byte) bool { //nolint:staticcheck + found := slices.ContainsFunc(transport.TLSClientConfig.RootCAs.Subjects(), func(subject []byte) bool { //nolint:staticcheck,nolintlint return bytes.Equal(cert.RawSubject, subject) }) req.True(found, "Certificate not found in client.") diff --git a/internal/network/command_access_point_private_link_egress_endpoint.go b/internal/network/command_access_point_private_link_egress_endpoint.go index 7c2bab6a14..3b7a1eb855 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint.go +++ b/internal/network/command_access_point_private_link_egress_endpoint.go @@ -71,7 +71,7 @@ func (c *accessPointCommand) autocompleteEgressEndpoints() []string { return nil } - accessPoints, err := c.V2Client.ListAccessPoints(environmentId, nil) + accessPoints, err := c.V2Client.ListNetworkAccessPoints(environmentId, nil) if err != nil { return nil } diff --git a/internal/network/command_access_point_private_link_egress_endpoint_create.go b/internal/network/command_access_point_private_link_egress_endpoint_create.go index 2e5c7af7dd..f4d55f47bc 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_egress_endpoint_create.go @@ -131,7 +131,7 @@ func (c *accessPointCommand) create(cmd *cobra.Command, args []string) error { } } - egressEndpoint, err := c.V2Client.CreateAccessPoint(createEgressEndpoint) + egressEndpoint, err := c.V2Client.CreateNetworkAccessPoint(createEgressEndpoint) if err != nil { return err } diff --git a/internal/network/command_access_point_private_link_egress_endpoint_delete.go b/internal/network/command_access_point_private_link_egress_endpoint_delete.go index 93da1b49ba..6b04ab7366 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint_delete.go +++ b/internal/network/command_access_point_private_link_egress_endpoint_delete.go @@ -36,7 +36,7 @@ func (c *accessPointCommand) delete(cmd *cobra.Command, args []string) error { } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetAccessPoint(environmentId, id) + _, err := c.V2Client.GetNetworkAccessPoint(environmentId, id) return err == nil } @@ -45,7 +45,7 @@ func (c *accessPointCommand) delete(cmd *cobra.Command, args []string) error { } deleteFunc := func(id string) error { - return c.V2Client.DeleteAccessPoint(environmentId, id) + return c.V2Client.DeleteNetworkAccessPoint(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_access_point_private_link_egress_endpoint_describe.go b/internal/network/command_access_point_private_link_egress_endpoint_describe.go index 8d0b75aa1d..083be87c11 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint_describe.go +++ b/internal/network/command_access_point_private_link_egress_endpoint_describe.go @@ -35,7 +35,7 @@ func (c *accessPointCommand) describe(cmd *cobra.Command, args []string) error { return err } - egressEndpoint, err := c.V2Client.GetAccessPoint(environmentId, args[0]) + egressEndpoint, err := c.V2Client.GetNetworkAccessPoint(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_access_point_private_link_egress_endpoint_list.go b/internal/network/command_access_point_private_link_egress_endpoint_list.go index ce79cb2a9c..447762bf21 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint_list.go +++ b/internal/network/command_access_point_private_link_egress_endpoint_list.go @@ -37,7 +37,7 @@ func (c *accessPointCommand) list(cmd *cobra.Command, _ []string) error { return err } - egressEndpoints, err := c.V2Client.ListAccessPoints(environmentId, names) + egressEndpoints, err := c.V2Client.ListNetworkAccessPoints(environmentId, names) if err != nil { return err } diff --git a/internal/network/command_access_point_private_link_egress_endpoint_update.go b/internal/network/command_access_point_private_link_egress_endpoint_update.go index 40e036b8ac..f6608b548b 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint_update.go +++ b/internal/network/command_access_point_private_link_egress_endpoint_update.go @@ -52,7 +52,7 @@ func (c *accessPointCommand) update(cmd *cobra.Command, args []string) error { }, } - egressEndpoint, err := c.V2Client.UpdateAccessPoint(args[0], updateEgressEndpoint) + egressEndpoint, err := c.V2Client.UpdateNetworkAccessPoint(args[0], updateEgressEndpoint) if err != nil { return err } diff --git a/internal/network/command_access_point_private_link_ingress_endpoint.go b/internal/network/command_access_point_private_link_ingress_endpoint.go index 5fd2474c45..b675de2524 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint.go @@ -63,7 +63,7 @@ func (c *accessPointCommand) autocompleteIngressEndpoints() []string { return nil } - accessPoints, err := c.V2Client.ListAccessPoints(environmentId, nil) + accessPoints, err := c.V2Client.ListNetworkAccessPoints(environmentId, nil) if err != nil { return nil } diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_create.go b/internal/network/command_access_point_private_link_ingress_endpoint_create.go index ea372f8924..360ec464a7 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_create.go @@ -91,7 +91,7 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st return fmt.Errorf("ingress endpoints are only supported for AWS") } - ingressEndpoint, err := c.V2Client.CreateAccessPoint(createIngressEndpoint) + ingressEndpoint, err := c.V2Client.CreateNetworkAccessPoint(createIngressEndpoint) if err != nil { return err } diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_delete.go b/internal/network/command_access_point_private_link_ingress_endpoint_delete.go index 7f950da666..b61179fdef 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_delete.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_delete.go @@ -36,7 +36,7 @@ func (c *accessPointCommand) deleteIngressEndpoint(cmd *cobra.Command, args []st } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetAccessPoint(environmentId, id) + _, err := c.V2Client.GetNetworkAccessPoint(environmentId, id) return err == nil } @@ -45,7 +45,7 @@ func (c *accessPointCommand) deleteIngressEndpoint(cmd *cobra.Command, args []st } deleteFunc := func(id string) error { - return c.V2Client.DeleteAccessPoint(environmentId, id) + return c.V2Client.DeleteNetworkAccessPoint(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_describe.go b/internal/network/command_access_point_private_link_ingress_endpoint_describe.go index 72f5ef2e7d..362a096492 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_describe.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_describe.go @@ -35,7 +35,7 @@ func (c *accessPointCommand) describeIngressEndpoint(cmd *cobra.Command, args [] return err } - ingressEndpoint, err := c.V2Client.GetAccessPoint(environmentId, args[0]) + ingressEndpoint, err := c.V2Client.GetNetworkAccessPoint(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_list.go b/internal/network/command_access_point_private_link_ingress_endpoint_list.go index fd73a90efd..e2b1cb3eb2 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_list.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_list.go @@ -37,7 +37,7 @@ func (c *accessPointCommand) listIngressEndpoint(cmd *cobra.Command, _ []string) return err } - ingressEndpoints, err := c.V2Client.ListAccessPoints(environmentId, names) + ingressEndpoints, err := c.V2Client.ListNetworkAccessPoints(environmentId, names) if err != nil { return err } diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_update.go b/internal/network/command_access_point_private_link_ingress_endpoint_update.go index 57e18169d5..21286494c3 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_update.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_update.go @@ -52,7 +52,7 @@ func (c *accessPointCommand) updateIngressEndpoint(cmd *cobra.Command, args []st }, } - ingressEndpoint, err := c.V2Client.UpdateAccessPoint(args[0], updateIngressEndpoint) + ingressEndpoint, err := c.V2Client.UpdateNetworkAccessPoint(args[0], updateIngressEndpoint) if err != nil { return err } diff --git a/internal/network/command_access_point_private_network_interface.go b/internal/network/command_access_point_private_network_interface.go index 32d8a1ff8a..a25a465606 100644 --- a/internal/network/command_access_point_private_network_interface.go +++ b/internal/network/command_access_point_private_network_interface.go @@ -59,7 +59,7 @@ func (c *accessPointCommand) autocompletePrivateNetworkInterfaces() []string { return nil } - accessPoints, err := c.V2Client.ListAccessPoints(environmentId, nil) + accessPoints, err := c.V2Client.ListNetworkAccessPoints(environmentId, nil) if err != nil { return nil } diff --git a/internal/network/command_access_point_private_network_interface_create.go b/internal/network/command_access_point_private_network_interface_create.go index 0e0865ca3a..023051eb95 100644 --- a/internal/network/command_access_point_private_network_interface_create.go +++ b/internal/network/command_access_point_private_network_interface_create.go @@ -98,7 +98,7 @@ func (c *accessPointCommand) privateNetworkInterfaceCreate(cmd *cobra.Command, a } } - privateNetworkInterface, err := c.V2Client.CreateAccessPoint(createPrivateNetworkInterface) + privateNetworkInterface, err := c.V2Client.CreateNetworkAccessPoint(createPrivateNetworkInterface) if err != nil { return err } diff --git a/internal/network/command_access_point_private_network_interface_delete.go b/internal/network/command_access_point_private_network_interface_delete.go index 868bcbd038..d0d02eef38 100644 --- a/internal/network/command_access_point_private_network_interface_delete.go +++ b/internal/network/command_access_point_private_network_interface_delete.go @@ -36,7 +36,7 @@ func (c *accessPointCommand) privateNetworkInterfaceDelete(cmd *cobra.Command, a } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetAccessPoint(environmentId, id) + _, err := c.V2Client.GetNetworkAccessPoint(environmentId, id) return err == nil } @@ -45,7 +45,7 @@ func (c *accessPointCommand) privateNetworkInterfaceDelete(cmd *cobra.Command, a } deleteFunc := func(id string) error { - return c.V2Client.DeleteAccessPoint(environmentId, id) + return c.V2Client.DeleteNetworkAccessPoint(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_access_point_private_network_interface_describe.go b/internal/network/command_access_point_private_network_interface_describe.go index 5ecd772713..0da7ab701b 100644 --- a/internal/network/command_access_point_private_network_interface_describe.go +++ b/internal/network/command_access_point_private_network_interface_describe.go @@ -35,7 +35,7 @@ func (c *accessPointCommand) privateNetworkInterfaceDescribe(cmd *cobra.Command, return err } - privateNetworkInterface, err := c.V2Client.GetAccessPoint(environmentId, args[0]) + privateNetworkInterface, err := c.V2Client.GetNetworkAccessPoint(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_access_point_private_network_interface_list.go b/internal/network/command_access_point_private_network_interface_list.go index ead8e4a511..480d3f2778 100644 --- a/internal/network/command_access_point_private_network_interface_list.go +++ b/internal/network/command_access_point_private_network_interface_list.go @@ -37,7 +37,7 @@ func (c *accessPointCommand) privateNetworkInterfaceList(cmd *cobra.Command, _ [ return err } - accessPoints, err := c.V2Client.ListAccessPoints(environmentId, names) + accessPoints, err := c.V2Client.ListNetworkAccessPoints(environmentId, names) if err != nil { return err } diff --git a/internal/network/command_access_point_private_network_interface_update.go b/internal/network/command_access_point_private_network_interface_update.go index 704ef83e71..b2f5457f33 100644 --- a/internal/network/command_access_point_private_network_interface_update.go +++ b/internal/network/command_access_point_private_network_interface_update.go @@ -66,7 +66,7 @@ func (c *accessPointCommand) privateNetworkInterfaceUpdate(cmd *cobra.Command, a } } - accessPoint, err := c.V2Client.UpdateAccessPoint(args[0], updatePrivateNetworkInterface) + accessPoint, err := c.V2Client.UpdateNetworkAccessPoint(args[0], updatePrivateNetworkInterface) if err != nil { return err } diff --git a/internal/network/command_dns_forwarder.go b/internal/network/command_dns_forwarder.go index 0a7fed0157..9c95dcc25d 100644 --- a/internal/network/command_dns_forwarder.go +++ b/internal/network/command_dns_forwarder.go @@ -44,7 +44,7 @@ func (c *command) getDnsForwarders() ([]networkingdnsforwarderv1.NetworkingV1Dns return nil, err } - return c.V2Client.ListDnsForwarders(environmentId) + return c.V2Client.ListNetworkDnsForwarders(environmentId) } func (c *command) validDnsForwarderArgs(cmd *cobra.Command, args []string) []string { diff --git a/internal/network/command_dns_forwarder_create.go b/internal/network/command_dns_forwarder_create.go index 7cd6d233d9..982995c0cc 100644 --- a/internal/network/command_dns_forwarder_create.go +++ b/internal/network/command_dns_forwarder_create.go @@ -122,7 +122,7 @@ func (c *command) dnsForwarderCreate(cmd *cobra.Command, args []string) error { if name != "" { createDnsForwarder.Spec.SetDisplayName(name) } - forwarder, err := c.V2Client.CreateDnsForwarder(createDnsForwarder) + forwarder, err := c.V2Client.CreateNetworkDnsForwarder(createDnsForwarder) if err != nil { return err } diff --git a/internal/network/command_dns_forwarder_delete.go b/internal/network/command_dns_forwarder_delete.go index 54ab72977d..99b228f4ba 100644 --- a/internal/network/command_dns_forwarder_delete.go +++ b/internal/network/command_dns_forwarder_delete.go @@ -36,7 +36,7 @@ func (c *command) dnsForwarderDelete(cmd *cobra.Command, args []string) error { } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetDnsForwarder(environmentId, id) + _, err := c.V2Client.GetNetworkDnsForwarder(environmentId, id) return err == nil } @@ -45,7 +45,7 @@ func (c *command) dnsForwarderDelete(cmd *cobra.Command, args []string) error { } deleteFunc := func(id string) error { - return c.V2Client.DeleteDnsForwarder(environmentId, id) + return c.V2Client.DeleteNetworkDnsForwarder(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_dns_forwarder_describe.go b/internal/network/command_dns_forwarder_describe.go index 76dc3972fc..795fb40757 100644 --- a/internal/network/command_dns_forwarder_describe.go +++ b/internal/network/command_dns_forwarder_describe.go @@ -35,7 +35,7 @@ func (c *command) dnsForwarderDescribe(cmd *cobra.Command, args []string) error return err } - forwarder, err := c.V2Client.GetDnsForwarder(environmentId, args[0]) + forwarder, err := c.V2Client.GetNetworkDnsForwarder(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_dns_forwarder_update.go b/internal/network/command_dns_forwarder_update.go index 0179cf7851..a713ed2818 100644 --- a/internal/network/command_dns_forwarder_update.go +++ b/internal/network/command_dns_forwarder_update.go @@ -45,7 +45,7 @@ func (c *command) dnsForwarderUpdate(cmd *cobra.Command, args []string) error { return err } - dnsForwarder, err := c.V2Client.GetDnsForwarder(environmentId, args[0]) + dnsForwarder, err := c.V2Client.GetNetworkDnsForwarder(environmentId, args[0]) if err != nil { return err } @@ -91,7 +91,7 @@ func (c *command) dnsForwarderUpdate(cmd *cobra.Command, args []string) error { updateDnsForwarder.Spec.Config.NetworkingV1ForwardViaGcpDnsZones.SetDomainMappings(domainMap) } - forwarder, err := c.V2Client.UpdateDnsForwarder(environmentId, args[0], updateDnsForwarder) + forwarder, err := c.V2Client.UpdateNetworkDnsForwarder(environmentId, args[0], updateDnsForwarder) if err != nil { return err } diff --git a/internal/network/command_dns_record.go b/internal/network/command_dns_record.go index 89cdf7e376..bd363d134a 100644 --- a/internal/network/command_dns_record.go +++ b/internal/network/command_dns_record.go @@ -55,7 +55,7 @@ func (c *command) addPrivateLinkAccessPointFlag(cmd *cobra.Command) { } func autocompleteAccessPoints(client *ccloudv2.Client, environmentId string) []string { - accessPoints, err := client.ListAccessPoints(environmentId, nil) + accessPoints, err := client.ListNetworkAccessPoints(environmentId, nil) if err != nil { return nil } @@ -88,7 +88,7 @@ func (c *command) autocompleteDnsRecords() []string { return nil } - records, err := c.V2Client.ListDnsRecords(environmentId, ccloudv2.DnsRecordListParameters{}) + records, err := c.V2Client.ListNetworkDnsRecords(environmentId, ccloudv2.DnsRecordListParameters{}) if err != nil { return nil } diff --git a/internal/network/command_dns_record_create.go b/internal/network/command_dns_record_create.go index 15902043ab..c3013ca857 100644 --- a/internal/network/command_dns_record_create.go +++ b/internal/network/command_dns_record_create.go @@ -85,7 +85,7 @@ func (c *command) dnsRecordCreate(cmd *cobra.Command, args []string) error { createDnsRecord.Spec.SetDisplayName(name) } - record, err := c.V2Client.CreateDnsRecord(createDnsRecord) + record, err := c.V2Client.CreateNetworkDnsRecord(createDnsRecord) if err != nil { return err } diff --git a/internal/network/command_dns_record_delete.go b/internal/network/command_dns_record_delete.go index bcd1711d40..5d7a9950c2 100644 --- a/internal/network/command_dns_record_delete.go +++ b/internal/network/command_dns_record_delete.go @@ -36,7 +36,7 @@ func (c *command) dnsRecordDelete(cmd *cobra.Command, args []string) error { } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetDnsRecord(environmentId, id) + _, err := c.V2Client.GetNetworkDnsRecord(environmentId, id) return err == nil } @@ -45,7 +45,7 @@ func (c *command) dnsRecordDelete(cmd *cobra.Command, args []string) error { } deleteFunc := func(id string) error { - return c.V2Client.DeleteDnsRecord(environmentId, id) + return c.V2Client.DeleteNetworkDnsRecord(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_dns_record_describe.go b/internal/network/command_dns_record_describe.go index c3c8a27196..7215627b1a 100644 --- a/internal/network/command_dns_record_describe.go +++ b/internal/network/command_dns_record_describe.go @@ -35,7 +35,7 @@ func (c *command) dnsRecordDescribe(cmd *cobra.Command, args []string) error { return err } - record, err := c.V2Client.GetDnsRecord(environmentId, args[0]) + record, err := c.V2Client.GetNetworkDnsRecord(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_dns_record_list.go b/internal/network/command_dns_record_list.go index 944645c7a1..a5cf12830f 100644 --- a/internal/network/command_dns_record_list.go +++ b/internal/network/command_dns_record_list.go @@ -70,7 +70,7 @@ func (c *command) dnsRecordList(cmd *cobra.Command, _ []string) error { ResourceIds: resourceIds, } - records, err := c.V2Client.ListDnsRecords(environmentId, listParameters) + records, err := c.V2Client.ListNetworkDnsRecords(environmentId, listParameters) if err != nil { return err } diff --git a/internal/network/command_dns_record_update.go b/internal/network/command_dns_record_update.go index b44d23f5a0..a29fcf077e 100644 --- a/internal/network/command_dns_record_update.go +++ b/internal/network/command_dns_record_update.go @@ -45,7 +45,7 @@ func (c *command) dnsRecordUpdate(cmd *cobra.Command, args []string) error { return err } - dnsRecord, err := c.V2Client.GetDnsRecord(environmentId, args[0]) + dnsRecord, err := c.V2Client.GetNetworkDnsRecord(environmentId, args[0]) if err != nil { return err } @@ -73,7 +73,7 @@ func (c *command) dnsRecordUpdate(cmd *cobra.Command, args []string) error { updateDnsRecord.Spec.Config.NetworkingV1PrivateLinkAccessPoint.SetResourceId(privateLinkAccessPoint) } - record, err := c.V2Client.UpdateDnsRecord(args[0], updateDnsRecord) + record, err := c.V2Client.UpdateNetworkDnsRecord(args[0], updateDnsRecord) if err != nil { return err } diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index dddefd9a5f..8b2f8477b6 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -118,7 +118,7 @@ func (c *command) validGatewayArgsMultiple(cmd *cobra.Command, args []string) [] } func autocompleteGateways(client *ccloudv2.Client, environmentId string) []string { - gateways, err := client.ListGateways(environmentId, nil, nil, nil, nil, nil) + gateways, err := client.ListNetworkGateways(environmentId, nil, nil, nil, nil, nil) if err != nil { return nil } diff --git a/internal/network/command_gateway_create.go b/internal/network/command_gateway_create.go index 13b395f4e6..800582f492 100644 --- a/internal/network/command_gateway_create.go +++ b/internal/network/command_gateway_create.go @@ -122,7 +122,7 @@ func (c *command) gatewayCreate(cmd *cobra.Command, args []string) error { createGateway.Spec.SetDisplayName(args[0]) } - gateway, err := c.V2Client.CreateGateway(createGateway) + gateway, err := c.V2Client.CreateNetworkGateway(createGateway) if err != nil { return err } diff --git a/internal/network/command_gateway_delete.go b/internal/network/command_gateway_delete.go index 3222e2bc9b..a7e02c8d33 100644 --- a/internal/network/command_gateway_delete.go +++ b/internal/network/command_gateway_delete.go @@ -36,7 +36,7 @@ func (c *command) gatewayDelete(cmd *cobra.Command, args []string) error { } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetGateway(environmentId, id) + _, err := c.V2Client.GetNetworkGateway(environmentId, id) return err == nil } @@ -45,7 +45,7 @@ func (c *command) gatewayDelete(cmd *cobra.Command, args []string) error { } deleteFunc := func(id string) error { - return c.V2Client.DeleteGateway(environmentId, id) + return c.V2Client.DeleteNetworkGateway(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_gateway_describe.go b/internal/network/command_gateway_describe.go index ab60e84636..bc158e0361 100644 --- a/internal/network/command_gateway_describe.go +++ b/internal/network/command_gateway_describe.go @@ -35,7 +35,7 @@ func (c *command) gatewayDescribe(cmd *cobra.Command, args []string) error { return err } - gateway, err := c.V2Client.GetGateway(environmentId, args[0]) + gateway, err := c.V2Client.GetNetworkGateway(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_gateway_list.go b/internal/network/command_gateway_list.go index f5fccc7e7d..1e122a8854 100644 --- a/internal/network/command_gateway_list.go +++ b/internal/network/command_gateway_list.go @@ -78,7 +78,7 @@ func (c *command) gatewayList(cmd *cobra.Command, _ []string) error { phases[i] = strings.ToLower(phase) } - gateways, err := c.V2Client.ListGateways(environmentId, types, ids, regions, displayNames, phases) + gateways, err := c.V2Client.ListNetworkGateways(environmentId, types, ids, regions, displayNames, phases) if err != nil { return err } diff --git a/internal/network/command_gateway_update.go b/internal/network/command_gateway_update.go index 6ffa0fd0c9..084704c28b 100644 --- a/internal/network/command_gateway_update.go +++ b/internal/network/command_gateway_update.go @@ -52,7 +52,7 @@ func (c *command) gatewayUpdate(cmd *cobra.Command, args []string) error { }, } - gateway, err := c.V2Client.UpdateGateway(args[0], updateGateway) + gateway, err := c.V2Client.UpdateNetworkGateway(args[0], updateGateway) if err != nil { return err } diff --git a/internal/network/command_ip_address_list.go b/internal/network/command_ip_address_list.go index 1f1df6ee38..8ac9ad1b52 100644 --- a/internal/network/command_ip_address_list.go +++ b/internal/network/command_ip_address_list.go @@ -57,7 +57,7 @@ func (c *command) ipAddressList(cmd *cobra.Command, _ []string) error { cloud, services, addressType = toUpper(cloud), toUpper(services), toUpper(addressType) - ipAddresses, err := c.V2Client.ListIpAddresses(cloud, region, services, addressType) + ipAddresses, err := c.V2Client.ListNetworkIpAddresses(cloud, region, services, addressType) if err != nil { return err } diff --git a/internal/network/command_peering.go b/internal/network/command_peering.go index 7cdf2395d6..4a6c477e7e 100644 --- a/internal/network/command_peering.go +++ b/internal/network/command_peering.go @@ -50,7 +50,7 @@ func (c *command) getPeerings(name, network, phase []string) ([]networkingv1.Net return nil, err } - return c.V2Client.ListPeerings(environmentId, name, network, phase) + return c.V2Client.ListNetworkPeerings(environmentId, name, network, phase) } func (c *command) validPeeringArgs(cmd *cobra.Command, args []string) []string { diff --git a/internal/network/command_peering_create.go b/internal/network/command_peering_create.go index ff6206e028..f784807e0e 100644 --- a/internal/network/command_peering_create.go +++ b/internal/network/command_peering_create.go @@ -123,7 +123,7 @@ func (c *command) peeringCreate(cmd *cobra.Command, args []string) error { } } - peering, err := c.V2Client.CreatePeering(createPeering) + peering, err := c.V2Client.CreateNetworkPeering(createPeering) if err != nil { return err } diff --git a/internal/network/command_peering_delete.go b/internal/network/command_peering_delete.go index 9598f11aa6..e44c3647eb 100644 --- a/internal/network/command_peering_delete.go +++ b/internal/network/command_peering_delete.go @@ -36,7 +36,7 @@ func (c *command) peeringDelete(cmd *cobra.Command, args []string) error { } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetPeering(environmentId, id) + _, err := c.V2Client.GetNetworkPeering(environmentId, id) return err == nil } @@ -45,7 +45,7 @@ func (c *command) peeringDelete(cmd *cobra.Command, args []string) error { } deleteFunc := func(id string) error { - return c.V2Client.DeletePeering(environmentId, id) + return c.V2Client.DeleteNetworkPeering(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_peering_describe.go b/internal/network/command_peering_describe.go index 09109b9feb..e124d6c98d 100644 --- a/internal/network/command_peering_describe.go +++ b/internal/network/command_peering_describe.go @@ -35,7 +35,7 @@ func (c *command) peeringDescribe(cmd *cobra.Command, args []string) error { return err } - peering, err := c.V2Client.GetPeering(environmentId, args[0]) + peering, err := c.V2Client.GetNetworkPeering(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_peering_update.go b/internal/network/command_peering_update.go index 31982372f1..fe482a155a 100644 --- a/internal/network/command_peering_update.go +++ b/internal/network/command_peering_update.go @@ -52,7 +52,7 @@ func (c *command) peeringUpdate(cmd *cobra.Command, args []string) error { }, } - peering, err := c.V2Client.UpdatePeering(environmentId, args[0], updatePeering) + peering, err := c.V2Client.UpdateNetworkPeering(environmentId, args[0], updatePeering) if err != nil { return err } diff --git a/internal/network/command_private_link_access.go b/internal/network/command_private_link_access.go index 7788c1ec3c..eb3362350d 100644 --- a/internal/network/command_private_link_access.go +++ b/internal/network/command_private_link_access.go @@ -45,7 +45,7 @@ func (c *command) getPrivateLinkAccesses(name, network, phase []string) ([]netwo return nil, err } - return c.V2Client.ListPrivateLinkAccesses(environmentId, name, network, phase) + return c.V2Client.ListNetworkPrivateLinkAccesses(environmentId, name, network, phase) } func (c *command) validPrivateLinkAccessArgs(cmd *cobra.Command, args []string) []string { diff --git a/internal/network/command_private_link_access_create.go b/internal/network/command_private_link_access_create.go index 56955b67cb..61abd66452 100644 --- a/internal/network/command_private_link_access_create.go +++ b/internal/network/command_private_link_access_create.go @@ -114,7 +114,7 @@ func (c *command) privateLinkAccessCreate(cmd *cobra.Command, args []string) err } } - access, err := c.V2Client.CreatePrivateLinkAccess(createPrivateLinkAccess) + access, err := c.V2Client.CreateNetworkPrivateLinkAccess(createPrivateLinkAccess) if err != nil { return err } diff --git a/internal/network/command_private_link_access_delete.go b/internal/network/command_private_link_access_delete.go index 8ead02393a..e916c5346b 100644 --- a/internal/network/command_private_link_access_delete.go +++ b/internal/network/command_private_link_access_delete.go @@ -36,7 +36,7 @@ func (c *command) privateLinkAccessDelete(cmd *cobra.Command, args []string) err } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetPrivateLinkAccess(environmentId, id) + _, err := c.V2Client.GetNetworkPrivateLinkAccess(environmentId, id) return err == nil } @@ -45,7 +45,7 @@ func (c *command) privateLinkAccessDelete(cmd *cobra.Command, args []string) err } deleteFunc := func(id string) error { - return c.V2Client.DeletePrivateLinkAccess(environmentId, id) + return c.V2Client.DeleteNetworkPrivateLinkAccess(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_private_link_access_describe.go b/internal/network/command_private_link_access_describe.go index 88488a1c60..00a57a756c 100644 --- a/internal/network/command_private_link_access_describe.go +++ b/internal/network/command_private_link_access_describe.go @@ -35,7 +35,7 @@ func (c *command) privateLinkAccessDescribe(cmd *cobra.Command, args []string) e return err } - access, err := c.V2Client.GetPrivateLinkAccess(environmentId, args[0]) + access, err := c.V2Client.GetNetworkPrivateLinkAccess(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_private_link_access_test.go b/internal/network/command_private_link_access_test.go index b220826ce9..9dddfa043c 100644 --- a/internal/network/command_private_link_access_test.go +++ b/internal/network/command_private_link_access_test.go @@ -10,7 +10,7 @@ import ( pcloud "github.com/confluentinc/cli/v4/pkg/cloud" ) -func TestGetPrivateLinkAccessCloudWithAws(t *testing.T) { +func TestGetNetworkPrivateLinkAccessCloudWithAws(t *testing.T) { cloud, err := getPrivateLinkAccessCloud(networkingv1.NetworkingV1PrivateLinkAccess{ Id: networkingv1.PtrString("pla-123456"), Spec: &networkingv1.NetworkingV1PrivateLinkAccessSpec{ @@ -32,7 +32,7 @@ func TestGetPrivateLinkAccessCloudWithAws(t *testing.T) { assert.Equal(t, pcloud.Aws, cloud) } -func TestGetPrivateLinkAccessCloudWithAzure(t *testing.T) { +func TestGetNetworkPrivateLinkAccessCloudWithAzure(t *testing.T) { cloud, err := getPrivateLinkAccessCloud(networkingv1.NetworkingV1PrivateLinkAccess{ Id: networkingv1.PtrString("pla-123456"), Spec: &networkingv1.NetworkingV1PrivateLinkAccessSpec{ @@ -54,7 +54,7 @@ func TestGetPrivateLinkAccessCloudWithAzure(t *testing.T) { assert.Equal(t, pcloud.Azure, cloud) } -func TestGetPrivateLinkAccessCloudWithGcp(t *testing.T) { +func TestGetNetworkPrivateLinkAccessCloudWithGcp(t *testing.T) { cloud, err := getPrivateLinkAccessCloud(networkingv1.NetworkingV1PrivateLinkAccess{ Id: networkingv1.PtrString("pla-123456"), Spec: &networkingv1.NetworkingV1PrivateLinkAccessSpec{ @@ -76,7 +76,7 @@ func TestGetPrivateLinkAccessCloudWithGcp(t *testing.T) { assert.Equal(t, pcloud.Gcp, cloud) } -func TestGetPrivateLinkAccessCloudWithEmptyValue(t *testing.T) { +func TestGetNetworkPrivateLinkAccessCloudWithEmptyValue(t *testing.T) { _, err := getPrivateLinkAccessCloud(networkingv1.NetworkingV1PrivateLinkAccess{}) assert.Error(t, err) } diff --git a/internal/network/command_private_link_access_update.go b/internal/network/command_private_link_access_update.go index 057dd27aa3..2bae78d440 100644 --- a/internal/network/command_private_link_access_update.go +++ b/internal/network/command_private_link_access_update.go @@ -52,7 +52,7 @@ func (c *command) privateLinkAccessUpdate(cmd *cobra.Command, args []string) err }, } - access, err := c.V2Client.UpdatePrivateLinkAccess(environmentId, args[0], updatePrivateLinkAccess) + access, err := c.V2Client.UpdateNetworkPrivateLinkAccess(environmentId, args[0], updatePrivateLinkAccess) if err != nil { return err } diff --git a/internal/network/command_private_link_attachment.go b/internal/network/command_private_link_attachment.go index 93bdfa349a..fdfb8cfa62 100644 --- a/internal/network/command_private_link_attachment.go +++ b/internal/network/command_private_link_attachment.go @@ -45,7 +45,7 @@ func (c *command) getPrivateLinkAttachments(name, cloud, region, phase []string) return nil, err } - return c.V2Client.ListPrivateLinkAttachments(environmentId, name, cloud, region, phase) + return c.V2Client.ListNetworkPrivateLinkAttachments(environmentId, name, cloud, region, phase) } func (c *command) validPrivateLinkAttachmentArgs(cmd *cobra.Command, args []string) []string { diff --git a/internal/network/command_private_link_attachment_connection_create.go b/internal/network/command_private_link_attachment_connection_create.go index 5dadf6a3de..e6ac5459c7 100644 --- a/internal/network/command_private_link_attachment_connection_create.go +++ b/internal/network/command_private_link_attachment_connection_create.go @@ -106,7 +106,7 @@ func (c *command) privateLinkAttachmentConnectionCreate(cmd *cobra.Command, args } } - connection, err := c.V2Client.CreatePrivateLinkAttachmentConnection(createPrivateLinkAttachmentConnection) + connection, err := c.V2Client.CreateNetworkPrivateLinkAttachmentConnection(createPrivateLinkAttachmentConnection) if err != nil { return err } diff --git a/internal/network/command_private_link_attachment_connection_delete.go b/internal/network/command_private_link_attachment_connection_delete.go index a4b44dd52a..0757030aab 100644 --- a/internal/network/command_private_link_attachment_connection_delete.go +++ b/internal/network/command_private_link_attachment_connection_delete.go @@ -35,7 +35,7 @@ func (c *command) privateLinkAttachmentConnectionDelete(cmd *cobra.Command, args } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetPrivateLinkAttachmentConnection(environmentId, id) + _, err := c.V2Client.GetNetworkPrivateLinkAttachmentConnection(environmentId, id) return err == nil } @@ -44,7 +44,7 @@ func (c *command) privateLinkAttachmentConnectionDelete(cmd *cobra.Command, args } deleteFunc := func(id string) error { - return c.V2Client.DeletePrivateLinkAttachmentConnection(environmentId, id) + return c.V2Client.DeleteNetworkPrivateLinkAttachmentConnection(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_private_link_attachment_connection_describe.go b/internal/network/command_private_link_attachment_connection_describe.go index ede7dccb62..5add426820 100644 --- a/internal/network/command_private_link_attachment_connection_describe.go +++ b/internal/network/command_private_link_attachment_connection_describe.go @@ -27,7 +27,7 @@ func (c *command) privateLinkAttachmentConnectionDescribe(cmd *cobra.Command, ar return err } - connection, err := c.V2Client.GetPrivateLinkAttachmentConnection(environmentId, args[0]) + connection, err := c.V2Client.GetNetworkPrivateLinkAttachmentConnection(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_private_link_attachment_connection_list.go b/internal/network/command_private_link_attachment_connection_list.go index 8f3eb1c1ad..81210f3bab 100644 --- a/internal/network/command_private_link_attachment_connection_list.go +++ b/internal/network/command_private_link_attachment_connection_list.go @@ -47,7 +47,7 @@ func (c *command) privateLinkAttachmentConnectionList(cmd *cobra.Command, _ []st return err } - connections, err := c.V2Client.ListPrivateLinkAttachmentConnections(environmentId, attachment) + connections, err := c.V2Client.ListNetworkPrivateLinkAttachmentConnections(environmentId, attachment) if err != nil { return err } diff --git a/internal/network/command_private_link_attachment_connection_update.go b/internal/network/command_private_link_attachment_connection_update.go index 768c7d71ec..ebdc206fdb 100644 --- a/internal/network/command_private_link_attachment_connection_update.go +++ b/internal/network/command_private_link_attachment_connection_update.go @@ -51,7 +51,7 @@ func (c *command) privateLinkAttachmentConnectionUpdate(cmd *cobra.Command, args }, } - connection, err := c.V2Client.UpdatePrivateLinkAttachmentConnection(environmentId, args[0], updatePrivateLinkAttachmentConnection) + connection, err := c.V2Client.UpdateNetworkPrivateLinkAttachmentConnection(environmentId, args[0], updatePrivateLinkAttachmentConnection) if err != nil { return err } diff --git a/internal/network/command_private_link_attachment_create.go b/internal/network/command_private_link_attachment_create.go index a67b3dfeaf..7222e5fc75 100644 --- a/internal/network/command_private_link_attachment_create.go +++ b/internal/network/command_private_link_attachment_create.go @@ -71,7 +71,7 @@ func (c *command) privateLinkAttachmentCreate(cmd *cobra.Command, args []string) createPrivateLinkAttachment.Spec.SetDisplayName(name) } - attachment, err := c.V2Client.CreatePrivateLinkAttachment(createPrivateLinkAttachment) + attachment, err := c.V2Client.CreateNetworkPrivateLinkAttachment(createPrivateLinkAttachment) if err != nil { return err } diff --git a/internal/network/command_private_link_attachment_delete.go b/internal/network/command_private_link_attachment_delete.go index 446bd6351b..6f71e031dc 100644 --- a/internal/network/command_private_link_attachment_delete.go +++ b/internal/network/command_private_link_attachment_delete.go @@ -36,7 +36,7 @@ func (c *command) privateLinkAttachmentDelete(cmd *cobra.Command, args []string) } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetPrivateLinkAttachment(environmentId, id) + _, err := c.V2Client.GetNetworkPrivateLinkAttachment(environmentId, id) return err == nil } @@ -45,7 +45,7 @@ func (c *command) privateLinkAttachmentDelete(cmd *cobra.Command, args []string) } deleteFunc := func(id string) error { - return c.V2Client.DeletePrivateLinkAttachment(environmentId, id) + return c.V2Client.DeleteNetworkPrivateLinkAttachment(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_private_link_attachment_describe.go b/internal/network/command_private_link_attachment_describe.go index c5ac142aec..fe19d6f94e 100644 --- a/internal/network/command_private_link_attachment_describe.go +++ b/internal/network/command_private_link_attachment_describe.go @@ -35,7 +35,7 @@ func (c *command) privateLinkAttachmentDescribe(cmd *cobra.Command, args []strin return err } - attachment, err := c.V2Client.GetPrivateLinkAttachment(environmentId, args[0]) + attachment, err := c.V2Client.GetNetworkPrivateLinkAttachment(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_private_link_attachment_update.go b/internal/network/command_private_link_attachment_update.go index f601ed6b2b..9c8353f92e 100644 --- a/internal/network/command_private_link_attachment_update.go +++ b/internal/network/command_private_link_attachment_update.go @@ -52,7 +52,7 @@ func (c *command) privateLinkAttachmentUpdate(cmd *cobra.Command, args []string) }, } - attachment, err := c.V2Client.UpdatePrivateLinkAttachment(environmentId, args[0], updatePrivateLinkAttachment) + attachment, err := c.V2Client.UpdateNetworkPrivateLinkAttachment(environmentId, args[0], updatePrivateLinkAttachment) if err != nil { return err } diff --git a/internal/network/command_transit_gateway_attachment.go b/internal/network/command_transit_gateway_attachment.go index 356c37b622..f66497ccdc 100644 --- a/internal/network/command_transit_gateway_attachment.go +++ b/internal/network/command_transit_gateway_attachment.go @@ -45,7 +45,7 @@ func (c *command) getTransitGatewayAttachments(name, network, phase []string) ([ return nil, err } - return c.V2Client.ListTransitGatewayAttachments(environmentId, name, network, phase) + return c.V2Client.ListNetworkTransitGatewayAttachments(environmentId, name, network, phase) } func (c *command) validTransitGatewayAttachmentArgs(cmd *cobra.Command, args []string) []string { diff --git a/internal/network/command_transit_gateway_attachment_create.go b/internal/network/command_transit_gateway_attachment_create.go index a11506563d..0904ebeb6f 100644 --- a/internal/network/command_transit_gateway_attachment_create.go +++ b/internal/network/command_transit_gateway_attachment_create.go @@ -93,7 +93,7 @@ func (c *command) transitGatewayAttachmentCreate(cmd *cobra.Command, args []stri createAttachment.Spec.SetDisplayName(name) } - attachment, err := c.V2Client.CreateTransitGatewayAttachment(createAttachment) + attachment, err := c.V2Client.CreateNetworkTransitGatewayAttachment(createAttachment) if err != nil { return err } diff --git a/internal/network/command_transit_gateway_attachment_delete.go b/internal/network/command_transit_gateway_attachment_delete.go index 9952429183..84a550836e 100644 --- a/internal/network/command_transit_gateway_attachment_delete.go +++ b/internal/network/command_transit_gateway_attachment_delete.go @@ -36,7 +36,7 @@ func (c *command) transitGatewayAttachmentDelete(cmd *cobra.Command, args []stri } existenceFunc := func(id string) bool { - _, err := c.V2Client.GetTransitGatewayAttachment(environmentId, id) + _, err := c.V2Client.GetNetworkTransitGatewayAttachment(environmentId, id) return err == nil } @@ -45,7 +45,7 @@ func (c *command) transitGatewayAttachmentDelete(cmd *cobra.Command, args []stri } deleteFunc := func(id string) error { - return c.V2Client.DeleteTransitGatewayAttachment(environmentId, id) + return c.V2Client.DeleteNetworkTransitGatewayAttachment(environmentId, id) } deletedIds, err := deletion.DeleteWithoutMessage(cmd, args, deleteFunc) diff --git a/internal/network/command_transit_gateway_attachment_describe.go b/internal/network/command_transit_gateway_attachment_describe.go index 85d103a1ee..1da0ee8e8d 100644 --- a/internal/network/command_transit_gateway_attachment_describe.go +++ b/internal/network/command_transit_gateway_attachment_describe.go @@ -35,7 +35,7 @@ func (c *command) transitGatewayAttachmentDescribe(cmd *cobra.Command, args []st return err } - attachment, err := c.V2Client.GetTransitGatewayAttachment(environmentId, args[0]) + attachment, err := c.V2Client.GetNetworkTransitGatewayAttachment(environmentId, args[0]) if err != nil { return err } diff --git a/internal/network/command_transit_gateway_attachment_update.go b/internal/network/command_transit_gateway_attachment_update.go index bafda265b5..2109718d62 100644 --- a/internal/network/command_transit_gateway_attachment_update.go +++ b/internal/network/command_transit_gateway_attachment_update.go @@ -52,7 +52,7 @@ func (c *command) transitGatewayAttachmentUpdate(cmd *cobra.Command, args []stri }, } - attachment, err := c.V2Client.UpdateTransitGatewayAttachment(environmentId, args[0], updateTransitGatewayAttachment) + attachment, err := c.V2Client.UpdateNetworkTransitGatewayAttachment(environmentId, args[0], updateTransitGatewayAttachment) if err != nil { return err } diff --git a/pkg/ccloudv2/certificate_authority.go b/pkg/ccloudv2/certificate_authority.go index 9d938c96d4..ab75be7375 100644 --- a/pkg/ccloudv2/certificate_authority.go +++ b/pkg/ccloudv2/certificate_authority.go @@ -27,33 +27,33 @@ func (c *Client) certificatePoolApiContext() context.Context { return context.WithValue(context.Background(), certificateauthorityv2.ContextAccessToken, c.cfg.Context().GetAuthToken()) } -func (c *Client) CreateCertificateAuthority(certRequest certificateauthorityv2.IamV2CreateCertRequest) (certificateauthorityv2.IamV2CertificateAuthority, error) { +func (c *Client) CreateIamCertificateAuthority(certRequest certificateauthorityv2.IamV2CreateCertRequest) (certificateauthorityv2.IamV2CertificateAuthority, error) { resp, httpResp, err := c.CertificateAuthorityClient.CertificateAuthoritiesIamV2Api.CreateIamV2CertificateAuthority(c.certificateAuthorityApiContext()).IamV2CreateCertRequest(certRequest).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetCertificateAuthority(id string) (certificateauthorityv2.IamV2CertificateAuthority, error) { +func (c *Client) GetIamCertificateAuthority(id string) (certificateauthorityv2.IamV2CertificateAuthority, error) { resp, httpResp, err := c.CertificateAuthorityClient.CertificateAuthoritiesIamV2Api.GetIamV2CertificateAuthority(c.certificateAuthorityApiContext(), id).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdateCertificateAuthority(certRequest certificateauthorityv2.IamV2UpdateCertRequest) (certificateauthorityv2.IamV2CertificateAuthority, error) { +func (c *Client) UpdateIamCertificateAuthority(certRequest certificateauthorityv2.IamV2UpdateCertRequest) (certificateauthorityv2.IamV2CertificateAuthority, error) { resp, httpResp, err := c.CertificateAuthorityClient.CertificateAuthoritiesIamV2Api.UpdateIamV2CertificateAuthority(c.certificateAuthorityApiContext(), certRequest.GetId()).IamV2UpdateCertRequest(certRequest).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeleteCertificateAuthority(id string) error { +func (c *Client) DeleteIamCertificateAuthority(id string) error { _, httpResp, err := c.CertificateAuthorityClient.CertificateAuthoritiesIamV2Api.DeleteIamV2CertificateAuthority(c.certificateAuthorityApiContext(), id).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListCertificateAuthorities() ([]certificateauthorityv2.IamV2CertificateAuthority, error) { +func (c *Client) ListIamCertificateAuthorities() ([]certificateauthorityv2.IamV2CertificateAuthority, error) { var list []certificateauthorityv2.IamV2CertificateAuthority done := false pageToken := "" for !done { - page, httpResp, err := c.executeListCertificateAuthorities(pageToken) + page, httpResp, err := c.executeListIamCertificateAuthorities(pageToken) if err != nil { return nil, errors.CatchCCloudV2Error(err, httpResp) } @@ -67,7 +67,7 @@ func (c *Client) ListCertificateAuthorities() ([]certificateauthorityv2.IamV2Cer return list, nil } -func (c *Client) executeListCertificateAuthorities(pageToken string) (certificateauthorityv2.IamV2CertificateAuthorityList, *http.Response, error) { +func (c *Client) executeListIamCertificateAuthorities(pageToken string) (certificateauthorityv2.IamV2CertificateAuthorityList, *http.Response, error) { req := c.CertificateAuthorityClient.CertificateAuthoritiesIamV2Api.ListIamV2CertificateAuthorities(c.certificateAuthorityApiContext()).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) @@ -75,7 +75,7 @@ func (c *Client) executeListCertificateAuthorities(pageToken string) (certificat return req.Execute() } -func (c *Client) CreateCertificatePool(certificatePool certificateauthorityv2.IamV2CertificateIdentityPool, provider string, resourceOwner string) (certificateauthorityv2.IamV2CertificateIdentityPool, error) { +func (c *Client) CreateIamCertificatePool(certificatePool certificateauthorityv2.IamV2CertificateIdentityPool, provider string, resourceOwner string) (certificateauthorityv2.IamV2CertificateIdentityPool, error) { resp, httpResp, err := c.CertificateAuthorityClient.CertificateIdentityPoolsIamV2Api. CreateIamV2CertificateIdentityPool(c.certificatePoolApiContext(), provider). AssignedResourceOwner(resourceOwner). @@ -83,28 +83,28 @@ func (c *Client) CreateCertificatePool(certificatePool certificateauthorityv2.Ia return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetCertificatePool(id string, provider string) (certificateauthorityv2.IamV2CertificateIdentityPool, error) { +func (c *Client) GetIamCertificatePool(id string, provider string) (certificateauthorityv2.IamV2CertificateIdentityPool, error) { resp, httpResp, err := c.CertificateAuthorityClient.CertificateIdentityPoolsIamV2Api.GetIamV2CertificateIdentityPool(c.certificatePoolApiContext(), provider, id).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdateCertificatePool(certificatePool certificateauthorityv2.IamV2CertificateIdentityPool, provider string) (certificateauthorityv2.IamV2CertificateIdentityPool, error) { +func (c *Client) UpdateIamCertificatePool(certificatePool certificateauthorityv2.IamV2CertificateIdentityPool, provider string) (certificateauthorityv2.IamV2CertificateIdentityPool, error) { resp, httpResp, err := c.CertificateAuthorityClient.CertificateIdentityPoolsIamV2Api.UpdateIamV2CertificateIdentityPool(c.certificatePoolApiContext(), provider, *certificatePool.Id).IamV2CertificateIdentityPool(certificatePool).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeleteCertificatePool(id string, provider string) error { +func (c *Client) DeleteIamCertificatePool(id string, provider string) error { _, httpResp, err := c.CertificateAuthorityClient.CertificateIdentityPoolsIamV2Api.DeleteIamV2CertificateIdentityPool(c.certificatePoolApiContext(), provider, id).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListCertificatePool(providerID string) ([]certificateauthorityv2.IamV2CertificateIdentityPool, error) { +func (c *Client) ListIamCertificatePools(providerID string) ([]certificateauthorityv2.IamV2CertificateIdentityPool, error) { var list []certificateauthorityv2.IamV2CertificateIdentityPool done := false pageToken := "" for !done { - page, httpResp, err := c.executeListCertificatePool(providerID, pageToken) + page, httpResp, err := c.executeListIamCertificatePools(providerID, pageToken) if err != nil { return nil, errors.CatchCCloudV2Error(err, httpResp) } @@ -119,7 +119,7 @@ func (c *Client) ListCertificatePool(providerID string) ([]certificateauthorityv return list, nil } -func (c *Client) executeListCertificatePool(providerID, pageToken string) (certificateauthorityv2.IamV2CertificateIdentityPoolList, *http.Response, error) { +func (c *Client) executeListIamCertificatePools(providerID, pageToken string) (certificateauthorityv2.IamV2CertificateIdentityPoolList, *http.Response, error) { req := c.CertificateAuthorityClient.CertificateIdentityPoolsIamV2Api.ListIamV2CertificateIdentityPools(c.certificatePoolApiContext(), providerID).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) diff --git a/pkg/ccloudv2/identity_provider.go b/pkg/ccloudv2/identity_provider.go index 906b2d28da..5d1c68c838 100644 --- a/pkg/ccloudv2/identity_provider.go +++ b/pkg/ccloudv2/identity_provider.go @@ -27,33 +27,33 @@ func (c *Client) identityPoolApiContext() context.Context { return context.WithValue(context.Background(), identityproviderv2.ContextAccessToken, c.cfg.Context().GetAuthToken()) } -func (c *Client) CreateIdentityProvider(identityProvider identityproviderv2.IamV2IdentityProvider) (identityproviderv2.IamV2IdentityProvider, error) { +func (c *Client) CreateIamIdentityProvider(identityProvider identityproviderv2.IamV2IdentityProvider) (identityproviderv2.IamV2IdentityProvider, error) { resp, httpResp, err := c.IdentityProviderClient.IdentityProvidersIamV2Api.CreateIamV2IdentityProvider(c.identityProviderApiContext()).IamV2IdentityProvider(identityProvider).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeleteIdentityProvider(id string) error { +func (c *Client) DeleteIamIdentityProvider(id string) error { httpResp, err := c.IdentityProviderClient.IdentityProvidersIamV2Api.DeleteIamV2IdentityProvider(c.identityProviderApiContext(), id).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetIdentityProvider(id string) (identityproviderv2.IamV2IdentityProvider, error) { +func (c *Client) GetIamIdentityProvider(id string) (identityproviderv2.IamV2IdentityProvider, error) { resp, httpResp, err := c.IdentityProviderClient.IdentityProvidersIamV2Api.GetIamV2IdentityProvider(c.identityProviderApiContext(), id).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdateIdentityProvider(update identityproviderv2.IamV2IdentityProvider) (identityproviderv2.IamV2IdentityProvider, error) { +func (c *Client) UpdateIamIdentityProvider(update identityproviderv2.IamV2IdentityProvider) (identityproviderv2.IamV2IdentityProvider, error) { resp, httpResp, err := c.IdentityProviderClient.IdentityProvidersIamV2Api.UpdateIamV2IdentityProvider(c.identityProviderApiContext(), *update.Id).IamV2IdentityProvider(update).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListIdentityProviders() ([]identityproviderv2.IamV2IdentityProvider, error) { +func (c *Client) ListIamIdentityProviders() ([]identityproviderv2.IamV2IdentityProvider, error) { var list []identityproviderv2.IamV2IdentityProvider done := false pageToken := "" for !done { - page, httpResp, err := c.executeListIdentityProviders(pageToken) + page, httpResp, err := c.executeListIamIdentityProviders(pageToken) if err != nil { return nil, errors.CatchCCloudV2Error(err, httpResp) } @@ -67,7 +67,7 @@ func (c *Client) ListIdentityProviders() ([]identityproviderv2.IamV2IdentityProv return list, nil } -func (c *Client) executeListIdentityProviders(pageToken string) (identityproviderv2.IamV2IdentityProviderList, *http.Response, error) { +func (c *Client) executeListIamIdentityProviders(pageToken string) (identityproviderv2.IamV2IdentityProviderList, *http.Response, error) { req := c.IdentityProviderClient.IdentityProvidersIamV2Api.ListIamV2IdentityProviders(c.identityProviderApiContext()).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) @@ -75,7 +75,7 @@ func (c *Client) executeListIdentityProviders(pageToken string) (identityprovide return req.Execute() } -func (c *Client) CreateIdentityPool(identityPool identityproviderv2.IamV2IdentityPool, providerId string, assignedResourceOwner string) (identityproviderv2.IamV2IdentityPool, error) { +func (c *Client) CreateIamIdentityPool(identityPool identityproviderv2.IamV2IdentityPool, providerId string, assignedResourceOwner string) (identityproviderv2.IamV2IdentityPool, error) { resp, httpResp, err := c.IdentityProviderClient.IdentityPoolsIamV2Api. CreateIamV2IdentityPool(c.identityPoolApiContext(), providerId). AssignedResourceOwner(assignedResourceOwner). @@ -83,28 +83,28 @@ func (c *Client) CreateIdentityPool(identityPool identityproviderv2.IamV2Identit return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeleteIdentityPool(id, providerId string) error { +func (c *Client) DeleteIamIdentityPool(id, providerId string) error { httpResp, err := c.IdentityProviderClient.IdentityPoolsIamV2Api.DeleteIamV2IdentityPool(c.identityPoolApiContext(), providerId, id).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetIdentityPool(id, providerId string) (identityproviderv2.IamV2IdentityPool, error) { +func (c *Client) GetIamIdentityPool(id, providerId string) (identityproviderv2.IamV2IdentityPool, error) { resp, httpResp, err := c.IdentityProviderClient.IdentityPoolsIamV2Api.GetIamV2IdentityPool(c.identityPoolApiContext(), providerId, id).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdateIdentityPool(identityPool identityproviderv2.IamV2IdentityPool, providerId string) (identityproviderv2.IamV2IdentityPool, error) { +func (c *Client) UpdateIamIdentityPool(identityPool identityproviderv2.IamV2IdentityPool, providerId string) (identityproviderv2.IamV2IdentityPool, error) { resp, httpResp, err := c.IdentityProviderClient.IdentityPoolsIamV2Api.UpdateIamV2IdentityPool(c.identityPoolApiContext(), providerId, *identityPool.Id).IamV2IdentityPool(identityPool).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListIdentityPools(providerId string) ([]identityproviderv2.IamV2IdentityPool, error) { +func (c *Client) ListIamIdentityPools(providerId string) ([]identityproviderv2.IamV2IdentityPool, error) { var list []identityproviderv2.IamV2IdentityPool done := false pageToken := "" for !done { - page, httpResp, err := c.executeListIdentityPools(providerId, pageToken) + page, httpResp, err := c.executeListIamIdentityPools(providerId, pageToken) if err != nil { return nil, errors.CatchCCloudV2Error(err, httpResp) } @@ -118,7 +118,7 @@ func (c *Client) ListIdentityPools(providerId string) ([]identityproviderv2.IamV return list, nil } -func (c *Client) executeListIdentityPools(providerId, pageToken string) (identityproviderv2.IamV2IdentityPoolList, *http.Response, error) { +func (c *Client) executeListIamIdentityPools(providerId, pageToken string) (identityproviderv2.IamV2IdentityPoolList, *http.Response, error) { req := c.IdentityProviderClient.IdentityPoolsIamV2Api.ListIamV2IdentityPools(c.identityPoolApiContext(), providerId).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) diff --git a/pkg/ccloudv2/networking-gateway.go b/pkg/ccloudv2/networking-gateway.go index 5452f3e256..5cb739e9bb 100644 --- a/pkg/ccloudv2/networking-gateway.go +++ b/pkg/ccloudv2/networking-gateway.go @@ -23,33 +23,33 @@ func (c *Client) networkingGatewayApiContext() context.Context { return context.WithValue(context.Background(), networkinggatewayv1.ContextAccessToken, c.cfg.Context().GetAuthToken()) } -func (c *Client) GetGateway(environment, id string) (networkinggatewayv1.NetworkingV1Gateway, error) { +func (c *Client) GetNetworkGateway(environment, id string) (networkinggatewayv1.NetworkingV1Gateway, error) { resp, httpResp, err := c.NetworkingGatewayClient.GatewaysNetworkingV1Api.GetNetworkingV1Gateway(c.networkingGatewayApiContext(), id).Environment(environment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeleteGateway(environment, id string) error { +func (c *Client) DeleteNetworkGateway(environment, id string) error { httpResp, err := c.NetworkingGatewayClient.GatewaysNetworkingV1Api.DeleteNetworkingV1Gateway(c.networkingGatewayApiContext(), id).Environment(environment).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) CreateGateway(gateway networkinggatewayv1.NetworkingV1Gateway) (networkinggatewayv1.NetworkingV1Gateway, error) { +func (c *Client) CreateNetworkGateway(gateway networkinggatewayv1.NetworkingV1Gateway) (networkinggatewayv1.NetworkingV1Gateway, error) { resp, httpResp, err := c.NetworkingGatewayClient.GatewaysNetworkingV1Api.CreateNetworkingV1Gateway(c.networkingGatewayApiContext()).NetworkingV1Gateway(gateway).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdateGateway(id string, gatewayUpdate networkinggatewayv1.NetworkingV1GatewayUpdate) (networkinggatewayv1.NetworkingV1Gateway, error) { +func (c *Client) UpdateNetworkGateway(id string, gatewayUpdate networkinggatewayv1.NetworkingV1GatewayUpdate) (networkinggatewayv1.NetworkingV1Gateway, error) { resp, httpResp, err := c.NetworkingGatewayClient.GatewaysNetworkingV1Api.UpdateNetworkingV1Gateway(c.networkingGatewayApiContext(), id).NetworkingV1GatewayUpdate(gatewayUpdate).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListGateways(environment string, types, ids, regions, displayNames, phases []string) ([]networkinggatewayv1.NetworkingV1Gateway, error) { +func (c *Client) ListNetworkGateways(environment string, types, ids, regions, displayNames, phases []string) ([]networkinggatewayv1.NetworkingV1Gateway, error) { var list []networkinggatewayv1.NetworkingV1Gateway done := false pageToken := "" for !done { - page, err := c.executeListGateways(environment, pageToken, types, ids, regions, displayNames, phases) + page, err := c.executeListNetworkGateways(environment, pageToken, types, ids, regions, displayNames, phases) if err != nil { return nil, err } @@ -63,7 +63,7 @@ func (c *Client) ListGateways(environment string, types, ids, regions, displayNa return list, nil } -func (c *Client) executeListGateways(environment, pageToken string, types, ids, regions, displayNames, phases []string) (networkinggatewayv1.NetworkingV1GatewayList, error) { +func (c *Client) executeListNetworkGateways(environment, pageToken string, types, ids, regions, displayNames, phases []string) (networkinggatewayv1.NetworkingV1GatewayList, error) { req := c.NetworkingGatewayClient.GatewaysNetworkingV1Api.ListNetworkingV1Gateways(c.networkingGatewayApiContext()).Environment(environment).PageSize(ccloudV2ListPageSize) if len(types) > 0 { diff --git a/pkg/ccloudv2/networking.go b/pkg/ccloudv2/networking.go index fb5e534a53..53452dc45b 100644 --- a/pkg/ccloudv2/networking.go +++ b/pkg/ccloudv2/networking.go @@ -73,13 +73,13 @@ func (c *Client) executeListNetworks(environment, pageToken string, name, cloud, return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListPeerings(environment string, name, network, phase []string) ([]networkingv1.NetworkingV1Peering, error) { +func (c *Client) ListNetworkPeerings(environment string, name, network, phase []string) ([]networkingv1.NetworkingV1Peering, error) { var list []networkingv1.NetworkingV1Peering done := false pageToken := "" for !done { - page, err := c.executeListPeerings(environment, pageToken, name, network, phase) + page, err := c.executeListNetworkPeerings(environment, pageToken, name, network, phase) if err != nil { return nil, err } @@ -93,7 +93,7 @@ func (c *Client) ListPeerings(environment string, name, network, phase []string) return list, nil } -func (c *Client) executeListPeerings(environment, pageToken string, name, network, phase []string) (networkingv1.NetworkingV1PeeringList, error) { +func (c *Client) executeListNetworkPeerings(environment, pageToken string, name, network, phase []string) (networkingv1.NetworkingV1PeeringList, error) { req := c.NetworkingClient.PeeringsNetworkingV1Api.ListNetworkingV1Peerings(c.networkingApiContext()).Environment(environment).SpecDisplayName(name).SpecNetwork(network).StatusPhase(phase).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) @@ -103,33 +103,33 @@ func (c *Client) executeListPeerings(environment, pageToken string, name, networ return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetPeering(environment, id string) (networkingv1.NetworkingV1Peering, error) { +func (c *Client) GetNetworkPeering(environment, id string) (networkingv1.NetworkingV1Peering, error) { resp, httpResp, err := c.NetworkingClient.PeeringsNetworkingV1Api.GetNetworkingV1Peering(c.networkingApiContext(), id).Environment(environment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdatePeering(environment, id string, peeringUpdate networkingv1.NetworkingV1PeeringUpdate) (networkingv1.NetworkingV1Peering, error) { +func (c *Client) UpdateNetworkPeering(environment, id string, peeringUpdate networkingv1.NetworkingV1PeeringUpdate) (networkingv1.NetworkingV1Peering, error) { resp, httpResp, err := c.NetworkingClient.PeeringsNetworkingV1Api.UpdateNetworkingV1Peering(c.networkingApiContext(), id).NetworkingV1PeeringUpdate(peeringUpdate).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeletePeering(environment, id string) error { +func (c *Client) DeleteNetworkPeering(environment, id string) error { httpResp, err := c.NetworkingClient.PeeringsNetworkingV1Api.DeleteNetworkingV1Peering(c.networkingApiContext(), id).Environment(environment).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) CreatePeering(peering networkingv1.NetworkingV1Peering) (networkingv1.NetworkingV1Peering, error) { +func (c *Client) CreateNetworkPeering(peering networkingv1.NetworkingV1Peering) (networkingv1.NetworkingV1Peering, error) { resp, httpResp, err := c.NetworkingClient.PeeringsNetworkingV1Api.CreateNetworkingV1Peering(c.networkingApiContext()).NetworkingV1Peering(peering).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListTransitGatewayAttachments(environment string, name, network, phase []string) ([]networkingv1.NetworkingV1TransitGatewayAttachment, error) { +func (c *Client) ListNetworkTransitGatewayAttachments(environment string, name, network, phase []string) ([]networkingv1.NetworkingV1TransitGatewayAttachment, error) { var list []networkingv1.NetworkingV1TransitGatewayAttachment done := false pageToken := "" for !done { - page, err := c.executeListTransitGatewayAttachments(environment, pageToken, name, network, phase) + page, err := c.executeListNetworkTransitGatewayAttachments(environment, pageToken, name, network, phase) if err != nil { return nil, err } @@ -143,7 +143,7 @@ func (c *Client) ListTransitGatewayAttachments(environment string, name, network return list, nil } -func (c *Client) executeListTransitGatewayAttachments(environment, pageToken string, name, network, phase []string) (networkingv1.NetworkingV1TransitGatewayAttachmentList, error) { +func (c *Client) executeListNetworkTransitGatewayAttachments(environment, pageToken string, name, network, phase []string) (networkingv1.NetworkingV1TransitGatewayAttachmentList, error) { req := c.NetworkingClient.TransitGatewayAttachmentsNetworkingV1Api.ListNetworkingV1TransitGatewayAttachments(c.networkingApiContext()).Environment(environment).SpecDisplayName(name).SpecNetwork(network).StatusPhase(phase).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) @@ -153,33 +153,33 @@ func (c *Client) executeListTransitGatewayAttachments(environment, pageToken str return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetTransitGatewayAttachment(environment, id string) (networkingv1.NetworkingV1TransitGatewayAttachment, error) { +func (c *Client) GetNetworkTransitGatewayAttachment(environment, id string) (networkingv1.NetworkingV1TransitGatewayAttachment, error) { resp, httpResp, err := c.NetworkingClient.TransitGatewayAttachmentsNetworkingV1Api.GetNetworkingV1TransitGatewayAttachment(c.networkingApiContext(), id).Environment(environment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdateTransitGatewayAttachment(environment, id string, transitGatewayAttachmentUpdate networkingv1.NetworkingV1TransitGatewayAttachmentUpdate) (networkingv1.NetworkingV1TransitGatewayAttachment, error) { +func (c *Client) UpdateNetworkTransitGatewayAttachment(environment, id string, transitGatewayAttachmentUpdate networkingv1.NetworkingV1TransitGatewayAttachmentUpdate) (networkingv1.NetworkingV1TransitGatewayAttachment, error) { resp, httpResp, err := c.NetworkingClient.TransitGatewayAttachmentsNetworkingV1Api.UpdateNetworkingV1TransitGatewayAttachment(c.networkingApiContext(), id).NetworkingV1TransitGatewayAttachmentUpdate(transitGatewayAttachmentUpdate).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeleteTransitGatewayAttachment(environment, id string) error { +func (c *Client) DeleteNetworkTransitGatewayAttachment(environment, id string) error { httpResp, err := c.NetworkingClient.TransitGatewayAttachmentsNetworkingV1Api.DeleteNetworkingV1TransitGatewayAttachment(c.networkingApiContext(), id).Environment(environment).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) CreateTransitGatewayAttachment(attachment networkingv1.NetworkingV1TransitGatewayAttachment) (networkingv1.NetworkingV1TransitGatewayAttachment, error) { +func (c *Client) CreateNetworkTransitGatewayAttachment(attachment networkingv1.NetworkingV1TransitGatewayAttachment) (networkingv1.NetworkingV1TransitGatewayAttachment, error) { resp, httpResp, err := c.NetworkingClient.TransitGatewayAttachmentsNetworkingV1Api.CreateNetworkingV1TransitGatewayAttachment(c.networkingApiContext()).NetworkingV1TransitGatewayAttachment(attachment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListPrivateLinkAccesses(environment string, name, network, phase []string) ([]networkingv1.NetworkingV1PrivateLinkAccess, error) { +func (c *Client) ListNetworkPrivateLinkAccesses(environment string, name, network, phase []string) ([]networkingv1.NetworkingV1PrivateLinkAccess, error) { var list []networkingv1.NetworkingV1PrivateLinkAccess done := false pageToken := "" for !done { - page, err := c.executeListPrivateLinkAccesses(environment, pageToken, name, network, phase) + page, err := c.executeListNetworkPrivateLinkAccesses(environment, pageToken, name, network, phase) if err != nil { return nil, err } @@ -193,7 +193,7 @@ func (c *Client) ListPrivateLinkAccesses(environment string, name, network, phas return list, nil } -func (c *Client) executeListPrivateLinkAccesses(environment, pageToken string, name, network, phase []string) (networkingv1.NetworkingV1PrivateLinkAccessList, error) { +func (c *Client) executeListNetworkPrivateLinkAccesses(environment, pageToken string, name, network, phase []string) (networkingv1.NetworkingV1PrivateLinkAccessList, error) { req := c.NetworkingClient.PrivateLinkAccessesNetworkingV1Api.ListNetworkingV1PrivateLinkAccesses(c.networkingApiContext()).Environment(environment).SpecDisplayName(name).SpecNetwork(network).StatusPhase(phase).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) @@ -203,22 +203,22 @@ func (c *Client) executeListPrivateLinkAccesses(environment, pageToken string, n return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetPrivateLinkAccess(environment, id string) (networkingv1.NetworkingV1PrivateLinkAccess, error) { +func (c *Client) GetNetworkPrivateLinkAccess(environment, id string) (networkingv1.NetworkingV1PrivateLinkAccess, error) { resp, httpResp, err := c.NetworkingClient.PrivateLinkAccessesNetworkingV1Api.GetNetworkingV1PrivateLinkAccess(c.networkingApiContext(), id).Environment(environment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdatePrivateLinkAccess(environment, id string, privateLinkAccessUpdate networkingv1.NetworkingV1PrivateLinkAccessUpdate) (networkingv1.NetworkingV1PrivateLinkAccess, error) { +func (c *Client) UpdateNetworkPrivateLinkAccess(environment, id string, privateLinkAccessUpdate networkingv1.NetworkingV1PrivateLinkAccessUpdate) (networkingv1.NetworkingV1PrivateLinkAccess, error) { resp, httpResp, err := c.NetworkingClient.PrivateLinkAccessesNetworkingV1Api.UpdateNetworkingV1PrivateLinkAccess(c.networkingApiContext(), id).NetworkingV1PrivateLinkAccessUpdate(privateLinkAccessUpdate).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeletePrivateLinkAccess(environment, id string) error { +func (c *Client) DeleteNetworkPrivateLinkAccess(environment, id string) error { httpResp, err := c.NetworkingClient.PrivateLinkAccessesNetworkingV1Api.DeleteNetworkingV1PrivateLinkAccess(c.networkingApiContext(), id).Environment(environment).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) CreatePrivateLinkAccess(access networkingv1.NetworkingV1PrivateLinkAccess) (networkingv1.NetworkingV1PrivateLinkAccess, error) { +func (c *Client) CreateNetworkPrivateLinkAccess(access networkingv1.NetworkingV1PrivateLinkAccess) (networkingv1.NetworkingV1PrivateLinkAccess, error) { resp, httpResp, err := c.NetworkingClient.PrivateLinkAccessesNetworkingV1Api.CreateNetworkingV1PrivateLinkAccess(c.networkingApiContext()).NetworkingV1PrivateLinkAccess(access).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } diff --git a/pkg/ccloudv2/networking_access_point.go b/pkg/ccloudv2/networking_access_point.go index 41d49a2536..8ad2db50a4 100644 --- a/pkg/ccloudv2/networking_access_point.go +++ b/pkg/ccloudv2/networking_access_point.go @@ -30,13 +30,13 @@ func (c *Client) networkingAccessPointApiContext() context.Context { return context.WithValue(context.Background(), networkingaccesspointv1.ContextAccessToken, c.cfg.Context().GetAuthToken()) } -func (c *Client) ListAccessPoints(environment string, names []string) ([]networkingaccesspointv1.NetworkingV1AccessPoint, error) { +func (c *Client) ListNetworkAccessPoints(environment string, names []string) ([]networkingaccesspointv1.NetworkingV1AccessPoint, error) { var list []networkingaccesspointv1.NetworkingV1AccessPoint done := false pageToken := "" for !done { - page, err := c.executeListAccessPoints(environment, pageToken, names) + page, err := c.executeListNetworkAccessPoints(environment, pageToken, names) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func (c *Client) ListAccessPoints(environment string, names []string) ([]network return list, nil } -func (c *Client) executeListAccessPoints(environment, pageToken string, names []string) (networkingaccesspointv1.NetworkingV1AccessPointList, error) { +func (c *Client) executeListNetworkAccessPoints(environment, pageToken string, names []string) (networkingaccesspointv1.NetworkingV1AccessPointList, error) { req := c.NetworkingAccessPointClient.AccessPointsNetworkingV1Api.ListNetworkingV1AccessPoints(c.networkingAccessPointApiContext()).Environment(environment).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) @@ -64,33 +64,33 @@ func (c *Client) executeListAccessPoints(environment, pageToken string, names [] return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetAccessPoint(environment, id string) (networkingaccesspointv1.NetworkingV1AccessPoint, error) { +func (c *Client) GetNetworkAccessPoint(environment, id string) (networkingaccesspointv1.NetworkingV1AccessPoint, error) { resp, httpResp, err := c.NetworkingAccessPointClient.AccessPointsNetworkingV1Api.GetNetworkingV1AccessPoint(c.networkingAccessPointApiContext(), id).Environment(environment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeleteAccessPoint(environment, id string) error { +func (c *Client) DeleteNetworkAccessPoint(environment, id string) error { httpResp, err := c.NetworkingAccessPointClient.AccessPointsNetworkingV1Api.DeleteNetworkingV1AccessPoint(c.networkingAccessPointApiContext(), id).Environment(environment).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdateAccessPoint(id string, accessPointUpdate networkingaccesspointv1.NetworkingV1AccessPointUpdate) (networkingaccesspointv1.NetworkingV1AccessPoint, error) { +func (c *Client) UpdateNetworkAccessPoint(id string, accessPointUpdate networkingaccesspointv1.NetworkingV1AccessPointUpdate) (networkingaccesspointv1.NetworkingV1AccessPoint, error) { resp, httpResp, err := c.NetworkingAccessPointClient.AccessPointsNetworkingV1Api.UpdateNetworkingV1AccessPoint(c.networkingAccessPointApiContext(), id).NetworkingV1AccessPointUpdate(accessPointUpdate).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) CreateAccessPoint(accessPoint networkingaccesspointv1.NetworkingV1AccessPoint) (networkingaccesspointv1.NetworkingV1AccessPoint, error) { +func (c *Client) CreateNetworkAccessPoint(accessPoint networkingaccesspointv1.NetworkingV1AccessPoint) (networkingaccesspointv1.NetworkingV1AccessPoint, error) { resp, httpResp, err := c.NetworkingAccessPointClient.AccessPointsNetworkingV1Api.CreateNetworkingV1AccessPoint(c.networkingAccessPointApiContext()).NetworkingV1AccessPoint(accessPoint).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListDnsRecords(environment string, listParameters DnsRecordListParameters) ([]networkingaccesspointv1.NetworkingV1DnsRecord, error) { +func (c *Client) ListNetworkDnsRecords(environment string, listParameters DnsRecordListParameters) ([]networkingaccesspointv1.NetworkingV1DnsRecord, error) { var list []networkingaccesspointv1.NetworkingV1DnsRecord done := false pageToken := "" for !done { - page, err := c.executeListDnsRecords(environment, pageToken, listParameters) + page, err := c.executeListNetworkDnsRecords(environment, pageToken, listParameters) if err != nil { return nil, err } @@ -104,7 +104,7 @@ func (c *Client) ListDnsRecords(environment string, listParameters DnsRecordList return list, nil } -func (c *Client) executeListDnsRecords(environment, pageToken string, listParameters DnsRecordListParameters) (networkingaccesspointv1.NetworkingV1DnsRecordList, error) { +func (c *Client) executeListNetworkDnsRecords(environment, pageToken string, listParameters DnsRecordListParameters) (networkingaccesspointv1.NetworkingV1DnsRecordList, error) { req := c.NetworkingAccessPointClient.DNSRecordsNetworkingV1Api.ListNetworkingV1DnsRecords(c.networkingAccessPointApiContext()).Environment(environment).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) @@ -130,22 +130,22 @@ func (c *Client) executeListDnsRecords(environment, pageToken string, listParame return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetDnsRecord(environment, id string) (networkingaccesspointv1.NetworkingV1DnsRecord, error) { +func (c *Client) GetNetworkDnsRecord(environment, id string) (networkingaccesspointv1.NetworkingV1DnsRecord, error) { resp, httpResp, err := c.NetworkingAccessPointClient.DNSRecordsNetworkingV1Api.GetNetworkingV1DnsRecord(c.networkingAccessPointApiContext(), id).Environment(environment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeleteDnsRecord(environment, id string) error { +func (c *Client) DeleteNetworkDnsRecord(environment, id string) error { httpResp, err := c.NetworkingAccessPointClient.DNSRecordsNetworkingV1Api.DeleteNetworkingV1DnsRecord(c.networkingAccessPointApiContext(), id).Environment(environment).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdateDnsRecord(id string, dnsRecordUpdate networkingaccesspointv1.NetworkingV1DnsRecordUpdate) (networkingaccesspointv1.NetworkingV1DnsRecord, error) { +func (c *Client) UpdateNetworkDnsRecord(id string, dnsRecordUpdate networkingaccesspointv1.NetworkingV1DnsRecordUpdate) (networkingaccesspointv1.NetworkingV1DnsRecord, error) { resp, httpResp, err := c.NetworkingAccessPointClient.DNSRecordsNetworkingV1Api.UpdateNetworkingV1DnsRecord(c.networkingAccessPointApiContext(), id).NetworkingV1DnsRecordUpdate(dnsRecordUpdate).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) CreateDnsRecord(dnsRecord networkingaccesspointv1.NetworkingV1DnsRecord) (networkingaccesspointv1.NetworkingV1DnsRecord, error) { +func (c *Client) CreateNetworkDnsRecord(dnsRecord networkingaccesspointv1.NetworkingV1DnsRecord) (networkingaccesspointv1.NetworkingV1DnsRecord, error) { resp, httpResp, err := c.NetworkingAccessPointClient.DNSRecordsNetworkingV1Api.CreateNetworkingV1DnsRecord(c.networkingAccessPointApiContext()).NetworkingV1DnsRecord(dnsRecord).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } diff --git a/pkg/ccloudv2/networking_dnsforwarder.go b/pkg/ccloudv2/networking_dnsforwarder.go index d2b9bc7403..2f12d32b6e 100644 --- a/pkg/ccloudv2/networking_dnsforwarder.go +++ b/pkg/ccloudv2/networking_dnsforwarder.go @@ -23,13 +23,13 @@ func (c *Client) networkingDnsForwarderApiContext() context.Context { return context.WithValue(context.Background(), networkingdnsforwarderv1.ContextAccessToken, c.cfg.Context().GetAuthToken()) } -func (c *Client) ListDnsForwarders(environment string) ([]networkingdnsforwarderv1.NetworkingV1DnsForwarder, error) { +func (c *Client) ListNetworkDnsForwarders(environment string) ([]networkingdnsforwarderv1.NetworkingV1DnsForwarder, error) { var list []networkingdnsforwarderv1.NetworkingV1DnsForwarder done := false pageToken := "" for !done { - page, err := c.executeListDnsForwarders(environment, pageToken) + page, err := c.executeListNetworkDnsForwarders(environment, pageToken) if err != nil { return nil, err } @@ -43,7 +43,7 @@ func (c *Client) ListDnsForwarders(environment string) ([]networkingdnsforwarder return list, nil } -func (c *Client) executeListDnsForwarders(environment, pageToken string) (networkingdnsforwarderv1.NetworkingV1DnsForwarderList, error) { +func (c *Client) executeListNetworkDnsForwarders(environment, pageToken string) (networkingdnsforwarderv1.NetworkingV1DnsForwarderList, error) { req := c.NetworkingDnsForwarderClient.DNSForwardersNetworkingV1Api.ListNetworkingV1DnsForwarders(c.networkingDnsForwarderApiContext()).Environment(environment).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) @@ -53,22 +53,22 @@ func (c *Client) executeListDnsForwarders(environment, pageToken string) (networ return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetDnsForwarder(environment, id string) (networkingdnsforwarderv1.NetworkingV1DnsForwarder, error) { +func (c *Client) GetNetworkDnsForwarder(environment, id string) (networkingdnsforwarderv1.NetworkingV1DnsForwarder, error) { resp, httpResp, err := c.NetworkingDnsForwarderClient.DNSForwardersNetworkingV1Api.GetNetworkingV1DnsForwarder(c.networkingDnsForwarderApiContext(), id).Environment(environment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeleteDnsForwarder(environment, id string) error { +func (c *Client) DeleteNetworkDnsForwarder(environment, id string) error { httpResp, err := c.NetworkingDnsForwarderClient.DNSForwardersNetworkingV1Api.DeleteNetworkingV1DnsForwarder(c.networkingDnsForwarderApiContext(), id).Environment(environment).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) CreateDnsForwarder(forwarder networkingdnsforwarderv1.NetworkingV1DnsForwarder) (networkingdnsforwarderv1.NetworkingV1DnsForwarder, error) { +func (c *Client) CreateNetworkDnsForwarder(forwarder networkingdnsforwarderv1.NetworkingV1DnsForwarder) (networkingdnsforwarderv1.NetworkingV1DnsForwarder, error) { resp, httpResp, err := c.NetworkingDnsForwarderClient.DNSForwardersNetworkingV1Api.CreateNetworkingV1DnsForwarder(c.networkingDnsForwarderApiContext()).NetworkingV1DnsForwarder(forwarder).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdateDnsForwarder(environment, id string, dnsForwarderUpdate networkingdnsforwarderv1.NetworkingV1DnsForwarderUpdate) (networkingdnsforwarderv1.NetworkingV1DnsForwarder, error) { +func (c *Client) UpdateNetworkDnsForwarder(environment, id string, dnsForwarderUpdate networkingdnsforwarderv1.NetworkingV1DnsForwarderUpdate) (networkingdnsforwarderv1.NetworkingV1DnsForwarder, error) { resp, httpResp, err := c.NetworkingDnsForwarderClient.DNSForwardersNetworkingV1Api.UpdateNetworkingV1DnsForwarder(c.networkingDnsForwarderApiContext(), id).NetworkingV1DnsForwarderUpdate(dnsForwarderUpdate).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } diff --git a/pkg/ccloudv2/networking_ip.go b/pkg/ccloudv2/networking_ip.go index c2f088f69a..12e48ef9e9 100644 --- a/pkg/ccloudv2/networking_ip.go +++ b/pkg/ccloudv2/networking_ip.go @@ -23,13 +23,13 @@ func (c *Client) networkingIpApiContext() context.Context { return context.WithValue(context.Background(), networkingipv1.ContextAccessToken, c.cfg.Context().GetAuthToken()) } -func (c *Client) ListIpAddresses(cloud, region, services, addressType []string) ([]networkingipv1.NetworkingV1IpAddress, error) { +func (c *Client) ListNetworkIpAddresses(cloud, region, services, addressType []string) ([]networkingipv1.NetworkingV1IpAddress, error) { var list []networkingipv1.NetworkingV1IpAddress done := false pageToken := "" for !done { - page, err := c.executeListIpAddresses(pageToken, cloud, region, services, addressType) + page, err := c.executeListNetworkIpAddresses(pageToken, cloud, region, services, addressType) if err != nil { return nil, err } @@ -43,7 +43,7 @@ func (c *Client) ListIpAddresses(cloud, region, services, addressType []string) return list, nil } -func (c *Client) executeListIpAddresses(pageToken string, cloud, region, services, addressType []string) (networkingipv1.NetworkingV1IpAddressList, error) { +func (c *Client) executeListNetworkIpAddresses(pageToken string, cloud, region, services, addressType []string) (networkingipv1.NetworkingV1IpAddressList, error) { req := c.NetworkingIpClient.IPAddressesNetworkingV1Api.ListNetworkingV1IpAddresses(c.networkingIpApiContext()).Cloud(cloud).Region(region).Services(services).AddressType(addressType).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) diff --git a/pkg/ccloudv2/networking_privatelink.go b/pkg/ccloudv2/networking_privatelink.go index 8aa74e548a..dd62278536 100644 --- a/pkg/ccloudv2/networking_privatelink.go +++ b/pkg/ccloudv2/networking_privatelink.go @@ -23,13 +23,13 @@ func (c *Client) networkingPrivateLinkApiContext() context.Context { return context.WithValue(context.Background(), networkingprivatelinkv1.ContextAccessToken, c.cfg.Context().GetAuthToken()) } -func (c *Client) ListPrivateLinkAttachments(environment string, name, cloud, region, phase []string) ([]networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment, error) { +func (c *Client) ListNetworkPrivateLinkAttachments(environment string, name, cloud, region, phase []string) ([]networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment, error) { var list []networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment done := false pageToken := "" for !done { - page, err := c.executeListPrivateLinkAttachments(environment, pageToken, name, cloud, region, phase) + page, err := c.executeListNetworkPrivateLinkAttachments(environment, pageToken, name, cloud, region, phase) if err != nil { return nil, err } @@ -43,7 +43,7 @@ func (c *Client) ListPrivateLinkAttachments(environment string, name, cloud, reg return list, nil } -func (c *Client) executeListPrivateLinkAttachments(environment, pageToken string, name, cloud, region, phase []string) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentList, error) { +func (c *Client) executeListNetworkPrivateLinkAttachments(environment, pageToken string, name, cloud, region, phase []string) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentList, error) { req := c.NetworkingPrivateLinkClient.PrivateLinkAttachmentsNetworkingV1Api.ListNetworkingV1PrivateLinkAttachments(c.networkingPrivateLinkApiContext()).Environment(environment).SpecDisplayName(name).SpecCloud(cloud).SpecRegion(region).StatusPhase(phase).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) @@ -53,33 +53,33 @@ func (c *Client) executeListPrivateLinkAttachments(environment, pageToken string return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetPrivateLinkAttachment(environment, id string) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment, error) { +func (c *Client) GetNetworkPrivateLinkAttachment(environment, id string) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment, error) { resp, httpResp, err := c.NetworkingPrivateLinkClient.PrivateLinkAttachmentsNetworkingV1Api.GetNetworkingV1PrivateLinkAttachment(c.networkingPrivateLinkApiContext(), id).Environment(environment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdatePrivateLinkAttachment(environment, id string, privateLinkAttachmentUpdate networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentUpdate) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment, error) { +func (c *Client) UpdateNetworkPrivateLinkAttachment(environment, id string, privateLinkAttachmentUpdate networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentUpdate) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment, error) { resp, httpResp, err := c.NetworkingPrivateLinkClient.PrivateLinkAttachmentsNetworkingV1Api.UpdateNetworkingV1PrivateLinkAttachment(c.networkingPrivateLinkApiContext(), id).NetworkingV1PrivateLinkAttachmentUpdate(privateLinkAttachmentUpdate).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeletePrivateLinkAttachment(environment, id string) error { +func (c *Client) DeleteNetworkPrivateLinkAttachment(environment, id string) error { httpResp, err := c.NetworkingPrivateLinkClient.PrivateLinkAttachmentsNetworkingV1Api.DeleteNetworkingV1PrivateLinkAttachment(c.networkingPrivateLinkApiContext(), id).Environment(environment).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) CreatePrivateLinkAttachment(attachment networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment, error) { +func (c *Client) CreateNetworkPrivateLinkAttachment(attachment networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachment, error) { resp, httpResp, err := c.NetworkingPrivateLinkClient.PrivateLinkAttachmentsNetworkingV1Api.CreateNetworkingV1PrivateLinkAttachment(c.networkingPrivateLinkApiContext()).NetworkingV1PrivateLinkAttachment(attachment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListPrivateLinkAttachmentConnections(environment, attachmentId string) ([]networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection, error) { +func (c *Client) ListNetworkPrivateLinkAttachmentConnections(environment, attachmentId string) ([]networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection, error) { var list []networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection done := false pageToken := "" for !done { - page, err := c.executeListPrivateLinkAttachmentConnections(environment, attachmentId, pageToken) + page, err := c.executeListNetworkPrivateLinkAttachmentConnections(environment, attachmentId, pageToken) if err != nil { return nil, err } @@ -93,7 +93,7 @@ func (c *Client) ListPrivateLinkAttachmentConnections(environment, attachmentId return list, nil } -func (c *Client) executeListPrivateLinkAttachmentConnections(environment, attachmentId, pageToken string) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnectionList, error) { +func (c *Client) executeListNetworkPrivateLinkAttachmentConnections(environment, attachmentId, pageToken string) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnectionList, error) { req := c.NetworkingPrivateLinkClient.PrivateLinkAttachmentConnectionsNetworkingV1Api.ListNetworkingV1PrivateLinkAttachmentConnections(c.networkingPrivateLinkApiContext()).Environment(environment).SpecPrivateLinkAttachment(attachmentId).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) @@ -103,22 +103,22 @@ func (c *Client) executeListPrivateLinkAttachmentConnections(environment, attach return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetPrivateLinkAttachmentConnection(environment, id string) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection, error) { +func (c *Client) GetNetworkPrivateLinkAttachmentConnection(environment, id string) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection, error) { resp, httpResp, err := c.NetworkingPrivateLinkClient.PrivateLinkAttachmentConnectionsNetworkingV1Api.GetNetworkingV1PrivateLinkAttachmentConnection(c.networkingPrivateLinkApiContext(), id).Environment(environment).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdatePrivateLinkAttachmentConnection(environment, id string, privateLinkAttachmentConnectionUpdate networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnectionUpdate) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection, error) { +func (c *Client) UpdateNetworkPrivateLinkAttachmentConnection(environment, id string, privateLinkAttachmentConnectionUpdate networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnectionUpdate) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection, error) { resp, httpResp, err := c.NetworkingPrivateLinkClient.PrivateLinkAttachmentConnectionsNetworkingV1Api.UpdateNetworkingV1PrivateLinkAttachmentConnection(c.networkingPrivateLinkApiContext(), id).NetworkingV1PrivateLinkAttachmentConnectionUpdate(privateLinkAttachmentConnectionUpdate).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeletePrivateLinkAttachmentConnection(environment, id string) error { +func (c *Client) DeleteNetworkPrivateLinkAttachmentConnection(environment, id string) error { httpResp, err := c.NetworkingPrivateLinkClient.PrivateLinkAttachmentConnectionsNetworkingV1Api.DeleteNetworkingV1PrivateLinkAttachmentConnection(c.networkingPrivateLinkApiContext(), id).Environment(environment).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) CreatePrivateLinkAttachmentConnection(connection networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection, error) { +func (c *Client) CreateNetworkPrivateLinkAttachmentConnection(connection networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection) (networkingprivatelinkv1.NetworkingV1PrivateLinkAttachmentConnection, error) { resp, httpResp, err := c.NetworkingPrivateLinkClient.PrivateLinkAttachmentConnectionsNetworkingV1Api.CreateNetworkingV1PrivateLinkAttachmentConnection(c.networkingPrivateLinkApiContext()).NetworkingV1PrivateLinkAttachmentConnection(connection).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } diff --git a/pkg/ccloudv2/sso.go b/pkg/ccloudv2/sso.go index 6d0bb41308..b5479403f2 100644 --- a/pkg/ccloudv2/sso.go +++ b/pkg/ccloudv2/sso.go @@ -23,33 +23,33 @@ func (c *Client) ssoApiContext() context.Context { return context.WithValue(context.Background(), ssov2.ContextAccessToken, c.cfg.Context().GetAuthToken()) } -func (c *Client) CreateGroupMapping(groupMapping ssov2.IamV2SsoGroupMapping) (ssov2.IamV2SsoGroupMapping, error) { +func (c *Client) CreateIamGroupMapping(groupMapping ssov2.IamV2SsoGroupMapping) (ssov2.IamV2SsoGroupMapping, error) { resp, httpResp, err := c.SsoClient.GroupMappingsIamV2SsoApi.CreateIamV2SsoGroupMapping(c.ssoApiContext()).IamV2SsoGroupMapping(groupMapping).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) DeleteGroupMapping(id string) error { +func (c *Client) DeleteIamGroupMapping(id string) error { httpResp, err := c.SsoClient.GroupMappingsIamV2SsoApi.DeleteIamV2SsoGroupMapping(c.ssoApiContext(), id).Execute() return errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) GetGroupMapping(id string) (ssov2.IamV2SsoGroupMapping, error) { +func (c *Client) GetIamGroupMapping(id string) (ssov2.IamV2SsoGroupMapping, error) { resp, httpResp, err := c.SsoClient.GroupMappingsIamV2SsoApi.GetIamV2SsoGroupMapping(c.ssoApiContext(), id).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) UpdateGroupMapping(update ssov2.IamV2SsoGroupMapping) (ssov2.IamV2SsoGroupMapping, error) { +func (c *Client) UpdateIamGroupMapping(update ssov2.IamV2SsoGroupMapping) (ssov2.IamV2SsoGroupMapping, error) { resp, httpResp, err := c.SsoClient.GroupMappingsIamV2SsoApi.UpdateIamV2SsoGroupMapping(c.ssoApiContext(), *update.Id).IamV2SsoGroupMapping(update).Execute() return resp, errors.CatchCCloudV2Error(err, httpResp) } -func (c *Client) ListGroupMappings() ([]ssov2.IamV2SsoGroupMapping, error) { +func (c *Client) ListIamGroupMappings() ([]ssov2.IamV2SsoGroupMapping, error) { var list []ssov2.IamV2SsoGroupMapping done := false pageToken := "" for !done { - page, httpResp, err := c.executeListGroupMappings(pageToken) + page, httpResp, err := c.executeListIamGroupMappings(pageToken) if err != nil { return nil, errors.CatchCCloudV2Error(err, httpResp) } @@ -63,7 +63,7 @@ func (c *Client) ListGroupMappings() ([]ssov2.IamV2SsoGroupMapping, error) { return list, nil } -func (c *Client) executeListGroupMappings(pageToken string) (ssov2.IamV2SsoGroupMappingList, *http.Response, error) { +func (c *Client) executeListIamGroupMappings(pageToken string) (ssov2.IamV2SsoGroupMappingList, *http.Response, error) { req := c.SsoClient.GroupMappingsIamV2SsoApi.ListIamV2SsoGroupMappings(c.ssoApiContext()).PageSize(ccloudV2ListPageSize) if pageToken != "" { req = req.PageToken(pageToken) diff --git a/pkg/cmd/flags.go b/pkg/cmd/flags.go index a313fab3d6..1c10e9bd21 100644 --- a/pkg/cmd/flags.go +++ b/pkg/cmd/flags.go @@ -236,7 +236,7 @@ func AddExternalIdentifierFlag(cmd *cobra.Command) { } func AutocompleteGroupMappings(client *ccloudv2.Client) []string { - groupMappings, err := client.ListGroupMappings() + groupMappings, err := client.ListIamGroupMappings() if err != nil { return nil } @@ -250,7 +250,7 @@ func AutocompleteGroupMappings(client *ccloudv2.Client) []string { } func AutocompleteCertificatePool(client *ccloudv2.Client, provider string) []string { - certificatePools, err := client.ListCertificatePool(provider) + certificatePools, err := client.ListIamCertificatePools(provider) if err != nil { return nil } @@ -349,7 +349,7 @@ func AddProviderFlag(cmd *cobra.Command, command *AuthenticatedCLICommand) { } func AutocompleteIdentityProviders(client *ccloudv2.Client) []string { - identityProviders, err := client.ListIdentityProviders() + identityProviders, err := client.ListIamIdentityProviders() if err != nil { return nil } @@ -363,7 +363,7 @@ func AutocompleteIdentityProviders(client *ccloudv2.Client) []string { } func AutocompleteCertificateAuthorities(client *ccloudv2.Client) []string { - certificateAuthorities, err := client.ListCertificateAuthorities() + certificateAuthorities, err := client.ListIamCertificateAuthorities() if err != nil { return nil } @@ -376,7 +376,7 @@ func AutocompleteCertificateAuthorities(client *ccloudv2.Client) []string { } func AutocompleteIdentityPools(client *ccloudv2.Client, providerId string) []string { - identityPools, err := client.ListIdentityPools(providerId) + identityPools, err := client.ListIamIdentityPools(providerId) if err != nil { return nil }