Beispiel #1
0
        static void Main(string[] args)
        {
            //https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx#bk_portal
            string token = GetAuthorizationHeader();

            TokenCloudCredentials creds = new TokenCloudCredentials(subscriptionId,token);

            RedisManagementClient client = new RedisManagementClient(creds);
            var redisProperties = new RedisProperties();
            redisProperties.Sku = new Sku(redisSKUName,redisSKUFamily,redisSKUCapacity);
            redisProperties.RedisVersion = redisVersion;
            var redisParams = new RedisCreateOrUpdateParameters(redisProperties, redisCacheRegion);
            client.Redis.CreateOrUpdate(resourceGroupName,cacheName, redisParams);
        }
 /// <summary>
 /// Initializes a new instance of the RedisCreateOrUpdateParameters
 /// class with required arguments.
 /// </summary>
 public RedisCreateOrUpdateParameters(RedisProperties properties, string location)
     : this()
 {
     if (properties == null)
     {
         throw new ArgumentNullException("properties");
     }
     if (location == null)
     {
         throw new ArgumentNullException("location");
     }
     this.Properties = properties;
     this.Location = location;
 }
 /// <summary>
 /// Initializes a new instance of the RedisCreateOrUpdateParameters
 /// class with required arguments.
 /// </summary>
 public RedisCreateOrUpdateParameters(string location, RedisProperties properties)
     : this()
 {
     if (location == null)
     {
         throw new ArgumentNullException("location");
     }
     if (properties == null)
     {
         throw new ArgumentNullException("properties");
     }
     this.Location = location;
     this.Properties = properties;
 }