本文整理汇总了C#中Amazon.Runtime.AsyncOptions类的典型用法代码示例。如果您正苦于以下问题:C# AsyncOptions类的具体用法?C# AsyncOptions怎么用?C# AsyncOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AsyncOptions类属于Amazon.Runtime命名空间,在下文中一共展示了AsyncOptions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: PostObjectAsync
/// <summary>
/// Upload data to Amazon S3 using HTTP POST.
/// </summary>
/// <remarks>
/// For more information, <see href="http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingHTTPPOST.html"/>
/// </remarks>
/// <param name="request">Request object which describes the data to POST</param>
/// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
/// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
public void PostObjectAsync(PostObjectRequest request, AmazonServiceCallback<PostObjectRequest, PostObjectResponse> callback, AsyncOptions options = null)
{
options = options == null ? new AsyncOptions() : options;
Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper
= (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) =>
{
AmazonServiceResult<PostObjectRequest, PostObjectResponse> responseObject
= new AmazonServiceResult<PostObjectRequest, PostObjectResponse>((PostObjectRequest)req, (PostObjectResponse)res, ex, ao.State);
if (callback != null)
callback(responseObject);
};
ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
{
// Provide a default policy if user doesn't set it.
try
{
InferContentType(request);
if (request.SignedPolicy == null)
{
CreateSignedPolicy(request);
}
PostObject(request, options, callbackHelper);
}
catch (Exception e)
{
callback(new AmazonServiceResult<PostObjectRequest, PostObjectResponse>(request, null, e, options.State));
}
}));
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:42,代码来源:AmazonS3Client.unity.cs
示例2: AsyncExecutor
public static void AsyncExecutor(Action action, AsyncOptions options)
{
if (options.ExecuteCallbackOnMainThread)
{
if (UnityInitializer.IsMainThread())
{
SafeExecute(action);
}
else
{
UnityRequestQueue.Instance.ExecuteOnMainThread(action);
}
}
else
{
if (!UnityInitializer.IsMainThread())
{
SafeExecute(action);
}
else
{
ThreadPool.QueueUserWorkItem((state) =>
{
SafeExecute(action);
});
}
}
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:28,代码来源:InternalSDKUtils.unity.cs
示例3: LoadTableAsync
internal static void LoadTableAsync(IAmazonDynamoDB ddbClient, string tableName, Table.DynamoDBConsumer consumer, DynamoDBEntryConversion conversion, AmazonDynamoDBCallback<Table> callback, AsyncOptions asyncOptions = null)
{
asyncOptions = asyncOptions??new AsyncOptions();
DynamoDBAsyncExecutor.ExecuteAsync<Table>(
()=>{
return LoadTable(ddbClient,tableName,consumer,conversion);
},asyncOptions,callback);
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:8,代码来源:Table.Async.cs
示例4: GetRemainingAsync
/// <summary>
/// Initiates the asynchronous execution of the GetRemaining operation.
/// <seealso cref="Amazon.DynamoDBv2.DocumentModel.Search.GetRemaining"/>
/// </summary>
/// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</param>
/// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</param>
public void GetRemainingAsync(AmazonDynamoDBCallback<List<Document>> callback, AsyncOptions asyncOptions = null)
{
asyncOptions = asyncOptions ?? new AsyncOptions();
DynamoDBAsyncExecutor.ExecuteAsync<List<Document>>(
() => { return GetRemainingHelper(true); },
asyncOptions,
callback);
}
开发者ID:NathanSDunn,项目名称:aws-sdk-unity,代码行数:14,代码来源:Search.Async.cs
示例5: ExecuteAsync
/// <summary>
/// Initiates the asynchronous execution of the Execute operation.
/// <seealso cref="Amazon.DynamoDBv2.DataModel.MultiTableBatchWrite.Execute"/>
/// </summary>
/// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</param>
/// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</param>
public void ExecuteAsync(AmazonDynamoDBCallback callback, AsyncOptions asyncOptions = null)
{
asyncOptions = asyncOptions ?? new AsyncOptions();
DynamoDBAsyncExecutor.ExecuteAsync(
() => { ExecuteHelper(true); },
asyncOptions,
callback);
}
开发者ID:paveltimofeev,项目名称:aws-sdk-unity,代码行数:14,代码来源:BatchWrite.Async.cs
示例6: PutItemAsync
/// <summary>
/// Initiates the asynchronous execution of the PutItem operation.
/// </summary>
/// <param name="doc">Document to save.</param>
/// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</param>
/// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</param>
public void PutItemAsync(Document doc, AmazonDynamoDBCallback<Document> callback, AsyncOptions asyncOptions = null)
{
asyncOptions = asyncOptions ?? new AsyncOptions();
DynamoDBAsyncExecutor.ExecuteAsync<Document>(
() => { return PutItemHelper(doc, null, true); },
asyncOptions,
callback);
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:14,代码来源:Table.Async.cs
示例7: SynchronizeAsync
/// <summary>
/// Synchronize <see cref="Dataset"/> between local storage and remote storage.
/// </summary>
public virtual void SynchronizeAsync(AsyncOptions options = null)
{
options = options == null ? new AsyncOptions() : options;
if (_netReachability.NetworkStatus == NetworkStatus.NotReachable)
{
FireSyncFailureEvent(new NetworkException("Network connectivity unavailable."), options);
return;
}
SynchronizeHelperAsync(options);
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:14,代码来源:Dataset.unity.cs
示例8: DownloadToAsync
/// <summary>
/// Initiates the asynchronous execution of the DownloadTo operation.
/// </summary>
/// <param name="downloadPath">Path to save the file.</param>
/// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</param>
/// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</param>
public void DownloadToAsync(string downloadPath, AmazonDynamoDBCallback callback, AsyncOptions asyncOptions = null)
{
asyncOptions = asyncOptions ?? new AsyncOptions();
DynamoDBAsyncExecutor.ExecuteAsync(
() =>
{
this.s3ClientCache.GetClient(this.RegionAsEndpoint).DownloadToFilePath(
this.linker.s3.bucket, this.linker.s3.key, downloadPath, null);
},
asyncOptions,
callback);
}
开发者ID:johnryork,项目名称:aws-sdk-unity,代码行数:18,代码来源:S3Link.Async.cs
示例9: UploadFromAsync
/// <summary>
/// Initiates the asynchronous execution of the UploadFrom operation.
/// </summary>
/// <param name="sourcePath">Path of the file to be uploaded.</param>
/// <param name="callback">The callback that will be invoked when the asynchronous operation completes.</param>
/// <param name="asyncOptions">An instance of AsyncOptions that specifies how the async method should be executed.</param>
public void UploadFromAsync(string sourcePath, AmazonDynamoDBCallback callback, AsyncOptions asyncOptions = null)
{
asyncOptions = asyncOptions ?? new AsyncOptions();
DynamoDBAsyncExecutor.ExecuteAsync(
() =>
{
this.s3ClientCache.GetClient(this.RegionAsEndpoint).UploadObjectFromFilePath(
this.linker.s3.bucket, this.linker.s3.key, sourcePath, null);
},
asyncOptions,
callback);
}
开发者ID:johnryork,项目名称:aws-sdk-unity,代码行数:18,代码来源:S3Link.Async.cs
示例10: SynchronizeOnConnectivity
/// <summary>
/// Attempt to synchronize <see cref="Dataset"/> when connectivity is available. If
/// the connectivity is available right away, it behaves the same as
/// <see cref="Dataset.SynchronizeAsync(AsyncOptions)"/>. Otherwise it listens to connectivity
/// changes, and will do a sync once the connectivity is back. Note that if
/// this method is called multiple times, only the last synchronize request
/// is kept. If either the dataset or the callback is garbage collected
/// , this method will not perform a sync and the callback won't fire.
/// </summary>
public virtual void SynchronizeOnConnectivity(AsyncOptions options = null)
{
if (_netReachability.NetworkStatus != NetworkStatus.NotReachable)
{
SynchronizeAsync(options);
}
else
{
waitingForConnectivity = true;
OnConnectivityOptions = options;
}
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:21,代码来源:Dataset.unity.cs
示例11: RefreshDatasetMetadataAsync
/// <summary>
/// Refreshes dataset metadata. Dataset metadata is pulled from remote
/// storage and stored in local storage. Their record data isn't pulled down
/// until you sync each dataset.
/// </summary>
/// <param name="callback">Callback once the refresh is complete</param>
/// <param name="options">Options for asynchronous execution</param>
/// <exception cref="Amazon.CognitoSync.SyncManager.DataStorageException">Thrown when fail to fresh dataset metadata</exception>
public void RefreshDatasetMetadataAsync(AmazonCognitoSyncCallback<List<DatasetMetadata>> callback, AsyncOptions options = null)
{
options = options ?? new AsyncOptions();
AmazonCognitoSyncResult<List<DatasetMetadata>> cognitoResult = new AmazonCognitoSyncResult<List<DatasetMetadata>>(options.State);
InternalSDKUtils.AsyncExecutor(() =>
{
try
{
var response = Remote.ListDatasetMetadata();
Local.UpdateDatasetMetadata(IdentityId, response);
cognitoResult.Response = response;
}
catch (Exception e)
{
cognitoResult.Exception = e;
}
callback(cognitoResult);
}, options);
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:28,代码来源:CognitoSyncManager.unity.cs
示例12: PopulateGetDatasetMetadataAsync
private void PopulateGetDatasetMetadataAsync(string nextToken, List<DatasetMetadata> datasets, AmazonCognitoSyncCallback<List<DatasetMetadata>> callback, AsyncOptions options)
{
ListDatasetsRequest request = new ListDatasetsRequest();
// a large enough number to reduce # of requests
request.MaxResults = 64;
request.NextToken = nextToken;
client.ListDatasetsAsync(request, (responseObj) =>
{
Exception ex = responseObj.Exception;
ListDatasetsResponse response = responseObj.Response;
object obj = responseObj.state;
if (ex != null)
{
InternalSDKUtils.AsyncExecutor(() => callback(new AmazonCognitoSyncResult<List<DatasetMetadata>>(null, ex, obj)), options);
}
else
{
foreach (Amazon.CognitoSync.Model.Dataset dataset in response.Datasets)
{
datasets.Add(ModelToDatasetMetadata(dataset));
}
nextToken = response.NextToken;
if (nextToken == null)
{
InternalSDKUtils.AsyncExecutor(() => callback(new AmazonCognitoSyncResult<List<DatasetMetadata>>(datasets, null, obj)), options);
return;
}
PopulateGetDatasetMetadataAsync(nextToken, datasets, callback, options);
}
},
options);
}
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:36,代码来源:CognitoSyncStorage.cs
示例13: GetCredentialsAsync
/// <summary>
/// Returns an instance of ImmutableCredentials for this instance
/// </summary>
/// <param name="callback">The callback which is executed when the asynchronous operations is completed</param>
/// <param name="options">Options for executing asynchronous operation</param>
public void GetCredentialsAsync(AmazonCognitoIdentityCallback<ImmutableCredentials> callback, AsyncOptions options = null)
{
options = options == null ? new AsyncOptions() : options;
CognitoIdentityAsyncExecutor.ExecuteAsync<ImmutableCredentials>(() =>
{
return GetCredentials();
}, options, callback);
}
开发者ID:NathanSDunn,项目名称:aws-sdk-unity,代码行数:14,代码来源:CognitoAWSCredentials.unity.cs
示例14: GetIdentityIdAsync
/// <summary>
/// Gets the Identity Id corresponding to the credentials retrieved from Cognito.
/// Note: this setting may change during execution. To be notified of its
/// new value, attach a listener to IdentityChangedEvent
/// </summary>
/// <param name="callback">The callback which is executed when the asynchronous operations is completed</param>
/// <param name="options">Options for executing asynchronous operation</param>
public void GetIdentityIdAsync(AmazonCognitoIdentityCallback<string> callback, AsyncOptions options = null)
{
options = options == null ? new AsyncOptions() : options;
CognitoIdentityAsyncExecutor.ExecuteAsync<string>(() =>
{
return GetIdentityId();
}, options, callback);
}
开发者ID:NathanSDunn,项目名称:aws-sdk-unity,代码行数:16,代码来源:CognitoAWSCredentials.unity.cs
示例15: GetSessionTokenAsync
/// <summary>
/// Returns a set of temporary credentials for an AWS account or IAM user. The credentials
/// consist of an access key ID, a secret access key, and a security token. Typically,
/// you use <code>GetSessionToken</code> if you want to use MFA to protect programmatic
/// calls to specific AWS APIs like Amazon EC2 <code>StopInstances</code>. MFA-enabled
/// IAM users would need to call <code>GetSessionToken</code> and submit an MFA code that
/// is associated with their MFA device. Using the temporary security credentials that
/// are returned from the call, IAM users can then make programmatic calls to APIs that
/// require MFA authentication.
///
///
/// <para>
/// The <code>GetSessionToken</code> action must be called by using the long-term AWS
/// security credentials of the AWS account or an IAM user. Credentials that are created
/// by IAM users are valid for the duration that you specify, between 900 seconds (15
/// minutes) and 129600 seconds (36 hours); credentials that are created by using account
/// credentials have a maximum duration of 3600 seconds (1 hour).
/// </para>
/// <note>
/// <para>
/// We recommend that you do not call <code>GetSessionToken</code> with root account credentials.
/// Instead, follow our <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/IAMBestPractices.html#create-iam-users">best
/// practices</a> by creating one or more IAM users, giving them the necessary permissions,
/// and using IAM users for everyday interaction with AWS.
/// </para>
/// </note>
/// <para>
/// The permissions associated with the temporary security credentials returned by <code>GetSessionToken</code>
/// are based on the permissions associated with account or IAM user whose credentials
/// are used to call the action. If <code>GetSessionToken</code> is called using root
/// account credentials, the temporary credentials have root account permissions. Similarly,
/// if <code>GetSessionToken</code> is called using the credentials of an IAM user, the
/// temporary credentials have the same permissions as the IAM user.
/// </para>
///
/// <para>
/// For more information about using <code>GetSessionToken</code> to create temporary
/// credentials, go to <a href="http://docs.aws.amazon.com/STS/latest/UsingSTS/CreatingSessionTokens.html"
/// target="_blank">Creating Temporary Credentials to Enable Access for IAM Users</a>.
///
/// </para>
/// </summary>
/// <param name="options">
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// </param>
///
/// <returns>The response from the GetSessionToken service method, as returned by SecurityTokenService.</returns>
public void GetSessionTokenAsync(AmazonServiceCallback<GetSessionTokenRequest, GetSessionTokenResponse> callback, AsyncOptions options = null)
{
GetSessionTokenAsync(new GetSessionTokenRequest(), callback, options);
}
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:52,代码来源:AmazonSecurityTokenServiceClient.cs
示例16: RefreshDatasetMetadataAsync
/// <summary>
/// Refreshes dataset metadata. Dataset metadata is pulled from remote
/// storage and stored in local storage. Their record data isn't pulled down
/// until you sync each dataset.
/// </summary>
/// <param name="callback">Callback once the refresh is complete</param>
/// <param name="options">Options for asynchronous execution</param>
/// <exception cref="Amazon.CognitoSync.SyncManager.DataStorageException">Thrown when fail to fresh dataset metadata</exception>
public void RefreshDatasetMetadataAsync(AmazonCognitoSyncCallback<List<DatasetMetadata>> callback, AsyncOptions options = null)
{
options = options ?? new AsyncOptions();
remote.GetDatasetMetadataAsync((cognitoResult) =>
{
Exception ex = cognitoResult.Exception;
List<DatasetMetadata> res = cognitoResult.Response;
if (ex != null)
{
InternalSDKUtils.AsyncExecutor(() => callback(cognitoResult), options);
}
else
{
Local.UpdateDatasetMetadata(GetIdentityId(), res);
InternalSDKUtils.AsyncExecutor(() => callback(cognitoResult), options);
}
}, options);
}
开发者ID:Danubian,项目名称:SwagNito,代码行数:27,代码来源:CognitoSyncManager.cs
示例17: SetIdentityPoolConfigurationAsync
/// <summary>
/// Initiates the asynchronous execution of the SetIdentityPoolConfiguration operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the SetIdentityPoolConfiguration operation on AmazonCognitoSyncClient.</param>
/// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
/// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
public void SetIdentityPoolConfigurationAsync(SetIdentityPoolConfigurationRequest request, AmazonServiceCallback<SetIdentityPoolConfigurationRequest, SetIdentityPoolConfigurationResponse> callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var marshaller = new SetIdentityPoolConfigurationRequestMarshaller();
var unmarshaller = SetIdentityPoolConfigurationResponseUnmarshaller.Instance;
Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult<SetIdentityPoolConfigurationRequest,SetIdentityPoolConfigurationResponse> responseObject
= new AmazonServiceResult<SetIdentityPoolConfigurationRequest,SetIdentityPoolConfigurationResponse>((SetIdentityPoolConfigurationRequest)req, (SetIdentityPoolConfigurationResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke<SetIdentityPoolConfigurationRequest>(request, marshaller, unmarshaller, options, callbackHelper);
}
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:22,代码来源:AmazonCognitoSyncClient.cs
示例18: DescribeIdentityUsageAsync
/// <summary>
/// Initiates the asynchronous execution of the DescribeIdentityUsage operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the DescribeIdentityUsage operation on AmazonCognitoSyncClient.</param>
/// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
/// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
public void DescribeIdentityUsageAsync(DescribeIdentityUsageRequest request, AmazonServiceCallback<DescribeIdentityUsageRequest, DescribeIdentityUsageResponse> callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var marshaller = new DescribeIdentityUsageRequestMarshaller();
var unmarshaller = DescribeIdentityUsageResponseUnmarshaller.Instance;
Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult<DescribeIdentityUsageRequest,DescribeIdentityUsageResponse> responseObject
= new AmazonServiceResult<DescribeIdentityUsageRequest,DescribeIdentityUsageResponse>((DescribeIdentityUsageRequest)req, (DescribeIdentityUsageResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke<DescribeIdentityUsageRequest>(request, marshaller, unmarshaller, options, callbackHelper);
}
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:22,代码来源:AmazonCognitoSyncClient.cs
示例19: GetOpenIdTokenForDeveloperIdentityAsync
/// <summary>
/// Initiates the asynchronous execution of the GetOpenIdTokenForDeveloperIdentity operation.
/// </summary>
///
/// <param name="request">Container for the necessary parameters to execute the GetOpenIdTokenForDeveloperIdentity operation on AmazonCognitoIdentityClient.</param>
/// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
/// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.</param>
public void GetOpenIdTokenForDeveloperIdentityAsync(GetOpenIdTokenForDeveloperIdentityRequest request, AmazonServiceCallback<GetOpenIdTokenForDeveloperIdentityRequest, GetOpenIdTokenForDeveloperIdentityResponse> callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var marshaller = new GetOpenIdTokenForDeveloperIdentityRequestMarshaller();
var unmarshaller = GetOpenIdTokenForDeveloperIdentityResponseUnmarshaller.Instance;
Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult<GetOpenIdTokenForDeveloperIdentityRequest,GetOpenIdTokenForDeveloperIdentityResponse> responseObject
= new AmazonServiceResult<GetOpenIdTokenForDeveloperIdentityRequest,GetOpenIdTokenForDeveloperIdentityResponse>((GetOpenIdTokenForDeveloperIdentityRequest)req, (GetOpenIdTokenForDeveloperIdentityResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke<GetOpenIdTokenForDeveloperIdentityRequest>(request, marshaller, unmarshaller, options, callbackHelper);
}
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:22,代码来源:AmazonCognitoIdentityClient.cs
示例20: GetCredentialsForIdentityAsync
/// <summary>
/// Returns credentials for the the provided identity ID. Any provided logins will be
/// validated against supported login providers. If the token is for cognito-identity.amazonaws.com,
/// it will be passed through to AWS Security Token Service with the appropriate role
/// for the token.
/// </summary>
/// <param name="identityId">A unique identifier in the format REGION:GUID.</param>
/// <param name="logins">A set of optional name-value pairs that map provider names to provider tokens.</param>
///
/// <returns>The response from the GetCredentialsForIdentity service method, as returned by CognitoIdentity.</returns>
/// <exception cref="Amazon.CognitoIdentity.Model.InternalErrorException">
/// Thrown when the service encounters an error during processing the request.
/// </exception>
/// <exception cref="Amazon.CognitoIdentity.Model.InvalidIdentityPoolConfigurationException">
/// Thrown if the identity pool has no role associated for the given auth type (auth/unauth)
/// or if the AssumeRole fails.
/// </exception>
/// <exception cref="Amazon.CognitoIdentity.Model.InvalidParameterException">
/// Thrown for missing or bad input parameter(s).
/// </exception>
/// <exception cref="Amazon.CognitoIdentity.Model.NotAuthorizedException">
/// Thrown when a user is not authorized to access the requested resource.
/// </exception>
/// <exception cref="Amazon.CognitoIdentity.Model.ResourceConflictException">
/// Thrown when a user tries to use a login which is already linked to another account.
/// </exception>
/// <exception cref="Amazon.CognitoIdentity.Model.ResourceNotFoundException">
/// Thrown when the requested resource (for example, a dataset or record) does not exist.
/// </exception>
/// <exception cref="Amazon.CognitoIdentity.Model.TooManyRequestsException">
/// Thrown when a request is throttled.
/// </exception>
public void GetCredentialsForIdentityAsync(string identityId, Dictionary<string, string> logins, AmazonServiceCallback<GetCredentialsForIdentityRequest, GetCredentialsForIdentityResponse> callback, AsyncOptions options = null)
{
var request = new GetCredentialsForIdentityRequest();
request.IdentityId = identityId;
request.Logins = logins;
GetCredentialsForIdentityAsync(request, callback, options);
}
开发者ID:NathanSDunn,项目名称:aws-sdk-unity-samples,代码行数:39,代码来源:AmazonCognitoIdentityClient.cs
注:本文中的Amazon.Runtime.AsyncOptions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论