> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/cloudflare/cloudflare-typescript/llms.txt
> Use this file to discover all available pages before exploring further.

# Magic Cloud Networking

> API reference for Cloudflare Magic Cloud Networking

## Overview

Magic Cloud Networking provides secure, high-performance connectivity between your cloud environments and Cloudflare's network. Manage cloud integrations, on-ramps, resources, and catalog synchronization.

## Initialize the client

```typescript theme={null}
import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: 'your-api-token',
});
```

## Resources

### Cloud integrations

Manage integrations with cloud providers (AWS, Azure, GCP).

```typescript theme={null}
const cloudIntegrations = client.magicCloudNetworking.cloudIntegrations;
```

Available methods:

#### Create integration

Create a new cloud provider integration.

```typescript theme={null}
const integration = await client.magicCloudNetworking.cloudIntegrations.create({
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
  // integration configuration
});
```

<ParamField path="account_id" type="string" required>
  Account identifier
</ParamField>

#### List integrations

List all cloud integrations.

```typescript theme={null}
const integrations = await client.magicCloudNetworking.cloudIntegrations.list({
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});
```

#### Get integration

Retrieve a specific cloud integration.

```typescript theme={null}
const integration = await client.magicCloudNetworking.cloudIntegrations.get(
  integrationId,
  { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }
);
```

#### Update integration

Update an existing cloud integration.

```typescript theme={null}
const integration = await client.magicCloudNetworking.cloudIntegrations.update(
  integrationId,
  params
);
```

#### Delete integration

Delete a cloud integration.

```typescript theme={null}
await client.magicCloudNetworking.cloudIntegrations.delete(
  integrationId,
  { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }
);
```

#### Discover resources

Discover cloud resources available for integration.

```typescript theme={null}
const resources = await client.magicCloudNetworking.cloudIntegrations.discover(
  integrationId,
  params
);
```

#### Discover all resources

Discover all available cloud resources across integrations.

```typescript theme={null}
const allResources = await client.magicCloudNetworking.cloudIntegrations.discoverAll(params);
```

#### Initial setup

Perform initial setup for a cloud integration.

```typescript theme={null}
const setup = await client.magicCloudNetworking.cloudIntegrations.initialSetup(params);
```

### On-ramps

Manage network on-ramps for cloud connectivity.

```typescript theme={null}
const onRamps = client.magicCloudNetworking.onRamps;
```

Available methods:

#### Create on-ramp

```typescript theme={null}
const onRamp = await client.magicCloudNetworking.onRamps.create(params);
```

#### Update on-ramp

```typescript theme={null}
const onRamp = await client.magicCloudNetworking.onRamps.update(onRampId, params);
```

#### List on-ramps

```typescript theme={null}
const onRamps = await client.magicCloudNetworking.onRamps.list(params);
```

#### Delete on-ramp

```typescript theme={null}
await client.magicCloudNetworking.onRamps.delete(onRampId, params);
```

#### Plan configuration

Plan configuration changes for an on-ramp.

```typescript theme={null}
const plan = await client.magicCloudNetworking.onRamps.plan(onRampId, params);
```

#### Apply configuration

Apply planned configuration changes.

```typescript theme={null}
const result = await client.magicCloudNetworking.onRamps.apply(onRampId, params);
```

#### Export configuration

Export on-ramp configuration.

```typescript theme={null}
await client.magicCloudNetworking.onRamps.export(onRampId, params);
```

### Resources

Manage cloud resources integrated with Magic Cloud Networking.

```typescript theme={null}
const resources = client.magicCloudNetworking.resources;
```

Available methods:

#### List resources

```typescript theme={null}
const resourceList = await client.magicCloudNetworking.resources.list(params);
```

<ParamField path="account_id" type="string" required>
  Account identifier
</ParamField>

#### Get resource

```typescript theme={null}
const resource = await client.magicCloudNetworking.resources.get(resourceId, params);
```

#### Export resources

```typescript theme={null}
await client.magicCloudNetworking.resources.export(params);
```

#### Policy preview

Preview policy changes for resources.

```typescript theme={null}
const preview = await client.magicCloudNetworking.resources.policyPreview(params);
```

### Catalog syncs

Manage catalog synchronization for cloud resources.

```typescript theme={null}
const catalogSyncs = client.magicCloudNetworking.catalogSyncs;
```

Available methods:

#### Create sync

```typescript theme={null}
const sync = await client.magicCloudNetworking.catalogSyncs.create(params);
```

#### Update sync

```typescript theme={null}
const sync = await client.magicCloudNetworking.catalogSyncs.update(syncId, params);
```

#### List syncs

```typescript theme={null}
const syncs = await client.magicCloudNetworking.catalogSyncs.list(params);
```

#### Delete sync

```typescript theme={null}
await client.magicCloudNetworking.catalogSyncs.delete(syncId, params);
```

#### Refresh catalog

Manually trigger a catalog refresh.

```typescript theme={null}
const result = await client.magicCloudNetworking.catalogSyncs.refresh(syncId, params);
```
