@azure-rest/maps-geolocation package

Antarmuka

CountryRegionOutput

Objek yang berisi informasi negara/wilayah.

ErrorAdditionalInfoOutput

Info tambahan kesalahan manajemen sumber daya.

ErrorDetailOutput

Detail kesalahan.

ErrorResponseOutput

Respons kesalahan umum untuk semua API Azure Resource Manager untuk mengembalikan detail kesalahan untuk operasi yang gagal. (Ini juga mengikuti format respons kesalahan OData.).

GeolocationGetLocation200Response

API Get IP To Location adalah permintaan GET HTTP yang, mengingat alamat IP, mengembalikan kode negara ISO tempat alamat IP tersebut berada. Pengembang dapat menggunakan informasi ini untuk memblokir atau mengubah konten tertentu berdasarkan lokasi geografis tempat aplikasi dilihat.

GeolocationGetLocationDefaultResponse

API Get IP To Location adalah permintaan GET HTTP yang, mengingat alamat IP, mengembalikan kode negara ISO tempat alamat IP tersebut berada. Pengembang dapat menggunakan informasi ini untuk memblokir atau mengubah konten tertentu berdasarkan lokasi geografis tempat aplikasi dilihat.

GeolocationGetLocationQueryParam
GeolocationGetLocationQueryParamProperties
GetLocation
IpAddressToLocationResultOutput

Objek ini dikembalikan dari panggilan yang berhasil ke Alamat IP ke API negara/wilayah

MapsGeolocationClientOptions

Parameter opsional untuk klien

Routes

Alias Jenis

GeolocationGetLocationParameters
MapsGeolocationClient

Fungsi

default(AzureKeyCredential, ClientOptions)

Membuat instans MapsGeolocationClient dari kunci langganan.

Contoh

import { AzureKeyCredential } from "@azure/core-auth";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new AzureKeyCredential("<subscription-key>");
const client = MapsGeolocation(credential);
default(TokenCredential, string, ClientOptions)

Membuat instans MapsGeolocation dari Azure Identity TokenCredential.

Contoh

import { DefaultAzureCredential } from "@azure/identity";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new DefaultAzureCredential();
const client = MapsGeolocation(credential, "<maps-account-client-id>");
default(AzureSASCredential, ClientOptions)

Membuat instans MapsGeolocation dari Azure Identity AzureSASCredential.

Contoh

import { AzureSASCredential } from "@azure/core-auth";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new AzureSASCredential("<SAS Token>");
const client = MapsGeolocation(credential);
isUnexpected(GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse)

Detail Fungsi

default(AzureKeyCredential, ClientOptions)

Membuat instans MapsGeolocationClient dari kunci langganan.

Contoh

import { AzureKeyCredential } from "@azure/core-auth";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new AzureKeyCredential("<subscription-key>");
const client = MapsGeolocation(credential);
function default(credential: AzureKeyCredential, options?: ClientOptions): MapsGeolocationClient

Parameter

credential
AzureKeyCredential

Instans AzureKeyCredential yang digunakan untuk mengautentikasi permintaan ke layanan

options
ClientOptions

Opsi yang digunakan untuk mengonfigurasi Klien Geolokasi

Mengembalikan

default(TokenCredential, string, ClientOptions)

Membuat instans MapsGeolocation dari Azure Identity TokenCredential.

Contoh

import { DefaultAzureCredential } from "@azure/identity";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new DefaultAzureCredential();
const client = MapsGeolocation(credential, "<maps-account-client-id>");
function default(credential: TokenCredential, mapsAccountClientId: string, options?: ClientOptions): MapsGeolocationClient

Parameter

credential
TokenCredential

Instans TokenCredential yang digunakan untuk mengautentikasi permintaan ke layanan

mapsAccountClientId

string

Id klien Azure Maps dari sumber daya peta tertentu

options
ClientOptions

Opsi yang digunakan untuk mengonfigurasi Klien Rute

Mengembalikan

default(AzureSASCredential, ClientOptions)

Membuat instans MapsGeolocation dari Azure Identity AzureSASCredential.

Contoh

import { AzureSASCredential } from "@azure/core-auth";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new AzureSASCredential("<SAS Token>");
const client = MapsGeolocation(credential);
function default(credential: AzureSASCredential, options?: ClientOptions): MapsGeolocationClient

Parameter

credential
AzureSASCredential

Instans AzureSASCredential yang digunakan untuk mengautentikasi permintaan ke layanan

options
ClientOptions

Opsi yang digunakan untuk mengonfigurasi Klien Geolokasi

Mengembalikan

isUnexpected(GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse)

function isUnexpected(response: GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse): response

Parameter

Mengembalikan

response