ApigeeAliases.

CreateKeyValueMap(ICakeContext, string, KeyValueMap, CreateKeyValueMapSettings) Method

Summary

Create an organisation or environment scoped key value map (KVM) in Apigee.
Assembly
Cake.Apigee.dll
Namespace
Cake.Apigee
Containing Type
ApigeeAliases

Syntax

public static void CreateKeyValueMap(this ICakeContext ctx, string orgName, KeyValueMap keyValueMap, CreateKeyValueMapSettings settings = null)

Examples

Cake task:

 var orgName = "myorg";
 var apigeeCredentials = new Credentials
 {
    Username = "[email protected]",
    Password = "mypassword"
 };

 CreateKeyValueMap(
                 orgName,
                 "myapi",
                 new KeyValueMap
                 {
                     Name = "myMap",
                     Encrypted = false,
                     Entry = new[]
                     {
                         new KeyValueMapEntry { Name = "myKey", Value = "myValue" }
                     }
                  },
                  new CreateKeyValueMapSettings { Credentials = apigeeCredentials, Environment = "dev" });

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
ctx ICakeContext The Cake context.
orgName string Your org name as shown in Apigee.
keyValueMap KeyValueMap The values to set in the key value map.
settings CreateKeyValueMapSettings Settings such as credentials and an environment name if environment scoped.

Return Value

Type Description
void