コード例 #1
0
 /// <summary>
 /// List artifacts in a given artifact source.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='artifactSourceName'>
 /// The name of the artifact source.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Artifact> > ListAsync(this IArtifactsOperations operations, string resourceGroupName, string labName, string artifactSourceName, ODataQuery <Artifact> odataQuery = default(ODataQuery <Artifact>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, artifactSourceName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// List artifacts in a given artifact source.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Artifact> > ListNextAsync(this IArtifactsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #3
0
 /// <summary>
 /// Generates an ARM template for the given artifact, uploads the required
 /// files to a storage account, and validates the generated artifact.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='artifactSourceName'>
 /// The name of the artifact source.
 /// </param>
 /// <param name='name'>
 /// The name of the artifact.
 /// </param>
 /// <param name='generateArmTemplateRequest'>
 /// Parameters for generating an ARM template for deploying artifacts.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ArmTemplateInfo> GenerateArmTemplateAsync(this IArtifactsOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, GenerateArmTemplateRequest generateArmTemplateRequest, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GenerateArmTemplateWithHttpMessagesAsync(resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #4
0
 /// <summary>
 /// Get artifact.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='artifactSourceName'>
 /// The name of the artifact source.
 /// </param>
 /// <param name='name'>
 /// The name of the artifact.
 /// </param>
 /// <param name='expand'>
 /// Specify the $expand query. Example: 'properties($select=title)'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Artifact> GetAsync(this IArtifactsOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, artifactSourceName, name, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #5
0
 /// <summary>
 /// Create or update blueprint artifact.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope of the resource. Valid scopes are: management group (format:
 /// '/providers/Microsoft.Management/managementGroups/{managementGroup}'),
 /// subscription (format: '/subscriptions/{subscriptionId}').
 /// </param>
 /// <param name='blueprintName'>
 /// Name of the blueprint definition.
 /// </param>
 /// <param name='artifactName'>
 /// Name of the blueprint artifact.
 /// </param>
 /// <param name='artifact'>
 /// Blueprint artifact to create or update.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Artifact> CreateOrUpdateAsync(this IArtifactsOperations operations, string scope, string blueprintName, string artifactName, Artifact artifact, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(scope, blueprintName, artifactName, artifact, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #6
0
 /// <summary>
 /// List artifacts for a given blueprint definition.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope of the resource. Valid scopes are: management group (format:
 /// '/providers/Microsoft.Management/managementGroups/{managementGroup}'),
 /// subscription (format: '/subscriptions/{subscriptionId}').
 /// </param>
 /// <param name='blueprintName'>
 /// Name of the blueprint definition.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Artifact> > ListAsync(this IArtifactsOperations operations, string scope, string blueprintName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(scope, blueprintName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
        /// <summary>
        /// Create or update Blueprint artifact.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='managementGroupName'>
        /// azure managementGroup name, which we save the blueprint to.
        /// </param>
        /// <param name='blueprintName'>
        /// name of the blueprint.
        /// </param>
        /// <param name='artifactName'>
        /// name of the artifact.
        /// </param>
        /// <param name='artifact'>
        /// Blueprint artifact to save.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <Artifact> CreateOrUpdateInManagementGroupAsync(this IArtifactsOperations operations, string managementGroupName, string blueprintName, string artifactName, Artifact artifact, CancellationToken cancellationToken = default(CancellationToken))
        {
            var scope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName);

            using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(scope, blueprintName, artifactName, artifact, null, cancellationToken).ConfigureAwait(false))
            {
                return(_result.Body);
            }
        }
コード例 #8
0
        /// <summary>
        /// List artifacts for a given Blueprint.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='subscriptionId'>
        /// azure subscriptionId, which we save the blueprint to.
        /// </param>
        /// <param name='blueprintName'>
        /// name of the blueprint.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <IPage <Artifact> > ListInSubscriptionAsync(this IArtifactsOperations operations, string subscriptionId, string blueprintName, CancellationToken cancellationToken = default(CancellationToken))
        {
            var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId);

            using (var _result = await operations.ListWithHttpMessagesAsync(scope, blueprintName, null, cancellationToken).ConfigureAwait(false))
            {
                return(_result.Body);
            }
        }
コード例 #9
0
 /// <summary>
 /// List artifacts in a given artifact source.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='artifactSourceName'>
 /// The name of the artifact source.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Artifact> List(this IArtifactsOperations operations, string resourceGroupName, string labName, string artifactSourceName, ODataQuery <Artifact> odataQuery = default(ODataQuery <Artifact>))
 {
     return(operations.ListAsync(resourceGroupName, labName, artifactSourceName, odataQuery).GetAwaiter().GetResult());
 }
コード例 #10
0
 /// <summary>
 /// List artifacts in a given artifact source.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Artifact> ListNext(this IArtifactsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
コード例 #11
0
 /// <summary>
 /// Generates an ARM template for the given artifact, uploads the required
 /// files to a storage account, and validates the generated artifact.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='artifactSourceName'>
 /// The name of the artifact source.
 /// </param>
 /// <param name='name'>
 /// The name of the artifact.
 /// </param>
 /// <param name='generateArmTemplateRequest'>
 /// Parameters for generating an ARM template for deploying artifacts.
 /// </param>
 public static ArmTemplateInfo GenerateArmTemplate(this IArtifactsOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, GenerateArmTemplateRequest generateArmTemplateRequest)
 {
     return(operations.GenerateArmTemplateAsync(resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest).GetAwaiter().GetResult());
 }
