flex

package
v1.39.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: MPL-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//ResourceControllerURL ...
	ResourceControllerURL = "resource_controller_url"
	//ResourceName ...
	ResourceName = "resource_name"
	//ResourceCRN ...
	ResourceCRN = "resource_crn"
	//ResourceStatus ...
	ResourceStatus = "resource_status"
	//ResourceGroupName ...
	ResourceGroupName = "resource_group_name"
	//RelatedCRN ...
	RelatedCRN            = "related_crn"
	SystemIBMLabelPrefix  = "ibm-cloud.kubernetes.io/"
	KubernetesLabelPrefix = "kubernetes.io/"
	K8sLabelPrefix        = "k8s.io/"
)

Variables

This section is empty.

Functions

func Abort_mpu_RuleGet

func Abort_mpu_RuleGet(in []*s3.LifecycleRule) []interface{}

func ApplyOnce

func ApplyOnce(k, o, n string, d *schema.ResourceData) bool

Use this function for attributes which only should be applied in resource creation time.

func ArchiveRuleGet

func ArchiveRuleGet(in []*s3.LifecycleRule) []interface{}

func CfIdParts

func CfIdParts(id string) ([]string, error)

func ConvertCisToTfFourVar

func ConvertCisToTfFourVar(firewallType string, ID string, ID2 string, cisID string) (buildID string)

func ConvertCisToTfThreeVar

func ConvertCisToTfThreeVar(Id string, Id2 string, cisId string) (buildId string)

Cloud Internet Services

func ConvertCisToTfTwoVar

func ConvertCisToTfTwoVar(Id string, cisId string) (buildId string)

Cloud Internet Services

func ConvertCisToTfTwoVarSlice

func ConvertCisToTfTwoVarSlice(Ids []string, cisId string) (buildIds []string)

Cloud Internet Services

func ConvertTfToCisFourVar

func ConvertTfToCisFourVar(TfID string) (firewallType string, ID string, zoneID string, cisID string, err error)

func ConvertTfToCisThreeVar

func ConvertTfToCisThreeVar(glbTfId string) (glbId string, zoneId string, cisId string, err error)

Cloud Internet Services

func ConvertTfToCisTwoVarSlice

func ConvertTfToCisTwoVarSlice(tfIds []string) (Ids []string, cisId string, err error)

Cloud Internet Services

func ConvertTftoCisTwoVar

func ConvertTftoCisTwoVar(tfId string) (Id string, cisId string, err error)

Cloud Internet Services

func DateTimeToString

func DateTimeToString(dt *strfmt.DateTime) (s string)

func DefaultResourceGroup

func DefaultResourceGroup(meta interface{}) (string, error)

Return the default resource group

func EscapeUrlParm

func EscapeUrlParm(urlParm string) string

convert CRN to be url safe

func ExpandAnnotations

func ExpandAnnotations(annotations string) (whisk.KeyValueArr, error)

func ExpandCosConfig

func ExpandCosConfig(cos []interface{}) *kubernetesserviceapiv1.COSBucket

ExpandCosConfig ..

func ExpandCosCredentials

func ExpandCosCredentials(cos []interface{}) *kubernetesserviceapiv1.COSAuthorization

expandCosCredentials ..

func ExpandExec

func ExpandExec(execs []interface{}) *whisk.Exec

func ExpandIntList

func ExpandIntList(input []interface{}) []int

func ExpandLimits

func ExpandLimits(l []interface{}) *whisk.Limits

func ExpandMembers

func ExpandMembers(configured []interface{}) []datatypes.Network_LBaaS_LoadBalancerServerInstanceInfo

func ExpandParameters

func ExpandParameters(annotations string) (whisk.KeyValueArr, error)

func ExpandProtocols

func ExpandProtocols(configured []interface{}) ([]datatypes.Network_LBaaS_LoadBalancerProtocolConfiguration, error)

func ExpandStringList

func ExpandStringList(input []interface{}) []string

func ExpandUsers

func ExpandUsers(userList *schema.Set) (users []icdv4.User)

func ExpandWhitelist

func ExpandWhitelist(whiteList *schema.Set) (whitelist []icdv4.WhitelistEntry)

IBM Cloud Databases

func ExpireRuleGet

func ExpireRuleGet(in []*s3.LifecycleRule) []interface{}

func FilterActionAnnotations

func FilterActionAnnotations(in whisk.KeyValueArr) (string, error)

func FilterActionParameters

func FilterActionParameters(in whisk.KeyValueArr) (string, error)

func FilterInheritedAnnotations

func FilterInheritedAnnotations(inheritedAnnotations, annotations whisk.KeyValueArr) whisk.KeyValueArr

func FilterInheritedParameters

func FilterInheritedParameters(inheritedParameters, parameters whisk.KeyValueArr) whisk.KeyValueArr

