GetSessionToken() private method

private GetSessionToken ( ) : GetSessionTokenResponse
return Amazon.SecurityToken.Model.GetSessionTokenResponse
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			
			var client = new AmazonSecurityTokenServiceClient (new BasicAWSCredentials (ACCESS_KEY, SECRET_KEY), Amazon.RegionEndpoint.USEast1);
			var response = client.GetSessionToken ();

			Console.WriteLine (response.Credentials.AccessKeyId);
		}
Exemplo n.º 2
0
 public void HappyCaseWithSessionToken()
 {
     var stsClient = new AmazonSecurityTokenServiceClient(RegionEndpoint.USWest2);
     var response = stsClient.GetSessionToken(new GetSessionTokenRequest
     {
         DurationSeconds = 900
     });
     AssertPreSignedUrl(SynthesizeSpeechUtil.GeneratePresignedUrl(response.Credentials, RegionEndpoint.USWest2, GetRequest()));
 }
Exemplo n.º 3
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Set our view from the "main" layout resource
			SetContentView (Resource.Layout.Main);

			// Get our button from the layout resource,
			// and attach an event to it
			Button button = FindViewById<Button> (Resource.Id.myButton);
			
			button.Click += delegate
			{
				button.Text = string.Format ("{0} clicks!", count++);
			};

			var client = new AmazonSecurityTokenServiceClient (new BasicAWSCredentials (ACCESS_KEY, SECRET_KEY), Amazon.RegionEndpoint.USEast1);
			var response = client.GetSessionToken ();

			Console.WriteLine (response.Credentials.AccessKeyId);
		}