iam

package
v1.7.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CallCmd = &cobra.Command{
	Use:   "createall",
	Short: "Create a new IAM Service Account with all permissions for Apigee Rnutime",
	Long:  "Create a new IAM Service Account with all permissions for Apigee Rnutime",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		if !generateName && name == "" {
			return fmt.Errorf("provide a service account name or allow the tool to generate one")
		}
		apiclient.SetProjectID(projectID)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		if generateName {
			name = GenerateName("apigee-all-")
		}
		return apiclient.CreateIAMServiceAccount(name, "all")
	},
}

Cmd to get org details

View Source
var CassCmd = &cobra.Command{
	Use:   "createcass",
	Short: "Create a new IAM Service Account for Cassandra backup",
	Long:  "Create a new IAM Service Account for Cassandra backup",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		if !generateName && name == "" {
			return fmt.Errorf("provide a service account name or allow the tool to generate one")
		}
		apiclient.SetProjectID(projectID)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		if generateName {
			name = GenerateName("apigee-cass-")
		}
		return apiclient.CreateIAMServiceAccount(name, "cassandra")
	},
}

Cmd to get org details

View Source
var CaxCmd = &cobra.Command{
	Use:   "createax",
	Short: "Create a new IAM Service Account for Apigee Analytics",
	Long:  "Create a new IAM Service Account for Apigee Analytics",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		if !generateName && name == "" {
			return fmt.Errorf("provide a service account name or allow the tool to generate one")
		}
		apiclient.SetProjectID(projectID)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		if generateName {
			name = GenerateName("apigee-ax-")
		}
		return apiclient.CreateIAMServiceAccount(name, "analytics")
	},
}

Cmd to get org details

View Source
var ClogCmd = &cobra.Command{
	Use:   "createlogger",
	Short: "Create a new IAM Service Account for Apigee Logger",
	Long:  "Create a new IAM Service Account for Apigee Logger",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		if !generateName && name == "" {
			return fmt.Errorf("provide a service account name or allow the tool to generate one")
		}
		apiclient.SetProjectID(projectID)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		if generateName {
			name = GenerateName("apigee-log-")
		}
		return apiclient.CreateIAMServiceAccount(name, "logger")
	},
}

Cmd to get org details

View Source
var CmartCmd = &cobra.Command{
	Use:   "createmart",
	Short: "Create a new IAM Service Account for Apigee MART",
	Long:  "Create a new IAM Service Account for Apigee MART",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		if !generateName && name == "" {
			return fmt.Errorf("provide a service account name or allow the tool to generate one")
		}
		apiclient.SetProjectID(projectID)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		if generateName {
			name = GenerateName("apigee-mart-")
		}
		return apiclient.CreateIAMServiceAccount(name, "mart")
	},
}

Cmd to get org details

View Source
var Cmd = &cobra.Command{
	Use:   "iam",
	Short: "Manage IAM permissions for Apigee",
	Long: "Manage IAM permissions for Apigee. The SA to run this command requires Security Admin, " +
		"Create Service Accounts and Service Account Key Admin roles",
}

Cmd to manage orgs

View Source
var CmetCmd = &cobra.Command{
	Use:   "createmetrics",
	Short: "Create a new IAM Service Account for SD Metrics",
	Long:  "Create a new IAM Service Account for SD Metrics",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		if !generateName && name == "" {
			return fmt.Errorf("provide a service account name or allow the tool to generate one")
		}
		apiclient.SetProjectID(projectID)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		if generateName {
			name = GenerateName("apigee-met-")
		}
		return apiclient.CreateIAMServiceAccount(name, "metrics")
	},
}

Cmd to get org details

View Source
var ConnCmd = &cobra.Command{
	Use:   "createconnect",
	Short: "Create a new IAM Service Account for Apigee Connect",
	Long:  "Create a new IAM Service Account for Apigee Connect",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		if !generateName && name == "" {
			return fmt.Errorf("provide a service account name or allow the tool to generate one")
		}
		apiclient.SetProjectID(projectID)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		if generateName {
			name = GenerateName("apigee-conn-")
		}
		return apiclient.CreateIAMServiceAccount(name, "connect")
	},
}

Cmd to get org details

View Source
var CsyncCmd = &cobra.Command{
	Use:   "createsync",
	Short: "Create a new IAM Service Account for Apigee Synchronizer",
	Long:  "Create a new IAM Service Account for Apigee Synchronizer",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		if !generateName && name == "" {
			return fmt.Errorf("provide a service account name or allow the tool to generate one")
		}
		apiclient.SetProjectID(projectID)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		if generateName {
			name = GenerateName("apigee-sync-")
		}
		return apiclient.CreateIAMServiceAccount(name, "sync")
	},
}

Cmd to get org details

Functions

func GenerateName added in v1.5.1

func GenerateName(prefix string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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