> ## Documentation Index
> Fetch the complete documentation index at: https://prefect-bd373955-codex-docket-background-task-ha.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

#  

# `prefect block`

```command theme={null}
prefect block [OPTIONS] COMMAND [ARGS]...
```

<Info>
  Manage blocks.
</Info>

## `prefect block type`

```command theme={null}
prefect block type [OPTIONS] COMMAND [ARGS]...
```

<Info>
  Inspect and delete block types.
</Info>

### `prefect block type ls`

```command theme={null}
prefect block type ls [OPTIONS]
```

<Info>
  List all block types.
</Info>

<AccordionGroup>
  <Accordion title="Options" defaultOpen>
    <ResponseField name="--output">
      Specify an output format. Currently supports: json
    </ResponseField>
  </Accordion>
</AccordionGroup>

### `prefect block type inspect`

```command theme={null}
prefect block type inspect [OPTIONS] SLUG
```

<Info>
  Display details about a block type.
</Info>

<AccordionGroup>
  <Accordion title="Arguments" defaultOpen>
    <ResponseField name="SLUG" type="string" required>
      A block type slug
    </ResponseField>
  </Accordion>

  <Accordion title="Options" defaultOpen>
    <ResponseField name="--output">
      Specify an output format. Currently supports: json
    </ResponseField>
  </Accordion>
</AccordionGroup>

### `prefect block type delete`

```command theme={null}
prefect block type delete [OPTIONS] SLUG
```

<Info>
  Delete an unprotected Block Type.
</Info>

<AccordionGroup>
  <Accordion title="Arguments" defaultOpen>
    <ResponseField name="SLUG" type="string" required>
      A Block type slug
    </ResponseField>
  </Accordion>
</AccordionGroup>

## `prefect block types`

```command theme={null}
prefect block types [OPTIONS] COMMAND [ARGS]...
```

<Info>
  Inspect and delete block types.
</Info>

### `prefect block types ls`

```command theme={null}
prefect block types ls [OPTIONS]
```

<Info>
  List all block types.
</Info>

<AccordionGroup>
  <Accordion title="Options" defaultOpen>
    <ResponseField name="--output">
      Specify an output format. Currently supports: json
    </ResponseField>
  </Accordion>
</AccordionGroup>

### `prefect block types inspect`

```command theme={null}
prefect block types inspect [OPTIONS] SLUG
```

<Info>
  Display details about a block type.
</Info>

<AccordionGroup>
  <Accordion title="Arguments" defaultOpen>
    <ResponseField name="SLUG" type="string" required>
      A block type slug
    </ResponseField>
  </Accordion>

  <Accordion title="Options" defaultOpen>
    <ResponseField name="--output">
      Specify an output format. Currently supports: json
    </ResponseField>
  </Accordion>
</AccordionGroup>

### `prefect block types delete`

```command theme={null}
prefect block types delete [OPTIONS] SLUG
```

<Info>
  Delete an unprotected Block Type.
</Info>

<AccordionGroup>
  <Accordion title="Arguments" defaultOpen>
    <ResponseField name="SLUG" type="string" required>
      A Block type slug
    </ResponseField>
  </Accordion>
</AccordionGroup>

## `prefect block register`

```command theme={null}
prefect block register [OPTIONS]
```

<Info>
  Register blocks types within a module or file.

  This makes the blocks available for configuration via the UI.
  If a block type has already been registered, its registration will be updated to
  match the block's current definition.
</Info>

<AccordionGroup>
  <Accordion title="Options" defaultOpen>
    <ResponseField name="--module">
      Python module containing block types to be registered
    </ResponseField>

    <ResponseField name="--file">
      Path to .py file containing block types to be registered
    </ResponseField>
  </Accordion>
</AccordionGroup>

<Note>
  **Example:**

  ```bash theme={null}
  $ prefect block register -f my_blocks.py
  $ prefect block register -m prefect_aws.credentials
  ```
</Note>

## `prefect block ls`

```command theme={null}
prefect block ls [OPTIONS]
```

<Info>
  View all configured blocks.
</Info>

<AccordionGroup>
  <Accordion title="Options" defaultOpen>
    <ResponseField name="--output">
      Specify an output format. Currently supports: json
    </ResponseField>
  </Accordion>
</AccordionGroup>

## `prefect block delete`

```command theme={null}
prefect block delete [OPTIONS] [SLUG]
```

<Info>
  Delete a configured block.
</Info>

<AccordionGroup>
  <Accordion title="Arguments" defaultOpen>
    <ResponseField name="SLUG" type="string">
      A block slug. Formatted as '\<BLOCK\_TYPE\_SLUG>/\<BLOCK\_NAME>'
    </ResponseField>
  </Accordion>

  <Accordion title="Options" defaultOpen>
    <ResponseField name="--id">
      A block id.
    </ResponseField>
  </Accordion>
</AccordionGroup>

## `prefect block create`

```command theme={null}
prefect block create [OPTIONS] BLOCK_TYPE_SLUG
```

<Info>
  Generate a link to the Prefect UI to create a block.
</Info>

<AccordionGroup>
  <Accordion title="Arguments" defaultOpen>
    <ResponseField name="BLOCK_TYPE_SLUG" type="string" required>
      A block type slug. View available types with: prefect block type ls
    </ResponseField>
  </Accordion>
</AccordionGroup>

## `prefect block inspect`

```command theme={null}
prefect block inspect [OPTIONS] [SLUG]
```

<Info>
  Displays details about a configured block.
</Info>

<AccordionGroup>
  <Accordion title="Arguments" defaultOpen>
    <ResponseField name="SLUG" type="string">
      A Block slug: \<BLOCK\_TYPE\_SLUG>/\<BLOCK\_NAME>
    </ResponseField>
  </Accordion>

  <Accordion title="Options" defaultOpen>
    <ResponseField name="--id">
      A Block id to search for if no slug is given
    </ResponseField>

    <ResponseField name="--output">
      Specify an output format. Currently supports: json
    </ResponseField>
  </Accordion>
</AccordionGroup>
