本文整理汇总了C#中this.CreateOrUpdateAsync方法的典型用法代码示例。如果您正苦于以下问题:C# this.CreateOrUpdateAsync方法的具体用法?C# this.CreateOrUpdateAsync怎么用?C# this.CreateOrUpdateAsync使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类this
的用法示例。
在下文中一共展示了this.CreateOrUpdateAsync方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateOrUpdate
/// <param name='operations'>
/// Reference to the
/// Microsoft.WindowsAzure.Management.Monitoring.Autoscale.ISettingOperations.
/// </param>
/// <param name='resourceId'>
/// The resource ID.
/// </param>
/// <param name='parameters'>
/// Parameters supplied to the operation.
/// </param>
/// <returns>
/// A standard service response including an HTTP status code and
/// request ID.
/// </returns>
public static OperationResponse CreateOrUpdate(this ISettingOperations operations, string resourceId, AutoscaleSettingCreateOrUpdateParameters parameters)
{
try
{
return operations.CreateOrUpdateAsync(resourceId, parameters).Result;
}
catch (AggregateException ex)
{
if (ex.InnerExceptions.Count > 1)
{
throw;
}
else
{
throw ex.InnerException;
}
}
}
示例2: CreateOrUpdate
/// <summary>
/// The Put Metric Settings operation creates or updates the metric
/// settings for the resource.
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.WindowsAzure.Management.Monitoring.Metrics.IMetricSettingOperations.
/// </param>
/// <param name='parameters'>
/// Metric settings to be created or updated.
/// </param>
/// <returns>
/// A standard service response including an HTTP status code and
/// request ID.
/// </returns>
public static OperationResponse CreateOrUpdate(this IMetricSettingOperations operations, MetricSettingsPutParameters parameters)
{
try
{
return operations.CreateOrUpdateAsync(parameters).Result;
}
catch (AggregateException ex)
{
if (ex.InnerExceptions.Count > 1)
{
throw;
}
else
{
throw ex.InnerException;
}
}
}
示例3: CreateOrUpdateAsync
/// <summary>
/// Create a redis cache, or replace (overwrite/recreate, with
/// potential downtime) an existing cache
/// </summary>
/// <param name='operations'>
/// Reference to the Microsoft.Azure.Management.Redis.IRedisOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The name of the resource group.
/// </param>
/// <param name='name'>
/// Required. The name of the redis cache.
/// </param>
/// <param name='parameters'>
/// Required. Parameters supplied to the CreateOrUpdate redis operation.
/// </param>
/// <returns>
/// The response of CreateOrUpdate redis operation.
/// </returns>
public static Task<RedisCreateOrUpdateResponse> CreateOrUpdateAsync(this IRedisOperations operations, string resourceGroupName, string name, RedisCreateOrUpdateParameters parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, name, parameters, CancellationToken.None);
}
示例4: CreateOrUpdateAsync
/// <summary>
/// Create a new table instance or update an existing instance.
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.DataFactories.Core.ITableOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The resource group name of the data factory.
/// </param>
/// <param name='dataFactoryName'>
/// Required. A unique data factory instance name.
/// </param>
/// <param name='parameters'>
/// Required. The parameters required to create or update a table.
/// </param>
/// <returns>
/// The CreateOrUpdate table operation response.
/// </returns>
public static Task<TableCreateOrUpdateResponse> CreateOrUpdateAsync(this ITableOperations operations, string resourceGroupName, string dataFactoryName, TableCreateOrUpdateParameters parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, dataFactoryName, parameters, CancellationToken.None);
}
示例5: CreateOrUpdateAsync
/// <summary>
/// The Put LocalNetworkGateway operation creates/updates a local
/// network gateway in the specified resource group through Network
/// resource provider.
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.Network.ILocalNetworkGatewayOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The name of the resource group.
/// </param>
/// <param name='localNetworkGatewayName'>
/// Required. The name of the local network gateway.
/// </param>
/// <param name='parameters'>
/// Required. Parameters supplied to the Begin Create or update Local
/// Network Gateway operation through Network resource provider.
/// </param>
/// <returns>
/// The response body contains the status of the specified asynchronous
/// operation, indicating whether it has succeeded, is inprogress, or
/// has failed. Note that this status is distinct from the HTTP status
/// code returned for the Get Operation Status operation itself. If
/// the asynchronous operation succeeded, the response body includes
/// the HTTP status code for the successful request. If the
/// asynchronous operation failed, the response body includes the HTTP
/// status code for the failed request and error information regarding
/// the failure.
/// </returns>
public static Task<AzureAsyncOperationResponse> CreateOrUpdateAsync(this ILocalNetworkGatewayOperations operations, string resourceGroupName, string localNetworkGatewayName, LocalNetworkGateway parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, localNetworkGatewayName, parameters, CancellationToken.None);
}
示例6: CreateOrUpdateAsync
/// <summary>
/// Create the configuration identified by configuration name. (see
/// http://aka.ms/azureautomationsdk/configurationoperations for more
/// information)
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.Automation.IDscConfigurationOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The name of the resource group
/// </param>
/// <param name='automationAccount'>
/// Required. The automation account name.
/// </param>
/// <param name='parameters'>
/// Required. The create or update parameters for configuration.
/// </param>
/// <returns>
/// The response model for the configuration create response.
/// </returns>
public static Task<DscConfigurationCreateOrUpdateResponse> CreateOrUpdateAsync(this IDscConfigurationOperations operations, string resourceGroupName, string automationAccount, DscConfigurationCreateOrUpdateParameters parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None);
}
示例7: CreateOrUpdateAsync
/// <summary>
/// Your documentation here. (see
/// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXX.aspx
/// for more information)
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.AzureStack.Management.IManagedSubscriptionOperations.
/// </param>
/// <param name='parameters'>
/// Required. Your documentation here.
/// </param>
/// <returns>
/// Your documentation here.
/// </returns>
public static Task<ManagedSubscriptionCreateOrUpdateResult> CreateOrUpdateAsync(this IManagedSubscriptionOperations operations, ManagedSubscriptionCreateOrUpdateParameters parameters)
{
return operations.CreateOrUpdateAsync(parameters, CancellationToken.None);
}
示例8: CreateOrUpdateAsync
/// <summary>
/// Creates new or updates existing specific API of the Api Management
/// service instance.
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.ApiManagement.IApisOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The name of the resource group.
/// </param>
/// <param name='serviceName'>
/// Required. The name of the Api Management service.
/// </param>
/// <param name='aid'>
/// Required. Identifier of the API.
/// </param>
/// <param name='parameters'>
/// Required. Create or update parameters.
/// </param>
/// <param name='etag'>
/// Optional. ETag.
/// </param>
/// <returns>
/// A standard service response including an HTTP status code and
/// request ID.
/// </returns>
public static Task<AzureOperationResponse> CreateOrUpdateAsync(this IApisOperations operations, string resourceGroupName, string serviceName, string aid, ApiCreateOrUpdateParameters parameters, string etag)
{
return operations.CreateOrUpdateAsync(resourceGroupName, serviceName, aid, parameters, etag, CancellationToken.None);
}
示例9: CreateOrUpdateAsync
/// <summary>
/// Creates or updates an Azure SQL Database Transparent Data
/// Encryption Operation.
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.Sql.ITransparentDataEncryptionOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The name of the Resource Group to which the server
/// belongs.
/// </param>
/// <param name='serverName'>
/// Required. The name of the Azure SQL Database Server on which the
/// database is hosted.
/// </param>
/// <param name='databaseName'>
/// Required. The name of the Azure SQL Database for which setting the
/// Transparent Data Encryption applies.
/// </param>
/// <param name='parameters'>
/// Required. The required parameters for creating or updating
/// transparent data encryption.
/// </param>
/// <returns>
/// Represents the response to a Get for a Azure Sql Database
/// Transparent Data Encryption request.
/// </returns>
public static Task<TransparentDataEncryptionGetResponse> CreateOrUpdateAsync(this ITransparentDataEncryptionOperations operations, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionCreateOrUpdateParameters parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, CancellationToken.None);
}
示例10: CreateOrUpdateAsync
/// <summary>
/// The Put NetworkSecurityGroup operation creates/updates a network
/// security groupin the specified resource group.
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.Network.INetworkSecurityGroupOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The name of the resource group.
/// </param>
/// <param name='networkSecurityGroupName'>
/// Required. The name of the network security group.
/// </param>
/// <param name='parameters'>
/// Required. Parameters supplied to the create/update Network Security
/// Group operation
/// </param>
/// <returns>
/// The response body contains the status of the specified asynchronous
/// operation, indicating whether it has succeeded, is inprogress, or
/// has failed. Note that this status is distinct from the HTTP status
/// code returned for the Get Operation Status operation itself. If
/// the asynchronous operation succeeded, the response body includes
/// the HTTP status code for the successful request. If the
/// asynchronous operation failed, the response body includes the HTTP
/// status code for the failed request and error information regarding
/// the failure.
/// </returns>
public static Task<AzureAsyncOperationResponse> CreateOrUpdateAsync(this INetworkSecurityGroupOperations operations, string resourceGroupName, string networkSecurityGroupName, NetworkSecurityGroup parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, networkSecurityGroupName, parameters, CancellationToken.None);
}
示例11: CreateOrUpdateAsync
/// <summary>
/// Creates a RecordSet within a DNS zone.
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.Dns.IRecordSetOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The name of the resource group.
/// </param>
/// <param name='zoneName'>
/// Required. The name of the zone without a terminating dot.
/// </param>
/// <param name='relativeRecordSetName'>
/// Required. The name of the RecordSet, relative to the name of the
/// zone.
/// </param>
/// <param name='recordType'>
/// Required. The type of DNS record.
/// </param>
/// <param name='parameters'>
/// Required. Parameters supplied to the CreateOrUpdate operation.
/// </param>
/// <returns>
/// The response to a RecordSet CreateOrUpdate operation.
/// </returns>
public static Task<RecordSetCreateOrUpdateResponse> CreateOrUpdateAsync(this IRecordSetOperations operations, string resourceGroupName, string zoneName, string relativeRecordSetName, RecordType recordType, RecordSetCreateOrUpdateParameters parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, CancellationToken.None);
}
示例12: CreateOrUpdateAsync
/// <summary>
/// Create a named template deployment using a template.
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.Internal.Resources.IDeploymentOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The name of the resource group. The name is case
/// insensitive.
/// </param>
/// <param name='deploymentName'>
/// Required. The name of the deployment.
/// </param>
/// <param name='parameters'>
/// Required. Additional parameters supplied to the operation.
/// </param>
/// <returns>
/// Template deployment operation create result.
/// </returns>
public static Task<DeploymentOperationsCreateResult> CreateOrUpdateAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, Deployment parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, deploymentName, parameters, CancellationToken.None);
}
示例13: CreateOrUpdateAsync
/// <summary>
/// You can create a web site by using a POST request that includes the
/// name of the web site and other information in the request body.
/// (see
/// http://msdn.microsoft.com/en-us/library/windowsazure/dn166986.aspx
/// for more information)
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.WebSites.IWebSiteOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The name of the resource group.
/// </param>
/// <param name='webSiteName'>
/// Required. The name of the web site.
/// </param>
/// <param name='slotName'>
/// Optional. The name of the slot.
/// </param>
/// <param name='parameters'>
/// Required. Parameters supplied to the Create Web Site operation.
/// </param>
/// <returns>
/// The Create Web Space operation response.
/// </returns>
public static Task<WebSiteCreateResponse> CreateOrUpdateAsync(this IWebSiteOperations operations, string resourceGroupName, string webSiteName, string slotName, WebSiteCreateOrUpdateParameters parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, webSiteName, slotName, parameters, CancellationToken.None);
}
示例14: CreateOrUpdateAsync
/// <summary>
/// The Put RouteTable operation creates/updates a route tablein the
/// specified resource group.
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.Network.IRouteTableOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. The name of the resource group.
/// </param>
/// <param name='routeTableName'>
/// Required. The name of the route table.
/// </param>
/// <param name='parameters'>
/// Required. Parameters supplied to the create/update Route Table
/// operation
/// </param>
/// <returns>
/// The response body contains the status of the specified asynchronous
/// operation, indicating whether it has succeeded, is inprogress, or
/// has failed. Note that this status is distinct from the HTTP status
/// code returned for the Get Operation Status operation itself. If
/// the asynchronous operation succeeded, the response body includes
/// the HTTP status code for the successful request. If the
/// asynchronous operation failed, the response body includes the HTTP
/// status code for the failed request and error information regarding
/// the failure.
/// </returns>
public static Task<AzureAsyncOperationResponse> CreateOrUpdateAsync(this IRouteTableOperations operations, string resourceGroupName, string routeTableName, RouteTable parameters)
{
return operations.CreateOrUpdateAsync(resourceGroupName, routeTableName, parameters, CancellationToken.None);
}
示例15: CreateOrUpdateAsync
/// <summary>
/// The Create Or Update Protection Policy Operation is used to create
/// or modify a protection policy which is used in the context of a
/// protected item.This is an asynchronous operation. To determine
/// whether the backend service has finished processing the request,
/// call the Get Policy Operation Result API.
/// </summary>
/// <param name='operations'>
/// Reference to the
/// Microsoft.Azure.Management.RecoveryServices.Backup.IProtectionPolicyOperations.
/// </param>
/// <param name='resourceGroupName'>
/// Required. Resource group name of your recovery services vault.
/// </param>
/// <param name='resourceName'>
/// Required. Name of your recovery services vault.
/// </param>
/// <param name='policyName'>
/// Required. Name of the protection policy to be added/updated.
/// </param>
/// <param name='request'>
/// Required. The protection policy creation request.
/// </param>
/// <param name='customRequestHeaders'>
/// Optional. Request header parameters.
/// </param>
/// <returns>
/// Protection policy response.
/// </returns>
public static Task<ProtectionPolicyResponse> CreateOrUpdateAsync(this IProtectionPolicyOperations operations, string resourceGroupName, string resourceName, string policyName, ProtectionPolicyRequest request, CustomRequestHeaders customRequestHeaders)
{
return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, policyName, request, customRequestHeaders, CancellationToken.None);
}