internal static async Task <SqlContainer> CreateSqlContainer(string name, AutoscaleSettings autoscale, SqlContainerCollection sqlContainerCollection) { SqlContainerCreateUpdateData sqlDatabaseCreateUpdateOptions = new SqlContainerCreateUpdateData(AzureLocation.WestUS, new SqlContainerResource(name) { PartitionKey = new ContainerPartitionKey(new List <string> { "/address/zipCode" }, null, null, false) { Kind = new PartitionKind("Hash") }, IndexingPolicy = new IndexingPolicy( true, IndexingMode.Consistent, new List <IncludedPath> { new IncludedPath { Path = "/*" } }, new List <ExcludedPath> { new ExcludedPath { Path = "/pathToNotIndex/*" } }, new List <IList <CompositePath> > { new List <CompositePath> { new CompositePath { Path = "/orderByPath1", Order = CompositePathSortOrder.Ascending }, new CompositePath { Path = "/orderByPath2", Order = CompositePathSortOrder.Descending } } }, new List <SpatialSpec> { new SpatialSpec ( "/*", new List <SpatialType> { new SpatialType("Point") } ), } ) }) { Options = BuildDatabaseCreateUpdateOptions(TestThroughput1, autoscale), }; var sqlContainerLro = await sqlContainerCollection.CreateOrUpdateAsync(WaitUntil.Completed, name, sqlDatabaseCreateUpdateOptions); return(sqlContainerLro.Value); }
internal static async Task <CosmosTableResource> CreateTable(string name, AutoscaleSettings autoscale, CosmosTableCollection collection) { var mongoDBDatabaseCreateUpdateOptions = new CosmosTableCreateOrUpdateContent(AzureLocation.WestUS, new TableResource(name)) { Options = BuildDatabaseCreateUpdateOptions(TestThroughput1, autoscale), }; var databaseLro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, mongoDBDatabaseCreateUpdateOptions); return(databaseLro.Value); }
internal static async Task <SqlDatabase> CreateSqlDatabase(string name, AutoscaleSettings autoscale, SqlDatabaseCollection collection) { SqlDatabaseCreateUpdateData sqlDatabaseCreateUpdateOptions = new SqlDatabaseCreateUpdateData(AzureLocation.WestUS, new SqlDatabaseResource(name)) { Options = BuildDatabaseCreateUpdateOptions(TestThroughput1, autoscale), }; var databaseLro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, sqlDatabaseCreateUpdateOptions); return(databaseLro.Value); }
internal async Task <SqlStoredProcedureResource> CreateSqlStoredProcedure(AutoscaleSettings autoscale) { _storedProcedureName = Recording.GenerateAssetName("sql-stored-procedure-"); SqlStoredProcedureCreateOrUpdateContent sqlDatabaseCreateUpdateOptions = new SqlStoredProcedureCreateOrUpdateContent(AzureLocation.WestUS, new Models.SqlStoredProcedureResource(_storedProcedureName) { Body = @"function () { var updatetext = getContext(); var response = context.getResponse(); response.setBody('First Hello World'); }" }) { Options = BuildDatabaseCreateUpdateOptions(TestThroughput1, autoscale), }; var sqlContainerLro = await SqlStoredProcedureCollection.CreateOrUpdateAsync(WaitUntil.Completed, _storedProcedureName, sqlDatabaseCreateUpdateOptions); return(sqlContainerLro.Value); }
internal async Task <SqlTriggerResource> CreateSqlTrigger(AutoscaleSettings autoscale) { _triggerName = Recording.GenerateAssetName("sql-trigger-"); SqlTriggerCreateUpdateData sqlDatabaseCreateUpdateOptions = new SqlTriggerCreateUpdateData(AzureLocation.WestUS, new Models.SqlTriggerResource(_triggerName) { TriggerOperation = TriggerOperation.All, TriggerType = TriggerType.Pre, Body = @"function () { var updatetext = getContext(); var response = context.getResponse(); response.setBody('First Hello World'); }" }) { Options = BuildDatabaseCreateUpdateOptions(TestThroughput1, autoscale), }; var sqlContainerLro = await SqlTriggerCollection.CreateOrUpdateAsync(WaitUntil.Completed, _triggerName, sqlDatabaseCreateUpdateOptions); return(sqlContainerLro.Value); }
internal CassandraKeyspaceGetPropertiesOptions(int?throughput, AutoscaleSettings autoscaleSettings) : base(throughput, autoscaleSettings) { }
internal TableGetPropertiesOptions(int?throughput, AutoscaleSettings autoscaleSettings) : base(throughput, autoscaleSettings) { }
internal CreateUpdateOptions(int?throughput, AutoscaleSettings autoscaleSettings) { Throughput = throughput; AutoscaleSettings = autoscaleSettings; }
internal static async Task <MongoDBCollectionResource> CreateMongoDBCollection(string name, AutoscaleSettings autoscale, MongoDBCollectionCollection mongoDBContainerCollection) { var mongoDBDatabaseCreateUpdateOptions = new MongoDBCollectionCreateOrUpdateContent(AzureLocation.WestUS, new Models.MongoDBCollectionResource(name)) { Options = BuildDatabaseCreateUpdateOptions(TestThroughput1, autoscale), }; var mongoDBContainerLro = await mongoDBContainerCollection.CreateOrUpdateAsync(WaitUntil.Completed, name, mongoDBDatabaseCreateUpdateOptions); return(mongoDBContainerLro.Value); }
internal async Task <MongoDBCollectionResource> CreateMongoDBCollection(AutoscaleSettings autoscale) { _collectionName = Recording.GenerateAssetName("mongodb-collection-"); return(await CreateMongoDBCollection(_collectionName, autoscale, MongoDBCollectionCollection)); }
internal CassandraTablePropertiesOptions(int?throughput, AutoscaleSettings autoscaleSettings) : base(throughput, autoscaleSettings) { }
internal SqlDatabasePropertiesOptions(int?throughput, AutoscaleSettings autoscaleSettings) : base(throughput, autoscaleSettings) { }
internal async Task <MongoDBDatabaseResource> CreateMongoDBDatabase(AutoscaleSettings autoscale) { _databaseName = Recording.GenerateAssetName("mongodb-"); return(await CreateMongoDBDatabase(_databaseName, autoscale, _databaseAccount.GetMongoDBDatabases())); }
internal async Task <SqlDatabase> CreateSqlDatabase(AutoscaleSettings autoscale) { _databaseName = Recording.GenerateAssetName("sql-db-"); return(await CreateSqlDatabase(_databaseName, autoscale, _databaseAccount.GetSqlDatabases())); }
internal async Task <CosmosTableResource> CreateTable(AutoscaleSettings autoscale) { _databaseName = Recording.GenerateAssetName("table-"); return(await CreateTable(_databaseName, autoscale, _databaseAccount.GetCosmosTables())); }
internal async Task <SqlContainerResource> CreateSqlContainer(AutoscaleSettings autoscale) { _containerName = Recording.GenerateAssetName("sql-container-"); return(await CreateSqlContainer(_containerName, autoscale, SqlContainerCollection)); }
internal static async Task <GremlinDatabaseResource> CreateGremlinDatabase(string name, AutoscaleSettings autoscale, GremlinDatabaseCollection collection) { GremlinDatabaseCreateUpdateData cassandraKeyspaceCreateUpdateOptions = new GremlinDatabaseCreateUpdateData(AzureLocation.WestUS, new Models.GremlinDatabaseResource(name)) { Options = BuildDatabaseCreateUpdateOptions(TestThroughput1, autoscale), }; var databaseLro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, cassandraKeyspaceCreateUpdateOptions); return(databaseLro.Value); }
internal async Task <GremlinDatabaseResource> CreateGremlinDatabase(AutoscaleSettings autoscale) { _databaseName = Recording.GenerateAssetName("gremlin-db-"); return(await CreateGremlinDatabase(_databaseName, autoscale, _databaseAccount.GetGremlinDatabases())); }
internal OptionsResource(int?throughput, AutoscaleSettings autoscaleSettings) { Throughput = throughput; AutoscaleSettings = autoscaleSettings; }
internal SqlContainerGetPropertiesOptions(int?throughput, AutoscaleSettings autoscaleSettings) : base(throughput, autoscaleSettings) { }
internal MongoDBCollectionGetPropertiesOptions(int?throughput, AutoscaleSettings autoscaleSettings) : base(throughput, autoscaleSettings) { }
private CassandraTableCreateOrUpdateContent BuildCreateUpdateOptions(AutoscaleSettings autoscale) { _tableName = Recording.GenerateAssetName("cassandra-table-"); return(new CassandraTableCreateOrUpdateContent(AzureLocation.WestUS, new Models.CassandraTableResource(_tableName, default, new CassandraSchema {
internal GremlinGraphGetPropertiesOptions(int?throughput, AutoscaleSettings autoscaleSettings) : base(throughput, autoscaleSettings) { }
internal async Task <CassandraKeyspaceResource> CreateCassandraKeyspace(AutoscaleSettings autoscale) { _keyspaceName = Recording.GenerateAssetName("cassandra-keyspace-"); return(await CreateCassandraKeyspace(_keyspaceName, autoscale, _keyspaceAccount.GetCassandraKeyspaces())); }