GetPowershellTrafficManagerEndpoint() private static method

private static GetPowershellTrafficManagerEndpoint ( string id, string resourceGroupName, string profileName, string endpointType, string endpointName, EndpointProperties mamlEndpointProperties ) : TrafficManagerEndpoint
id string
resourceGroupName string
profileName string
endpointType string
endpointName string
mamlEndpointProperties EndpointProperties
return TrafficManagerEndpoint
示例#1
0
        public TrafficManagerEndpoint CreateTrafficManagerEndpoint(string resourceGroupName, string profileName, string endpointType, string endpointName, string targetResourceId, string target, string endpointStatus, uint?weight, uint?priority, string endpointLocation, uint?minChildEndpoints)
        {
            EndpointCreateOrUpdateResponse response = this.TrafficManagerManagementClient.Endpoints.CreateOrUpdate(
                resourceGroupName,
                profileName,
                endpointType,
                endpointName,
                new EndpointCreateOrUpdateParameters
            {
                Endpoint = new Endpoint
                {
                    Name       = endpointName,
                    Type       = TrafficManagerEndpoint.ToSDKEndpointType(endpointType),
                    Properties = new EndpointProperties
                    {
                        TargetResourceId  = targetResourceId,
                        Target            = target,
                        EndpointStatus    = endpointStatus,
                        Weight            = weight,
                        Priority          = priority,
                        EndpointLocation  = endpointLocation,
                        MinChildEndpoints = minChildEndpoints,
                    }
                }
            });

            return(TrafficManagerClient.GetPowershellTrafficManagerEndpoint(response.Endpoint.Id, resourceGroupName, profileName, endpointType, endpointName, response.Endpoint.Properties));
        }
        public TrafficManagerEndpoint GetTrafficManagerEndpoint(string resourceGroupName, string profileName, string endpointType, string endpointName)
        {
            EndpointGetResponse response = this.TrafficManagerManagementClient.Endpoints.Get(resourceGroupName, profileName, endpointType, endpointName);

            return(TrafficManagerClient.GetPowershellTrafficManagerEndpoint(
                       resourceGroupName,
                       profileName,
                       endpointType,
                       endpointName,
                       response.Endpoint.Properties));
        }
示例#3
0
        public TrafficManagerEndpoint SetTrafficManagerEndpoint(TrafficManagerEndpoint endpoint)
        {
            Endpoint endpointToSet = endpoint.ToSDKEndpoint();

            Endpoint response = this.TrafficManagerManagementClient.Endpoints.CreateOrUpdate(
                endpoint.ResourceGroupName,
                endpoint.ProfileName,
                endpoint.Type,
                endpoint.Name,
                endpointToSet);

            return(TrafficManagerClient.GetPowershellTrafficManagerEndpoint(
                       endpoint.Id,
                       endpoint.ResourceGroupName,
                       endpoint.ProfileName,
                       endpoint.Type,
                       endpoint.Name,
                       response));
        }
示例#4
0
        public TrafficManagerEndpoint CreateTrafficManagerEndpoint(
            string resourceGroupName,
            string profileName,
            string endpointType,
            string endpointName,
            string targetResourceId,
            string target,
            string endpointStatus,
            uint?weight,
            uint?priority,
            string endpointLocation,
            uint?minChildEndpoints,
            uint?minChildEndpointsIPv4,
            uint?minChildEndpointsIPv6,
            IList <string> geoMapping,
            IList <TrafficManagerIpAddressRange> subnetMapping,
            IList <TrafficManagerCustomHeader> customHeaders
            )
        {
            Endpoint response = this.TrafficManagerManagementClient.Endpoints.CreateOrUpdate(
                resourceGroupName,
                profileName,
                endpointType,
                endpointName,
                new Endpoint(name: endpointName, type: TrafficManagerEndpoint.ToFullEndpointType(endpointType))
            {
                EndpointLocation      = endpointLocation,
                EndpointStatus        = endpointStatus,
                GeoMapping            = geoMapping,
                MinChildEndpoints     = minChildEndpoints,
                MinChildEndpointsIPv4 = minChildEndpointsIPv4,
                MinChildEndpointsIPv6 = minChildEndpointsIPv6,
                Priority         = priority,
                Target           = target,
                TargetResourceId = targetResourceId,
                Weight           = weight,
                Subnets          = subnetMapping?.Select(ipAddressRange => ipAddressRange.ToSDKSubnetMapping()).ToList(),
                CustomHeaders    = customHeaders?.Select(customHeader => customHeader.ToSDKEndpointPropertiesCustomHeadersItem()).ToList()
            });

            return(TrafficManagerClient.GetPowershellTrafficManagerEndpoint(response.Id, resourceGroupName, profileName, endpointType, endpointName, response));
        }
        public TrafficManagerEndpoint CreateTrafficManagerEndpoint(string resourceGroupName, string profileName, string endpointType, string endpointName, string targetResourceId, string target, string endpointStatus, uint?weight, uint?priority, string endpointLocation, uint?minChildEndpoints, IList <string> geoMapping)
        {
            Endpoint response = this.TrafficManagerManagementClient.Endpoints.CreateOrUpdate(
                resourceGroupName,
                profileName,
                endpointType,
                endpointName,
                new Endpoint(name: endpointName, type: TrafficManagerEndpoint.ToFullEndpointType(endpointType))
            {
                EndpointLocation  = endpointLocation,
                EndpointStatus    = endpointStatus,
                GeoMapping        = geoMapping,
                MinChildEndpoints = minChildEndpoints,
                Priority          = priority,
                Target            = target,
                TargetResourceId  = targetResourceId,
                Weight            = weight,
            });

            return(TrafficManagerClient.GetPowershellTrafficManagerEndpoint(response.Id, resourceGroupName, profileName, endpointType, endpointName, response));
        }
        public TrafficManagerEndpoint SetTrafficManagerEndpoint(TrafficManagerEndpoint endpoint)
        {
            var parameters = new EndpointCreateOrUpdateParameters
            {
                Endpoint = endpoint.ToSDKEndpoint()
            };

            EndpointCreateOrUpdateResponse response = this.TrafficManagerManagementClient.Endpoints.CreateOrUpdate(
                endpoint.ResourceGroupName,
                endpoint.ProfileName,
                endpoint.Type,
                endpoint.Name,
                parameters);

            return(TrafficManagerClient.GetPowershellTrafficManagerEndpoint(
                       endpoint.ResourceGroupName,
                       endpoint.ProfileName,
                       endpoint.Type,
                       endpoint.Name,
                       response.Endpoint.Properties));
        }