Elasticsearch.Net.Aws.AwsHttpConnection.RefreshCredentials C# (CSharp) Method

RefreshCredentials() private method

private RefreshCredentials ( ) : void
return void
        private void RefreshCredentials()
        {
            var credentials = InstanceProfileService.GetCredentials();
            if (credentials == null)
                throw new Exception("Unable to retrieve session credentials from instance profile service");

            _credentials = new Credentials
            {
                AccessKey = credentials.AccessKeyId,
                SecretKey = credentials.SecretAccessKey,
                Token = credentials.Token,
            };
        }