コード例 #12
0
        /// <summary>
        /// Get a Blueprint artifact.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='subscriptionId'>
        /// azure subscriptionId, which we save the blueprint to.
        /// </param>
        /// <param name='blueprintName'>
        /// name of the blueprint.
        /// </param>
        /// <param name='artifactName'>
        /// name of the artifact.
        /// </param>
        public static Artifact GetInSubscription(this IArtifactsOperations operations, string subscriptionId, string blueprintName, string artifactName)
        {
            var scope = string.Format(Constants.ResourceScopes.SubscriptionScope, subscriptionId);

            return(operations.GetAsync(scope, blueprintName, artifactName).GetAwaiter().GetResult());
        }
コード例 #13
0
 /// <summary>
 /// Create or update blueprint artifact.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope of the resource. Valid scopes are: management group (format:
 /// '/providers/Microsoft.Management/managementGroups/{managementGroup}'),
 /// subscription (format: '/subscriptions/{subscriptionId}').
 /// </param>
 /// <param name='blueprintName'>
 /// Name of the blueprint definition.
 /// </param>
 /// <param name='artifactName'>
 /// Name of the blueprint artifact.
 /// </param>
 /// <param name='artifact'>
 /// Blueprint artifact to create or update.
 /// </param>
 public static Artifact CreateOrUpdate(this IArtifactsOperations operations, string scope, string blueprintName, string artifactName, Artifact artifact)
 {
     return(operations.CreateOrUpdateAsync(scope, blueprintName, artifactName, artifact).GetAwaiter().GetResult());
 }
コード例 #14
0
 /// <summary>
 /// List artifacts for a given blueprint definition.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope of the resource. Valid scopes are: management group (format:
 /// '/providers/Microsoft.Management/managementGroups/{managementGroup}'),
 /// subscription (format: '/subscriptions/{subscriptionId}').
 /// </param>
 /// <param name='blueprintName'>
 /// Name of the blueprint definition.
 /// </param>
 public static IPage <Artifact> List(this IArtifactsOperations operations, string scope, string blueprintName)
 {
     return(operations.ListAsync(scope, blueprintName).GetAwaiter().GetResult());
 }
コード例 #15
0
 /// <summary>
 /// Delete a blueprint artifact.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceScope'>
 /// The scope of the resource. Valid scopes are: management group (format:
 /// '/providers/Microsoft.Management/managementGroups/{managementGroup}'),
 /// subscription (format: '/subscriptions/{subscriptionId}').
 /// </param>
 /// <param name='blueprintName'>
 /// Name of the blueprint definition.
 /// </param>
 /// <param name='artifactName'>
 /// Name of the blueprint artifact.
 /// </param>
 public static Artifact Delete(this IArtifactsOperations operations, string resourceScope, string blueprintName, string artifactName)
 {
     return(operations.DeleteAsync(resourceScope, blueprintName, artifactName).GetAwaiter().GetResult());
 }
コード例 #16
0
        /// <summary>
        /// Get a Blueprint artifact.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='managementGroupName'>
        /// azure managementGroup name, which we save the blueprint to.
        /// </param>
        /// <param name='blueprintName'>
        /// name of the blueprint.
        /// </param>
        /// <param name='artifactName'>
        /// name of the artifact.
        /// </param>
        public static Artifact GetInManagementGroup(this IArtifactsOperations operations, string managementGroupName, string blueprintName, string artifactName)
        {
            var scope = string.Format(Constants.ResourceScopes.ManagementGroupScope, managementGroupName);

            return(operations.GetAsync(scope, blueprintName, artifactName).GetAwaiter().GetResult());
        }
コード例 #17
0
 /// <summary>
 /// Get artifact.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='artifactSourceName'>
 /// The name of the artifact source.
 /// </param>
 /// <param name='name'>
 /// The name of the artifact.
 /// </param>
 /// <param name='expand'>
 /// Specify the $expand query. Example: 'properties($select=title)'
 /// </param>
 public static Artifact Get(this IArtifactsOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, string expand = default(string))
 {
     return(operations.GetAsync(resourceGroupName, labName, artifactSourceName, name, expand).GetAwaiter().GetResult());
 }
コード例 #18
0
 /// <summary>
 /// Get a blueprint artifact.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope of the resource. Valid scopes are: management group (format:
 /// '/providers/Microsoft.Management/managementGroups/{managementGroup}'),
 /// subscription (format: '/subscriptions/{subscriptionId}').
 /// </param>
 /// <param name='blueprintName'>
 /// Name of the blueprint definition.
 /// </param>
 /// <param name='artifactName'>
 /// Name of the blueprint artifact.
 /// </param>
 public static Artifact Get(this IArtifactsOperations operations, string scope, string blueprintName, string artifactName)
 {
     return(operations.GetAsync(scope, blueprintName, artifactName).GetAwaiter().GetResult());
 }