Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CleanCmd = &cobra.Command{ Use: "clean", Short: "Deletes undeployed/unused reivisions of an API proxy", Long: "Deletes undeployed/unused reivisions of an API proxy", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { return apis.CleanProxy(name, reportOnly) }, }
CleanCmd to delete api
View Source
var Cmd = &cobra.Command{
Use: "apis",
Short: "Manage Apigee API proxies in an org",
Long: "Manage Apigee API proxies in an org",
}
Cmd to manage apis
View Source
var CreateCmd = &cobra.Command{ Use: "create", Short: "Creates an API proxy in an Apigee Org", Long: "Creates an API proxy in an Apigee Org", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { if proxy != "" { _, err = apis.CreateProxy(name, proxy) } else if oasFile != "" || oasURI != "" { var content []byte var oasDocName string if oasFile != "" { oasDocName, content, err = bundle.LoadDocumentFromFile(oasFile, validateSpec) } else { oasDocName, content, err = bundle.LoadDocumentFromURI(oasURI, validateSpec) } if err != nil { return err } err = bundle.GenerateAPIProxyDefFromOAS(name, oasDocName, skipPolicy) if err != nil { return err } err = proxybundle.GenerateAPIProxyBundle(name, string(content), oasDocName, skipPolicy) if err != nil { return err } if importProxy { _, err = apis.CreateProxy(name, name+".zip") } } else { _, err = apis.CreateProxy(name, "") } return }, }
CreateCmd to create api
View Source
var CreateKvmCmd = &cobra.Command{ Use: "create", Short: "Create an API Proxy scoped KVM", Long: "Create an API Proxy scoped KVM", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.CreateProxyKVM(proxyName, name, encrypted) return }, }
CreateKvmCmd to manage tracing of apis
View Source
var CreateTrcCmd = &cobra.Command{ Use: "create", Short: "Create a new debug session for an API proxy", Long: "Create a new debug session for Apigee API proxy revision deployed in an environment", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.CreateTraceSession(name, revision, filter) return }, }
CreateTrcCmd to manage tracing of apis
View Source
var DelCmd = &cobra.Command{ Use: "delete", Short: "Deletes an API proxy", Long: "Deletes an API proxy and all associated endpoints, policies, resources, and revisions." + "The proxy must be undeployed first.", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.DeleteProxy(name, revision) return }, }
DelCmd to delete api
View Source
var DelKvmCmd = &cobra.Command{ Use: "delete", Short: "Deletes an API Proxy scoped KVM", Long: "Deletes an API Proxy scoped KVM", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.DeleteProxyKVM(proxyName, name) return }, }
DelKvmCmd to manage tracing of apis
View Source
var DepCmd = &cobra.Command{ Use: "deploy", Short: "Deploys a revision of an existing API proxy", Long: "Deploys a revision of an existing API proxy to an environment in an organization", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.DeployProxy(name, revision, overrides) return }, }
DepCmd to deploy api
View Source
var ExpCmd = &cobra.Command{ Use: "export", Short: "export API proxy bundles from an org", Long: "export API proxy bundles from an org", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { return apis.ExportProxies(conn) }, }
ExpCmd to export apis
View Source
var FetCmd = &cobra.Command{ Use: "fetch", Short: "Returns a zip-formatted proxy bundle ", Long: "Returns a zip-formatted proxy bundle of code and config files", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) error { return apis.FetchProxy(name, revision) }, }
FetCmd to download api
View Source
var GetCmd = &cobra.Command{ Use: "get", Short: "Gets an API Proxy by name", Long: "Gets an API Proxy by name, including a list of its revisions.", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.GetProxy(name, revision) return }, }
GetCmd to get api details
View Source
var GetTrcCmd = &cobra.Command{ Use: "get", Short: "Get a debug session for an API proxy revision", Long: "Get a debug session for an API proxy revision deployed in an environment", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.GetTraceSession(name, revision, sessionID, messageID) return }, }
GetTrcCmd to manage tracing of apis
View Source
var ImpCmd = &cobra.Command{ Use: "import", Short: "Import a folder containing API proxy bundles", Long: "Import a folder containing API proxy bundles", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { return apis.ImportProxies(conn, folder) }, }
ImpCmd to import api bundles
View Source
var KvmCmd = &cobra.Command{
Use: "kvm",
Short: "Manage API proxy scoped KVMs",
Long: "Manage API proxy scoped KVMs",
}
KvmCmd to manage tracing of apis
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "List APIs in an Apigee Org", Long: "List APIs in an Apigee Org", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.ListProxies(includeRevisions) return }, }
ListCmd to list api
View Source
var ListDepCmd = &cobra.Command{ Use: "listdeploy", Short: "Lists all deployments of an API proxy", Long: "Lists all deployments of an API proxy", Args: func(cmd *cobra.Command, args []string) error { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) if apiclient.GetApigeeEnv() == "" && name == "" { return fmt.Errorf("proxy name or environment must be supplied") } if revision != -1 && name == "" { return fmt.Errorf("proxy name must be supplied with revision") } if name != "" && revision == -1 && apiclient.GetApigeeEnv() != "" { return fmt.Errorf("revision must be supplied with proxy name and env") } return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { if apiclient.GetApigeeEnv() != "" { if revision != -1 { _, err = apis.ListProxyRevisionDeployments(name, revision) } else { _, err = apis.ListEnvDeployments() } } else { _, err = apis.ListProxyDeployments(name) } return }, }
ListDepCmd to list deployed api
View Source
var ListKvmCmd = &cobra.Command{ Use: "list", Short: "List all KVMs for an API proxy", Long: "List all KVMs for an API proxy", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.ListProxyKVM(proxyName) return }, }
ListKvmCmd to manage tracing of apis
View Source
var ListTrcCmd = &cobra.Command{ Use: "list", Short: "List all debug sessions for an API proxy revision", Long: "List all debug sessions for an API proxy revision deployed in an environment", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.ListTracceSession(name, revision) return }, }
ListTrcCmd to manage tracing of apis
View Source
var TraceCmd = &cobra.Command{
Use: "trace",
Short: "Manage debugging/tracing of Apigee API proxies",
Long: "Manage debugging/tracing of Apigee API proxy revisions deployed in an environment",
}
TraceCmd to manage tracing of apis
View Source
var UndepCmd = &cobra.Command{ Use: "undeploy", Short: "Undeploys a revision of an existing API proxy", Long: "Undeploys a revision of an existing API proxy to an environment in an organization", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = apis.UndeployProxy(name, revision) return }, }
UndepCmd to undeloy api
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.