eptattachment

package
v1.125.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:     "endpoints",
	Aliases: []string{"ept"},
	Short:   "Manage Service Endpoints for PSC Consumers in Apigee",
	Long:    "Manage Service Endpoints for PSC Consumers in Apigee",
}

Cmd to manage orgs

View Source
var CreateCmd = &cobra.Command{
	Use:   "create",
	Short: "Create a new service endpoint",
	Long:  "Create a new service endpoint in Apigee for a service attachment",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		return apiclient.SetApigeeOrg(org)
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		re := regexp.MustCompile(`projects\/([a-zA-Z0-9_-]+)\/regions` +
			`\/([a-zA-Z0-9_-]+)\/serviceAttachments\/([a-zA-Z0-9_-]+)`)
		ok := re.Match([]byte(location))
		if !ok {
			return fmt.Errorf("disk encryption key must be of the format " +
				"projects/{project-id}/regions/{location}/serviceAttachments/{sa-name}")
		}
		_, err = eptattachment.Create(name, serviceAttachment, location)
		return err
	},
}

CreateCmd to list endpoint attachments

View Source
var GetCmd = &cobra.Command{
	Use:   "get",
	Short: "Get a service endpoint",
	Long:  "Get a service endpoint",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		return apiclient.SetApigeeOrg(org)
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = eptattachment.Get(name)
		return
	},
}

GetCmd to list endpoint attachments

View Source
var ListCmd = &cobra.Command{
	Use:   "list",
	Short: "List of service endpoints",
	Long:  "Lists of service endpoints",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		return apiclient.SetApigeeOrg(org)
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = eptattachment.List()
		return
	},
}

ListCmd to list endpoint attachments

View Source
var RemoveCmd = &cobra.Command{
	Use:   "delete",
	Short: "Delete a service endpoint",
	Long:  "Delete a service endpoint",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		return apiclient.SetApigeeOrg(org)
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = eptattachment.Delete(name)
		return
	},
}

RemoveCmd to list endpoint attachments

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL