PowerPoint.SensitivityLabelUpdateResult interface
Nota
Esta API se ofrece a los desarrolladores como versión preliminar y puede cambiar en función de los comentarios que recibamos. No utilice esta API en un entorno de producción.
Representa el resultado de un intento de actualizar la etiqueta de confidencialidad en la presentación. Lleva el estado del resultado además de información de diagnóstico sobre por qué la actualización se realizó correctamente o no.
Comentarios
Conjunto de API: PowerPointApi BETA (SOLO VERSIÓN PRELIMINAR)
Usada por
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/preview-apis/manage-sensitivity-labels.yaml
await PowerPoint.run(async (context) => {
// Apply the selected sensitivity label to the presentation.
const labelId = (document.getElementById("label-id") as HTMLSelectElement).value;
if (!labelId) {
console.warn("Get the available labels, and then select a label to apply.");
return;
}
const presentation: PowerPoint.Presentation = context.presentation;
const presentationLabel: PowerPoint.SensitivityLabel = presentation.sensitivityLabel;
const updateResult: OfficeExtension.ClientResult<PowerPoint.SensitivityLabelUpdateResult> =
presentationLabel.tryToUpdate(labelId);
await context.sync();
if (updateResult.value.status === PowerPoint.SensitivityLabelUpdateStatus.success) {
console.log("Applied the sensitivity label to the presentation.");
} else {
console.error(`The sensitivity label wasn't applied. Status: ${updateResult.value.status}`);
}
});
Propiedades
| status | Obtiene el estado de resultado del intento de actualización. |
Detalles de las propiedades
status
Nota
Esta API se ofrece a los desarrolladores como versión preliminar y puede cambiar en función de los comentarios que recibamos. No utilice esta API en un entorno de producción.
Obtiene el estado de resultado del intento de actualización.
status: PowerPoint.SensitivityLabelUpdateStatus | "Success" | "UnspecifiedFailure" | "LabelNotFound" | "DocumentReadOnly" | "InsufficientPermission" | "UnsupportedDoubleKeyEncryption" | "LabelingDisabled" | "UserNotFound" | "UnsupportedUdp" | "ParentLabelNotSupported" | "CrossTenant" | "AbacAttributesNotAllowed" | "AbacAttributesRequired" | "UnsupportedAbac" | "LabelDisabled" | "RemovingLabelNotSupported";
Valor de propiedad
PowerPoint.SensitivityLabelUpdateStatus | "Success" | "UnspecifiedFailure" | "LabelNotFound" | "DocumentReadOnly" | "InsufficientPermission" | "UnsupportedDoubleKeyEncryption" | "LabelingDisabled" | "UserNotFound" | "UnsupportedUdp" | "ParentLabelNotSupported" | "CrossTenant" | "AbacAttributesNotAllowed" | "AbacAttributesRequired" | "UnsupportedAbac" | "LabelDisabled" | "RemovingLabelNotSupported"
Comentarios
Conjunto de API: PowerPointApi BETA (SOLO VERSIÓN PRELIMINAR)