func FilterTriggerAnnotations

func FilterTriggerAnnotations(in whisk.KeyValueArr) (string, error)

func FlattenAccessGroupMembers

func FlattenAccessGroupMembers(list []iamaccessgroupsv2.ListGroupMembersResponseMember, users []usermanagementv2.UserInfo, serviceids []iamidentityv1.ServiceID) []map[string]interface{}

func FlattenAccessGroupRules

func FlattenAccessGroupRules(list *iamaccessgroupsv2.RulesList) []map[string]interface{}

func FlattenActionbyDisplayName

func FlattenActionbyDisplayName(displayName string, object []iampolicymanagementv1.Role) []string

func FlattenActivityTrack

func FlattenActivityTrack(in *resourceconfigurationv1.ActivityTracking) []interface{}

func FlattenAlbs

func FlattenAlbs(list []containerv1.ALBConfig, filterType string) []map[string]interface{}

func FlattenAnnotations

func FlattenAnnotations(in whisk.KeyValueArr) (string, error)

func FlattenBlockStorageID

func FlattenBlockStorageID(in []datatypes.Network_Storage) *schema.Set

func FlattenConditions

func FlattenConditions(list []iamaccessgroupsv2.RuleConditions) []map[string]interface{}

func FlattenConnectionStrings

func FlattenConnectionStrings(cs []CsEntry) []map[string]interface{}

IBM Cloud Databases

func FlattenCosObejctVersioning

func FlattenCosObejctVersioning(in *s3.GetBucketVersioningOutput) []interface{}

func FlattenCustomRoleData

func FlattenCustomRoleData(object []iampolicymanagementv1.CustomRole, roleType string) []map[string]string

func FlattenDisks

func FlattenDisks(result datatypes.Virtual_Guest) []int

func FlattenDisksForWindows

func FlattenDisksForWindows(result datatypes.Virtual_Guest) []int

func FlattenExec

func FlattenExec(in *whisk.Exec, d *schema.ResourceData) []interface{}

func FlattenFeed

func FlattenFeed(feedName string) []interface{}

func FlattenFileStorageID

func FlattenFileStorageID(in []datatypes.Network_Storage) *schema.Set

func FlattenGatewayMembers

func FlattenGatewayMembers(d *schema.ResourceData, list []datatypes.Network_Gateway_Member) []map[string]interface{}

func FlattenGatewayVlans

func FlattenGatewayVlans(list []datatypes.Network_Gateway_Vlan) []map[string]interface{}

func FlattenHealthMonitors

func FlattenHealthMonitors(list []datatypes.Network_LBaaS_Listener) []map[string]interface{}

Cloud Internet Services

func FlattenHostLabels

func FlattenHostLabels(hostLabels []interface{}) map[string]string

flattenHostLabels ..

func FlattenIcdGroups

func FlattenIcdGroups(grouplist icdv4.GroupList) []map[string]interface{}

func FlattenIntList

func FlattenIntList(list []int) []interface{}

func FlattenKeyIndividualPolicy

func FlattenKeyIndividualPolicy(policy string, policies []kp.Policy) []map[string]interface{}

func FlattenKeyPolicies

func FlattenKeyPolicies(policies []kp.Policy) []map[string]interface{}

func FlattenLimits

func FlattenLimits(in *whisk.Limits) []interface{}

func FlattenMetricsMonitor

func FlattenMetricsMonitor(in *resourceconfigurationv1.MetricsMonitoring) []interface{}

func FlattenNetworkInterfaces

func FlattenNetworkInterfaces(list []containerv2.Network) []map[string]interface{}

func FlattenNlbConfigs

func FlattenNlbConfigs(nlbData []containerv2.NlbVPCListConfig) []map[string]interface{}

func FlattenOrgRole

func FlattenOrgRole(in []mccpv2.OrgRole, excludeUsername string) *schema.Set

func FlattenParameters

func FlattenParameters(in whisk.KeyValueArr) (string, error)

func FlattenPhaseOneAttributes

func FlattenPhaseOneAttributes(vpn *datatypes.Network_Tunnel_Module_Context) []map[string]interface{}

func FlattenPhaseTwoAttributes

func FlattenPhaseTwoAttributes(vpn *datatypes.Network_Tunnel_Module_Context) []map[string]interface{}

func FlattenPolicyResource

func FlattenPolicyResource(list []iampolicymanagementv1.PolicyResource) []map[string]interface{}

func FlattenPolicyResourceAttributes

func FlattenPolicyResourceAttributes(list []iampolicymanagementv1.PolicyResource) []map[string]interface{}

func FlattenPolicyResourceTags

func FlattenPolicyResourceTags(resources []iampolicymanagementv1.PolicyResource) []map[string]interface{}

