Created
April 7, 2017 23:03
-
-
Save RobsonAutomator/f85800246cb264b65711182d01cad1f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Use this code only once to store variables | |
Environment.SetEnvironmentVariable("CognitoPoolId", "<tutaj podaj dane>", EnvironmentVariableTarget.User); | |
Environment.SetEnvironmentVariable("CognitoClientId", "<tutaj podaj dane>", EnvironmentVariableTarget.User); | |
// 2. Next we can read back our settings from environement variables: | |
var poolId = Environment.GetEnvironmentVariable("CognitoPoolId",EnvironmentVariableTarget.User); | |
var clientId = Environment.GetEnvironmentVariable("CognitoClientId", EnvironmentVariableTarget.User); | |
// 3. The final check - HttpStatusCode == "OK" means success :) | |
using (var client = new AmazonCognitoIdentityProviderClient()) | |
{ | |
var response = client.DescribeUserPool(new DescribeUserPoolRequest() {UserPoolId = poolId}); | |
System.Console.WriteLine(response.HttpStatusCode); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment