Ejemplo n.º 1
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.Group          = new GroupOperations(this);
     this.BaseUri        = new Uri("https://management.azure.com/");
     this.ApiVersion     = "2014-04-01-preview";
     this.AcceptLanguage = "en-US";
     if (this.Credentials != null)
     {
         this.Credentials.InitializeServiceClient(this);
     }
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Formatting.Indented,
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver()
     };
     SerializationSettings.Converters.Add(new ResourceJsonConverter());
     DeserializationSettings = new JsonSerializerSettings {
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver()
     };
     DeserializationSettings.Converters.Add(new ResourceJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.Group          = new GroupOperations(this);
     this.BaseUri        = new Uri("https://management.azure.com/");
     this.ApiVersion     = "2014-04-01-preview";
     this.AcceptLanguage = "en-US";
     this.LongRunningOperationRetryTimeout = 30;
     this.GenerateClientRequestId          = true;
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Formatting.Indented,
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Updates the details of the group specified by its identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='parameters'>
 /// Update parameters.
 /// </param>
 /// <param name='ifMatch'>
 /// ETag of the Entity. ETag should match the current entity state from the
 /// header response of the GET request or it should be * for unconditional
 /// update.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GroupContract> UpdateAsync(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, GroupUpdateParameters parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the details of the group specified by its identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GroupContract> GetAsync(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists a collection of groups defined within a service instance.
 /// <see href="https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-groups" />
 /// </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 <GroupContract> > ListByServiceNextAsync(this IGroupOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists a collection of groups defined within a service instance.
 /// <see href="https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-groups" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <GroupContract> > ListByServiceAsync(this IGroupOperations operations, string resourceGroupName, string serviceName, ODataQuery <GroupContract> odataQuery = default(ODataQuery <GroupContract>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Provides a resouce group with name 'testgroup101' and location 'West US'.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource Group name 'testgroup101'.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SampleResourceGroup> GetSampleResourceGroupAsync(this IGroupOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetSampleResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Gets the members of a group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='objectId'>
 /// Required. Group object Id who's members should be retrieved.
 /// </param>
 /// <returns>
 /// Server response for Active Directory objects inquiry API calls
 /// </returns>
 public static GetObjectsResult GetGroupMembers(this IGroupOperations operations, string objectId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IGroupOperations)s).GetGroupMembersAsync(objectId);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Gets list of groups for the current tenant.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='mail'>
 /// Optional. Email to filter results.
 /// </param>
 /// <param name='displayNameStartsWith'>
 /// Optional. Display name to filter results.
 /// </param>
 /// <returns>
 /// Server response for Get tenant groups API call
 /// </returns>
 public static GroupListResult List(this IGroupOperations operations, string mail, string displayNameStartsWith)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IGroupOperations)s).ListAsync(mail, displayNameStartsWith);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Create a group in the directory.  (see
 /// http://msdn.microsoft.com/en-us/library/azure/dn151614.aspx for
 /// more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters to create a group
 /// </param>
 /// <returns>
 /// Server response for Get group information API call
 /// </returns>
 public static GroupGetResult Create(this IGroupOperations operations, GroupCreateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IGroupOperations)s).CreateAsync(parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Add a memeber to a group.   (see
 /// http://msdn.microsoft.com/en-us/library/azure/dn151600.aspx for
 /// more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='groupObjectId'>
 /// Required. Group object id
 /// </param>
 /// <param name='parameters'>
 /// Required. Member Object Url as
 /// https://graph.windows.net/contoso.onmicrosoft.com/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse AddMember(this IGroupOperations operations, string groupObjectId, GroupAddMemberParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IGroupOperations)s).AddMemberAsync(groupObjectId, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Gets list of groups for the current tenant.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// Server response for Get tenant groups API call
 /// </returns>
 public static GroupListResult ListNext(this IGroupOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IGroupOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 13
0
        private void InitSubApis()
        {
            this.communicationOperations = new CommunicationTemplate(this.RestTemplate);
            this.connectionOperations    = new ConnectionTemplate(this.RestTemplate);
            this.profileOperations       = new ProfileTemplate(this.RestTemplate);
#if NET_4_0 || SILVERLIGHT_5
            this.groupOperations = new GroupTemplate(this.RestTemplate);
#endif
        }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the GraphRbacManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public GraphRbacManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._application      = new ApplicationOperations(this);
     this._group            = new GroupOperations(this);
     this._objects          = new ObjectOperations(this);
     this._servicePrincipal = new ServicePrincipalOperations(this);
     this._user             = new UserOperations(this);
     this._apiVersion       = "1.42-previewInternal";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Ejemplo n.º 15
0
 private void InitSubApis()
 {
     this.userOperations      = new UserTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.placesOperations    = new PlacesTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.friendOperations    = new FriendTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.feedOperations      = new FeedTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.groupOperations     = new GroupTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.commentOperations   = new CommentTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.likeOperations      = new LikeTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.eventOperations     = new EventTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.mediaOperations     = new MediaTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.pageOperations      = new PageTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.fqlOperations       = new FqlTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.questionOperations  = new QuestionTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
     this.openGraphOperations = new OpenGraphTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Group          = new GroupOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com/");
     ApiVersion     = "2014-04-01-preview";
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new Newtonsoft.Json.JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new System.Collections.Generic.List <Newtonsoft.Json.JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new System.Collections.Generic.List <Newtonsoft.Json.JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Gets the details of the group specified by its identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 public static GroupContract Get(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId)
 {
     return(operations.GetAsync(resourceGroupName, serviceName, groupId).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists a collection of groups defined within a service instance.
 /// <see href="https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-groups" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <GroupContract> ListByService(this IGroupOperations operations, string resourceGroupName, string serviceName, ODataQuery <GroupContract> odataQuery = default(ODataQuery <GroupContract>))
 {
     return(operations.ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult());
 }
		private void InitSubApis()
		{
			this.userOperations      = new UserTemplate     (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.placesOperations    = new PlacesTemplate   (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.friendOperations    = new FriendTemplate   (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.feedOperations      = new FeedTemplate     (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.groupOperations     = new GroupTemplate    (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.commentOperations   = new CommentTemplate  (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.likeOperations      = new LikeTemplate     (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.eventOperations     = new EventTemplate    (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.mediaOperations     = new MediaTemplate    (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.pageOperations      = new PageTemplate     (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.fqlOperations       = new FqlTemplate      (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.questionOperations  = new QuestionTemplate (this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
			this.openGraphOperations = new OpenGraphTemplate(this.applicationNamespace, this.RestTemplate, this.IsAuthorized);
		}
 /// <summary>
 /// Lists a collection of groups defined within a service instance.
 /// <see href="https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-groups" />
 /// </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 <GroupContract> ListByServiceNext(this IGroupOperations operations, string nextPageLink)
 {
     return(operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes specific group of the API Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='ifMatch'>
 /// ETag of the Entity. ETag should match the current entity state from the
 /// header response of the GET request or it should be * for unconditional
 /// update.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, groupId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes specific group of the API Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='ifMatch'>
 /// ETag of the Entity. ETag should match the current entity state from the
 /// header response of the GET request or it should be * for unconditional
 /// update.
 /// </param>
 public static void Delete(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, string ifMatch)
 {
     operations.DeleteAsync(resourceGroupName, serviceName, groupId, ifMatch).GetAwaiter().GetResult();
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Gets next set of members of a group.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to
 /// GetGroupMembers or GetGroupMembersNext.
 /// </param>
 /// <returns>
 /// Server response for Active Directory objects inquiry API calls
 /// </returns>
 public static Task <GetObjectsResult> GetGroupMembersNextAsync(this IGroupOperations operations, string nextLink)
 {
     return(operations.GetGroupMembersNextAsync(nextLink, CancellationToken.None));
 }
 /// <summary>
 /// Updates the details of the group specified by its identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 /// <param name='parameters'>
 /// Update parameters.
 /// </param>
 /// <param name='ifMatch'>
 /// ETag of the Entity. ETag should match the current entity state from the
 /// header response of the GET request or it should be * for unconditional
 /// update.
 /// </param>
 public static GroupContract Update(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId, GroupUpdateParameters parameters, string ifMatch)
 {
     return(operations.UpdateAsync(resourceGroupName, serviceName, groupId, parameters, ifMatch).GetAwaiter().GetResult());
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Gets list of groups for the current tenant.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// Server response for Get tenant groups API call
 /// </returns>
 public static Task <GroupListResult> ListNextAsync(this IGroupOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
 /// <summary>
 /// Gets the entity state (Etag) version of the group specified by its
 /// identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='groupId'>
 /// Group identifier. Must be unique in the current API Management service
 /// instance.
 /// </param>
 public static GroupGetEntityTagHeaders GetEntityTag(this IGroupOperations operations, string resourceGroupName, string serviceName, string groupId)
 {
     return(operations.GetEntityTagAsync(resourceGroupName, serviceName, groupId).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Provides a resouce group with name 'testgroup101' and location 'West US'.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Resource Group name 'testgroup101'.
 /// </param>
 public static SampleResourceGroupInner GetSampleResourceGroup(this IGroupOperations operations, string resourceGroupName)
 {
     return(operations.GetSampleResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
        private void InitSubApis()
        {
            this.communicationOperations = new CommunicationTemplate(this.RestTemplate);
            this.connectionOperations = new ConnectionTemplate(this.RestTemplate);
            this.profileOperations = new ProfileTemplate(this.RestTemplate);
#if NET_4_0 || SILVERLIGHT_5
            this.groupOperations = new GroupTemplate(this.RestTemplate);
#endif
        }
Ejemplo n.º 29
0
 /// <summary>
 /// Remove a memeber from a group  (see
 /// http://msdn.microsoft.com/en-us/library/azure/dn151607.aspx for
 /// more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='groupObjectId'>
 /// Required. Group object id
 /// </param>
 /// <param name='memberObjectId'>
 /// Required. Member Object id
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> RemoveMemberAsync(this IGroupOperations operations, string groupObjectId, string memberObjectId)
 {
     return(operations.RemoveMemberAsync(groupObjectId, memberObjectId, CancellationToken.None));
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Add a memeber to a group.   (see
 /// http://msdn.microsoft.com/en-us/library/azure/dn151600.aspx for
 /// more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='groupObjectId'>
 /// Required. Group object id
 /// </param>
 /// <param name='parameters'>
 /// Required. Member Object Url as
 /// https://graph.windows.net/contoso.onmicrosoft.com/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> AddMemberAsync(this IGroupOperations operations, string groupObjectId, GroupAddMemberParameters parameters)
 {
     return(operations.AddMemberAsync(groupObjectId, parameters, CancellationToken.None));
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Gets a collection that contains the Object IDs of the groups of
 /// which the group is a member.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Group filtering parameters.
 /// </param>
 /// <returns>
 /// Server response for GetMemberGroups API call
 /// </returns>
 public static Task <GroupGetMemberGroupsResult> GetMemberGroupsAsync(this IGroupOperations operations, GroupGetMemberGroupsParameters parameters)
 {
     return(operations.GetMemberGroupsAsync(parameters, CancellationToken.None));
 }
Ejemplo n.º 32
0
 /// <summary>
 /// Gets list of groups for the current tenant.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations.
 /// </param>
 /// <param name='mail'>
 /// Optional. Email to filter results.
 /// </param>
 /// <param name='displayNameStartsWith'>
 /// Optional. Display name to filter results.
 /// </param>
 /// <returns>
 /// Server response for Get tenant groups API call
 /// </returns>
 public static Task <GroupListResult> ListAsync(this IGroupOperations operations, string mail, string displayNameStartsWith)
 {
     return(operations.ListAsync(mail, displayNameStartsWith, CancellationToken.None));
 }