func FlattenProtocols

func FlattenProtocols(list []datatypes.Network_LBaaS_Listener) []map[string]interface{}

func FlattenRoleData

func FlattenRoleData(object []iampolicymanagementv1.Role, roleType string) []map[string]string

func FlattenRoute

func FlattenRoute(in []mccpv2.Route) *schema.Set

func FlattenSSHKeyIDs

func FlattenSSHKeyIDs(in []datatypes.Security_Ssh_Key) *schema.Set

func FlattenSSLCiphers

func FlattenSSLCiphers(ciphers []datatypes.Network_LBaaS_SSLCipher) *schema.Set

func FlattenSatelliteClusterZones

func FlattenSatelliteClusterZones(list []string) []map[string]interface{}

func FlattenSatelliteHosts

func FlattenSatelliteHosts(hostList []kubernetesserviceapiv1.MultishiftQueueNode) []map[string]interface{}

func FlattenSatelliteWorkerPools

func FlattenSatelliteWorkerPools(list []kubernetesserviceapiv1.GetWorkerPoolResponse) []map[string]interface{}

func FlattenSatelliteZones

func FlattenSatelliteZones(zones *schema.Set) []string

func FlattenServerInstances

func FlattenServerInstances(list []datatypes.Network_LBaaS_Member) []map[string]interface{}

func FlattenServiceBindings

func FlattenServiceBindings(in []mccpv2.ServiceBinding) *schema.Set

func FlattenServiceInstanceCredentials

func FlattenServiceInstanceCredentials(keys []mccpv2.ServiceKeyFields) []interface{}

func FlattenSpaceRoleUsers

func FlattenSpaceRoleUsers(in []mccpv2.SpaceRole) *schema.Set

func FlattenStringList

func FlattenStringList(list []string) []interface{}

func FlattenSubnets

func FlattenSubnets(list []containerv2.Subnet) []map[string]interface{}

func FlattenUserIds

func FlattenUserIds(accountID string, users []string, meta interface{}) ([]string, error)

func FlattenUsersSet

func FlattenUsersSet(userList *schema.Set) []string

func FlattenVlans

func FlattenVlans(list []containerv1.Vlan) []map[string]interface{}

func FlattenVpcAlbs

func FlattenVpcAlbs(list []containerv2.AlbConfig, filterType string) []map[string]interface{}

func FlattenVpcWorkerPools

func FlattenVpcWorkerPools(list []containerv2.GetWorkerPoolResponse) []map[string]interface{}

func FlattenWhitelist

func FlattenWhitelist(whitelist icdv4.Whitelist) []map[string]interface{}

Cloud Internet Services

func FlattenWorkerPoolHostLabels

func FlattenWorkerPoolHostLabels(hostLabels map[string]string) *schema.Set

func FlattenWorkerPools

func FlattenWorkerPools(list []containerv1.WorkerPoolResponse) []map[string]interface{}

func FlattenZones

func FlattenZones(list []containerv1.WorkerPoolZoneResponse) []map[string]interface{}

func FlattenaddressTranslation

func FlattenaddressTranslation(vpn *datatypes.Network_Tunnel_Module_Context, fwID int) []map[string]interface{}

func FlattenremoteSubnet

func FlattenremoteSubnet(vpn *datatypes.Network_Tunnel_Module_Context) []map[string]interface{}

func GeneratePolicyOptions

func GeneratePolicyOptions(d *schema.ResourceData, meta interface{}) (iampolicymanagementv1.CreatePolicyOptions, error)

func GetBaseController

func GetBaseController(meta interface{}) (string, error)

func GetGlobalTagsUsingCRN

func GetGlobalTagsUsingCRN(meta interface{}, resourceID, resourceType, tagType string) (*schema.Set, error)

func GetIBMUniqueId

func GetIBMUniqueId(accountID, userEmail string, meta interface{}) (string, error)

func GetLocation

func GetLocation(instance models.ServiceInstanceV2) string

func GetNext

func GetNext(next interface{}) string

GetNext ...

func GetNextIAM

func GetNextIAM(next interface{}) string

GetNextIAM ...

func GetResourceAttribute

func GetResourceAttribute(name string, r iampolicymanagementv1.PolicyResource) *string

IAM Policy Management

func GetRolesFromRoleNames

func GetRolesFromRoleNames(roleNames []string, roles []iampolicymanagementv1.PolicyRole) ([]iampolicymanagementv1.PolicyRole, error)

func GetSubjectAttribute

func GetSubjectAttribute(name string, s iampolicymanagementv1.PolicySubject) *string

func GetTags

func GetTags(d *schema.ResourceData, meta interface{}) error

func GetTagsUsingCRN

func GetTagsUsingCRN(meta interface{}, resourceCRN string) (*schema.Set, error)

