Пример #1
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());
 }
        /// <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());
        }
Пример #3
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());
 }
        /// <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());
        }