Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EG] Container Registry required/optional #30778

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ model ContainerRegistryChartDeletedEventData

alias ContainerRegistryBaseEventData = {
/** The event ID. */
id?: string;
id: string;

/** The time at which the event occurred. */
@madeRequired(ServiceApiVersions.v2024_01_01)
timestamp: utcDateTime;

/** The action that encompasses the provided event. */
action?: string;
action: string;

/** The location of the event. */
location?: string;
location: string;
};

/** The content of the event request message. */
Expand All @@ -46,16 +46,16 @@ model ContainerRegistryEventData {
target: ContainerRegistryEventTarget;

/** The request that generated the event. */
request: ContainerRegistryEventRequest;
request?: ContainerRegistryEventRequest;

/** The agent that initiated the event. For most situations, this could be from the authorization context of the request. */
actor: ContainerRegistryEventActor;
actor?: ContainerRegistryEventActor;

/** The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. */
source: ContainerRegistryEventSource;
source?: ContainerRegistryEventSource;

/** The connected registry information if the event is generated by a connected registry. */
connectedRegistry: ContainerRegistryEventConnectedRegistry;
connectedRegistry?: ContainerRegistryEventConnectedRegistry;
}

/** The content of the event request message. */
Expand All @@ -72,7 +72,7 @@ model ContainerRegistryArtifactEventData {
/** The target of the event. */
model ContainerRegistryEventTarget {
/** The MIME type of the referenced object. */
mediaType?: string;
mediaType: string;

/** The number of bytes of the content. Same as Length field. */
size?: int64;
Expand All @@ -84,7 +84,7 @@ model ContainerRegistryEventTarget {
length?: int64;

/** The repository name. */
repository?: string;
repository: string;

/** The direct URL to the content. */
url?: string;
Expand Down Expand Up @@ -113,16 +113,16 @@ model ContainerRegistryArtifactEventTarget {
/** The request that generated the event. */
model ContainerRegistryEventRequest {
/** The ID of the request that initiated the event. */
id?: string;
id: string;

/** The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the standard http request. */
addr?: string;

/** The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests. */
host?: string;
host: string;

/** The request method that generated the event. */
method?: string;
method: string;

/** The user agent header of the request. */
useragent?: string;
Expand All @@ -147,7 +147,7 @@ model ContainerRegistryEventSource {
/** The connected registry information if the event is generated by a connected registry. */
model ContainerRegistryEventConnectedRegistry {
/** The name of the connected registry that generated this event. */
name?: string;
name: string;
}

alias ContainerRegistryBaseEventTarget<
Expand All @@ -158,7 +158,7 @@ alias ContainerRegistryBaseEventTarget<
Ttag extends valueof string
> = {
@doc(TmediaType)
mediaType?: string;
mediaType: string;

@doc(Tsize)
size?: int64;
Expand All @@ -167,7 +167,7 @@ alias ContainerRegistryBaseEventTarget<
digest?: string;

@doc(Trepository)
repository?: string;
repository: string;

@doc(Ttag)
tag?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3346,6 +3346,9 @@
}
},
"required": [
"id",
"action",
"location",
"target",
"connectedRegistry"
]
Expand Down Expand Up @@ -3383,7 +3386,11 @@
"type": "string",
"description": "The version of the artifact."
}
}
},
"required": [
"mediaType",
"repository"
]
},
"ContainerRegistryChartDeletedEventData": {
"type": "object",
Expand Down Expand Up @@ -3421,7 +3428,10 @@
"type": "string",
"description": "The name of the connected registry that generated this event."
}
}
},
"required": [
"name"
]
},
"ContainerRegistryEventData": {
"type": "object",
Expand Down Expand Up @@ -3466,11 +3476,10 @@
}
},
"required": [
"target",
"request",
"actor",
"source",
"connectedRegistry"
"id",
"action",
"location",
"target"
]
},
"ContainerRegistryEventRequest": {
Expand All @@ -3497,7 +3506,12 @@
"type": "string",
"description": "The user agent header of the request."
}
}
},
"required": [
"id",
"host",
"method"
]
},
"ContainerRegistryEventSource": {
"type": "object",
Expand Down Expand Up @@ -3547,7 +3561,11 @@
"type": "string",
"description": "The tag name."
}
}
},
"required": [
"mediaType",
"repository"
]
},
"ContainerRegistryImageDeletedEventData": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3411,7 +3411,10 @@
}
},
"required": [
"id",
"timestamp",
"action",
"location",
"target",
"connectedRegistry"
]
Expand Down Expand Up @@ -3449,7 +3452,11 @@
"type": "string",
"description": "The version of the artifact."
}
}
},
"required": [
"mediaType",
"repository"
]
},
"ContainerRegistryChartDeletedEventData": {
"type": "object",
Expand Down Expand Up @@ -3487,7 +3494,10 @@
"type": "string",
"description": "The name of the connected registry that generated this event."
}
}
},
"required": [
"name"
]
},
"ContainerRegistryEventData": {
"type": "object",
Expand Down Expand Up @@ -3532,12 +3542,11 @@
}
},
"required": [
"id",
"timestamp",
"target",
"request",
"actor",
"source",
"connectedRegistry"
"action",
"location",
"target"
]
},
"ContainerRegistryEventRequest": {
Expand All @@ -3564,7 +3573,12 @@
"type": "string",
"description": "The user agent header of the request."
}
}
},
"required": [
"id",
"host",
"method"
]
},
"ContainerRegistryEventSource": {
"type": "object",
Expand Down Expand Up @@ -3614,7 +3628,11 @@
"type": "string",
"description": "The tag name."
}
}
},
"required": [
"mediaType",
"repository"
]
},
"ContainerRegistryImageDeletedEventData": {
"type": "object",
Expand Down