func HashInt

func HashInt(v interface{}) int

HashInt ...

func IdParts

func IdParts(id string) ([]string, error)

func IgnoreSystemLabels

func IgnoreSystemLabels(labels map[string]string) map[string]string

IgnoreSystemLabels returns non-IBM tag keys.

func ImmutableResourceCustomizeDiff

func ImmutableResourceCustomizeDiff(resourceList []string, diff *schema.ResourceDiff) error

func IndexOf

func IndexOf(element string, data []string) int

func IntValue

func IntValue(i64 *int64) (i int)

func IsEmpty

func IsEmpty(object interface{}) bool

func Nc_exp_RuleGet

func Nc_exp_RuleGet(in []*s3.LifecycleRule) []interface{}

func NewStringSet

func NewStringSet(f schema.SchemaSetFunc, in []string) *schema.Set

func NormalizeJSONString

func NormalizeJSONString(jsonString interface{}) (string, error)

func PtrToString

func PtrToString(s string) *string

func ResourceIBMISLBPoolCookieValidate

func ResourceIBMISLBPoolCookieValidate(diff *schema.ResourceDiff) error

func ResourceIBMVPCHash

func ResourceIBMVPCHash(v interface{}) int

func ResourceLBListenerPolicyCustomizeDiff

func ResourceLBListenerPolicyCustomizeDiff(diff *schema.ResourceDiff) error

func ResourceRouteModeValidate

func ResourceRouteModeValidate(diff *schema.ResourceDiff) error

func ResourceTagsCustomizeDiff

func ResourceTagsCustomizeDiff(diff *schema.ResourceDiff) error

func ResourceVolumeAttachmentValidate

func ResourceVolumeAttachmentValidate(diff *schema.ResourceDiff) error

func ResourceVolumeValidate

func ResourceVolumeValidate(diff *schema.ResourceDiff) error

func RetentionRuleGet

func RetentionRuleGet(in *s3.ProtectionConfiguration) []interface{}

func SepIdParts

func SepIdParts(id string, separator string) ([]string, error)

func StringContains

func StringContains(s []string, str string) bool

func SuppressEquivalentJSON

func SuppressEquivalentJSON(k, old, new string, d *schema.ResourceData) bool

func TransformToIBMCISDnsData

func TransformToIBMCISDnsData(recordType string, id string, value interface{}) (newValue interface{}, err error)

Cloud Internet Services

func UpdateGlobalTagsUsingCRN

func UpdateGlobalTagsUsingCRN(oldList, newList interface{}, meta interface{}, resourceID, resourceType, tagType string) error

func UpdateTagsUsingCRN

func UpdateTagsUsingCRN(oldList, newList interface{}, meta interface{}, resourceCRN string) error

func VmIdParts

func VmIdParts(id string) ([]string, error)

Types

type CsEntry

type CsEntry struct {
	Name       string
	Password   string
	String     string
	Composed   string
	CertName   string
	CertBase64 string
	Hosts      []struct {
		HostName string `json:"hostname"`
		Port     int    `json:"port"`
	}
	Scheme       string
	QueryOptions map[string]interface{}
	Path         string
	Database     string
	BundleName   string
	BundleBase64 string
}

type Map

type Map map[string]string

Map is a wrapper around map[string]string that provides some helpers above it that assume the map is in the format that flatmap expects (the result of Flatten).

All modifying functions such as Delete are done in-place unless otherwise noted.

func Flatten

func Flatten(thing map[string]interface{}) Map

Flatten takes a structure and turns into a flat map[string]string.

Within the "thing" parameter, only primitive values are allowed. Structs are not supported. Therefore, it can only be slices, maps, primitives, and any combination of those together.

See the tests for examples of what inputs are turned into.

func (Map) Contains

func (m Map) Contains(key string) bool

Contains returns true if the map contains the given key.

func (Map) Delete

func (m Map) Delete(prefix string)

Delete deletes a key out of the map with the given prefix.

func (Map) Keys

func (m Map) Keys() []string

Keys returns all of the top-level keys in this map

func (Map) Merge

func (m Map) Merge(m2 Map)

Merge merges the contents of the other Map into this one.

This merge is smarter than a simple map iteration because it will fully replace arrays and other complex structures that are present in this map with the other map's. For example, if this map has a 3 element "foo" list, and m2 has a 2 element "foo" list, then the result will be that m has a 2 element "foo" list.

type ServiceErrorResponse

type ServiceErrorResponse struct {
	Message    string
	StatusCode int
	Result     interface{}
}

error object

func BeautifyError

func BeautifyError(err error, response *core.DetailedResponse) *ServiceErrorResponse

func (*ServiceErrorResponse) String

func (response *ServiceErrorResponse) String() string

Jump to

Keyboard shortcuts

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